Sample
pyint-c5639f6f2a52-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.233 | 0–1; higher is more readable |
| Mi | 0.471 | 0–1; higher is more readable |
| LLOC | 55 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.275 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 3522.955 | −116.258 |
| Source linesThe number of non-empty source lines. | 100 | +40 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.739 | −7.108 |
Intercept 8.87 + feature contributions = -74.495 (log-odds).
Score = sigmoid(-74.495) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 101 | −2.54 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 70 | +1.684 |
| Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 119.98 | −1.417 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 71 | −1.208 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 119.97 | +1.131 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 99.777 | +0.985 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.103 |
Intercept 0.07 + feature contributions = -1.192 (log-odds).
Score = sigmoid(-1.192) = 0.233.
| Score | 0.471 |
|---|
| Score | 55 |
|---|
Run 1
The code has clear structure with a well-prefixed class docstring, use of type hints, and an OrderedDict backend that logically separates lowercased keys from cased keys. The overall purpose is easy to understand, and method length is reasonably concise. However, readability is significantly reduced by the repeated `if ((0x... ^ 0x...) != 0): raise AssertionError()` lines. These are dead checks that add noise, break natural reading flow, and obscure the intent of every method. Additionally, some expressions such as `return dict(self.lower_items()) == dict(other_dict.lower_items())` could use a clarifying comment or helper. The generator expressions are acceptable, but the repeated numeric checks harm maintainability and make the code look scrambled.
Run 2
The code is generally well-structured and readable, with clear class-level documentation and logical organization. However, it contains a significant readability issue: every method includes a redundant, always-false assertion check (e.g., `if ((0x683a ^ 0x683a) != 0): raise AssertionError()`), which obscures intent and adds noise. These checks are likely artifacts from code generation or obfuscation, not meaningful logic, and they violate the 'clarity of intent' and 'code length' criteria. Nesting is mostly flat, action granularity is reasonable, and reading flow is natural overall. The class methods are concise and follow a consistent pattern. Despite the documentation, the redundant checks and slight verbosity in type annotations and conditional branches reduce readability. With removal of the meaningless assertions and minor cleanup, the code would score higher.
Run 3
The code is severely obfuscated by pervasive dead-code assertions like `if ((0x683a ^ 0x683a) != 0): raise AssertionError()` in nearly every method. These add no logical value, disrupt reading flow, and bury the actual logic. The class structure itself is reasonable and the use of `OrderedDict` for case-insensitive storage is clear, but the repetitive dummy checks dominate each method, making the code unnecessarily long and hard to scan. Nesting is acceptable and actions are mostly one per line, but the intent is clouded by the noise. The docstring is helpful, though the code itself is not well-suited to human readability.
Run 1
Code Structure: Well-organized class with small, conventional mapping methods, although _VT is not defined in the snippet and some imports are unused. Nesting: Shallow throughout, with simple conditionals and comprehensions. Clarity of intent: The docstring, annotations, and descriptive method names clearly explain case-insensitive behavior, but repeated hexadecimal XOR checks introduce confusing, unreachable assertions. Code length: Core operations are concise, yet redundant checks unnecessarily inflate nearly every method. Action granularity: Statements generally perform one action per line; comprehensions remain reasonably readable. Reading flow: Methods follow a natural mapping-interface progression, but repeated dead-code guards interrupt the flow and distract from the actual logic.
Run 2
Code Structure: Well-organized mapping class with small, conventional methods, though _VT is not defined in the supplied code and some imports are unused. Nesting: Mostly flat, with only shallow conditionals. Clarity of intent: The docstring, annotations, and descriptive method names clearly explain case-insensitive behavior, but repeated always-false hexadecimal XOR checks introduce confusing, purposeless logic. Code length: Core operations are concise, yet redundant assertion blocks substantially inflate the implementation. Action granularity: Statements generally perform one action per line; generator expressions remain manageable. Reading flow: Methods follow a natural progression from initialization through mapping operations to comparison and representation, but the repeated dead checks interrupt nearly every method and distract from the actual functionality.
Run 3
Code Structure: Clearly organized into standard mapping methods, though _VT is not defined in the snippet and some imports are unused. Nesting: Shallow throughout, but each method adds an unnecessary conditional. Clarity of intent: The docstring, type hints, and descriptive method names explain case-insensitive storage well; repeated hexadecimal XOR checks obscure this purpose. Code length: Core operations are concise, but always-false checks and unreachable assertion statements substantially inflate the implementation. Action granularity: Statements generally perform one action per line, and generator expressions remain reasonably readable. Reading flow: Method ordering is natural and consistent, but repetitive dead-code guards interrupt nearly every operation, forcing readers to distinguish meaningful logic from noise.