Sample
pyint-e6ecfb88d3a4-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.627 | 0–1; higher is more readable |
| Mi | 0.526 | 0–1; higher is more readable |
| LLOC | 33 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs |
| BTTF | 0.302 | 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. | 1771.472 | −58.459 |
| Source linesThe number of non-empty source lines. | 54 | +21.6 |
| 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.673 | −7.009 |
Intercept 8.87 + feature contributions = -34.998 (log-odds).
Score = sigmoid(-34.998) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 51 | +1.027 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 55 | −0.911 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 51 | −0.749 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.927 | +0.598 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 53.727 | +0.341 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.08 | +0.163 |
| 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. | 86.982 | −0.019 |
Intercept 0.07 + feature contributions = 0.52 (log-odds).
Score = sigmoid(0.52) = 0.627.
| Score | 0.526 |
|---|
| Score | 33 |
|---|
Run 1
The code's structure is somewhat organized with clear class and method boundaries, but it suffers from poor readability in several areas. The numerous redundant `if ((0x912a ^ 0x912a) != 0): raise AssertionError()` checks add noise and obscure intent, making the code unnecessarily longer and harder to follow. There is moderate nesting in the `_combine` method, though not excessive. The `LexemeCombinable` class has clear intent with operator overloading for logical combinations, but the repeated empty assertions break natural reading flow and create confusion. Action granularity is mostly one action per line, which is good, but the redundant assertions disrupt the flow. The code would benefit from removing the dead code and simplifying the structure. Overall, it is moderately readable but significantly hindered by the pointless assertion blocks.
Run 2
The code has some readable aspects: clear class name, logical method grouping, and mostly flat nesting. However, it suffers from severe issues. The dead-code assertions like `if ((0x912a ^ 0x912a) != 0): raise AssertionError()` are nonsensical, clutter every method, and destroy readability. The `_combine` method mixes type checking, error handling, and core logic, making its intent harder to follow. The comments explaining the decision to use `__or__`/`__and__` are helpful but add length. Action granularity is mostly one action per line, but the assertion lines break the natural reading flow. Overall, the code is understandable in structure but obfuscated by redundant and confusing checks.
Run 3
The code is generally clear but has several issues. The LexemeCombinable class has a clean structure with logical methods for combining lexemes, but the unexplained magic number checks (0x912a ^ 0x912a) with AssertionError are confusing and add unnecessary complexity. Nesting is flat with good one-action-per-line granularity. The type checking and error message are clear. However, the code length is slightly inflated by verbose assertions that appear to be dead code. The reading flow follows a natural pattern with operator overloading methods grouped together, and comments help clarify the design choice around logical operators. The main readability issues are the obscure assertions that could be removed or replaced with meaningful validation.
Run 1
Code Structure: The class logically groups combination logic and operator overloads, but numerous unused imports clutter the snippet. Nesting: Shallow conditionals and early returns make control flow easy to follow. Clarity of intent: Method names, connector constants, the explanatory comment, and the informative type error clarify logical combination; however, repeated hexadecimal XOR checks are always false and obscure intent. Code length: The core implementation is concise, but redundant assertion blocks add unnecessary length. Action granularity: Statements generally perform one action per line, with readable multiline formatting. Reading flow: Operator methods consistently delegate to _combine, creating a predictable flow, but dead checks repeatedly interrupt it.
Run 2
Code Structure: The class logically groups combination logic and operator overloads, but many imports are unused in this snippet. Nesting: Shallow conditionals keep the code easy to navigate. Clarity of intent: Method names, constants, error messages, and the comment explain logical lexeme combination; however, repeated hexadecimal XOR checks are always false and introduce confusing, purposeless noise. Code length: Delegating operators to _combine is concise, but redundant assertion blocks unnecessarily inflate every method. Action granularity: Each line generally performs one action, with clearly separated checks and returns. Reading flow: The helper followed by related overloads forms a natural sequence, but dead checks repeatedly interrupt that flow. Overall, the underlying design is readable, while artificial conditions substantially reduce clarity.
Run 3
Code Structure: The class logically groups combination logic and operator overloads, although many imports are unused in this excerpt. Nesting: Shallow conditionals keep the methods easy to follow. Clarity of intent: Descriptive names, a helpful comment, and an explicit type-error message explain lexeme combination, but repeated hexadecimal XOR checks are always false and introduce confusing noise. Code length: The core implementation is concise, yet redundant assertion blocks unnecessarily inflate every method. Action granularity: Statements generally perform one action per line, with readable multiline formatting. Reading flow: The shared helper followed by consistent operator wrappers creates a natural progression, but meaningless checks repeatedly interrupt it.