Sample
pyint-f7356cc75179-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.682 | 0–1; higher is more readable |
| Mi | 0.496 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.398 | 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. | 1813.318 | −59.84 |
| Source linesThe number of non-empty source lines. | 51 | +20.4 |
| 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.659 | −6.988 |
Intercept 8.87 + feature contributions = -37.557 (log-odds).
Score = sigmoid(-37.557) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 47 | +0.889 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 44 | −0.589 |
| 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. | 75.923 | +0.449 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 74.577 | +0.399 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 50.727 | +0.299 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.099 | −0.018 |
Intercept 0.07 + feature contributions = 0.765 (log-odds).
Score = sigmoid(0.765) = 0.682.
| Score | 0.496 |
|---|
| Score | 35 |
|---|
Run 1
The code has some readable elements—clear class name, docstring, and type hints—but is severely undermined by obfuscated assertions like `if ((0x7216 ^ 0x7216) != 0): raise AssertionError()` that add noise and confusion without purpose. Structure is logical but shallow; nesting is minimal, which is good. Clarity of intent is hurt by redundant `__getattr__` and `__getitem__` implementations that don't leverage the dict base class consistently, and by unusual use of `__dict__` instead of inherited mapping methods. Action granularity is acceptable, but reading flow is disrupted by the cryptic checks on almost every method. Overall, the code would be much more readable without the artificial assertion blocks and with more idiomatic use of `dict` subclassing.
Run 2
The code is a small class but readability is severely impacted by several factors. The structure is mostly logical, but the repetitive assertion checks like 'if ((0x7216 ^ 0x7216) != 0)' are meaningless to a human reader and clutter every method. These add unnecessary length and obscure intent. Nesting is flat, which is good, and most methods are one action per line after the assertions. However, the reading flow is broken by the constant interruption of dead code. Type hints are helpful, but the `ignore[override]` and `overload` additions, while functional, can distract from the core logic. The `__getattr__` and `__getitem__` methods are concise but their behavior (using `__dict__` instead of the parent `dict` storage) requires extra mental effort to understand. Overall, the class's purpose is clear, but the presentation is noisy and unnecessarily long due to the redundant assertions.
Run 3
The code has clear class structure with type hints, docstrings, and overloads, which helps understanding. However, it contains numerous pointless `if ((0x... ^ 0x...) != 0): raise AssertionError()` blocks that add noise and obscure the actual logic. These redundant checks double the length and disrupt reading flow. Nesting is shallow and intent is mostly clear, but the dead code severely impacts clarity and conciseness. Action granularity is adequate, though the type-hint helpers and conditional overloads add some complexity. Overall, readable apart from the artifical clutter.
Run 1
Code Structure: Methods are logically organized within a small class, but unused imports and unexplained type variables (_VT and _D) weaken the standalone presentation. Nesting: Mostly shallow, although redundant conditional blocks add noise. Clarity of intent: Method names, annotations, and comments explain lookup behavior, but using __dict__ rather than dictionary storage is surprising. Repeated hexadecimal XOR checks are always false and obscure the actual operations. Code length: The class is compact overall, but dead assertion branches unnecessarily inflate every implementation. Action granularity: Each statement generally performs one action; compact overload declarations remain understandable. Reading flow: Conventional method ordering helps, but repetitive opaque checks interrupt the flow before each meaningful operation.
Run 2
Code Structure: Methods are logically grouped within a small class, but unused imports and undefined type variables in the snippet weaken its organization. Nesting: Shallow overall, although repeated conditionals and an unnecessary else add clutter. Clarity of intent: Method names and typing communicate lookup behavior, but using instance attributes rather than dictionary entries is surprising, and always-false hexadecimal XOR checks obscure the purpose. Code length: Short methods are padded by repeated unreachable assertion blocks; overloads add useful typing detail. Action granularity: Statements generally perform one action per line, making individual operations easy to identify. Reading flow: The method sequence is natural, but redundant checks repeatedly interrupt the straightforward lookup logic.
Run 3
Code Structure: Methods are logically grouped within a small class, but unused imports and type variables not defined in the snippet distract. Nesting: Mostly shallow, with an unnecessary else after a return. Clarity of intent: Method names, annotations, and comments help, but repeated hexadecimal XOR checks that always evaluate to false obscure the real behavior. Attribute-backed lookup in a dict subclass also requires closer inspection. Code length: The implementation is short overall, yet redundant assertion blocks significantly inflate it. Action granularity: Statements generally perform one action per line; compact overload declarations remain understandable. Reading flow: Familiar method organization supports navigation, but dead checks repeatedly interrupt straightforward operations.