Sample
pyint-a18f03d7b348-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.31 | 0–1; higher is more readable |
| Mi | 0.738 | 0–1; higher is more readable |
| LLOC | 66 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 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. | 4276.622 | −141.129 |
| Source linesThe number of non-empty source lines. | 203 | +81.2 |
| 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.098 | −6.147 |
Intercept 8.87 + feature contributions = -57.206 (log-odds).
Score = sigmoid(-57.206) = 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. | 204 | −6.187 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 176 | +5.351 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 176 | −3.618 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 202.974 | +2.427 |
| 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. | 76.907 | +0.408 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 73.211 | +0.377 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.059 | +0.373 |
Intercept 0.07 + feature contributions = -0.799 (log-odds).
Score = sigmoid(-0.799) = 0.31.
| Score | 0.738 |
|---|
| Score | 66 |
|---|
Run 1
The code is generally readable with clear class structure and good docstrings. It uses logical imports and slot declarations to organize attributes. However, there are several readability issues: the __attrs_attrs__ tuple uses a generator expression with a long Attribute constructor call repeated across many lines, making it visually heavy. The __init__ method has many parameters without type hints and assigns many attributes, reducing clarity. Odd no-op assertions like `if ((0x8c08 ^ 0x8c08) != 0)` add confusion without explanation. Mixing internal data structure patterns (enum, NamedTuple, ABC) and verbose constructor arguments increases cognitive load. Despite this, action granularity is generally one per line and nesting is flat, helping readability. Overall, it is above average but somewhat burdened by repetitive boilerplate.
Run 2
The code is generally structured and readable, with clear class separation, docstrings, and type hints. The __slots__ and __attrs_attrs__ definitions are logically organized and the methods are concise with clear intent. However, there is significant dead code—multiple 'if ((0x... ^ 0x...) != 0): raise AssertionError()' blocks—that adds unnecessary noise and breaks natural reading flow. The action granularity is mostly one action per line, and nesting is flat, which helps. But the presence of obscure constants and duplicated initialization in __attrs_attrs__ lowers clarity and readability.
Run 3
The code is generally organized with clear class structure and docstrings, but readability is hampered by several issues. The __attrs_attrs__ tuple contains a complex generator expression embedded in a star-tuple, which is hard to follow. The __init__ method has a long parameter list (17 parameters) and includes suspicious dead code (if ((0x8c08 ^ 0x8c08) != 0): raise AssertionError()) that appears obfuscated and serves no clear purpose, occurring in multiple methods. This reduces clarity of intent and adds unnecessary noise. Nesting is moderate, mostly flat except for the tuple construction. Action granularity is inconsistent: some lines perform single clear actions, while others pack constructor calls with many arguments. Reading flow is generally natural from class definition to methods, but the dead-code assertions break it. Overall, the code is maintainable but could be significantly improved by removing dead code, simplifying the attribute tuple construction, and using clearer parameter handling.
Run 1
Code Structure: The class logically groups attribute storage and related decorators, with helpful docstrings, although numerous imports and external references add context overhead. Nesting: Methods remain mostly flat, using simple conditional branches; the class-level attribute construction is more layered. Clarity of intent: Descriptive names and documentation explain the purpose, but repeated always-false hexadecimal assertions introduce distracting, unexplained noise. Code length: Repetitive attribute configuration and a long constructor make the code verbose, while decorator methods are concise. Action granularity: Assignments and operations generally occupy separate lines, making changes easy to follow. Reading flow: Consistent formatting and straightforward method sequencing support natural reading, but bulky initialization metadata and meaningless assertion checks interrupt the flow.
Run 2
Code Structure: The class is logically organized into attribute declarations, initialization, and focused decorator methods. Nesting: Control flow is shallow, although the tuple construction adds some visual complexity. Clarity of intent: Descriptive names and docstrings explain the purpose well, but repeated always-false hexadecimal XOR checks are distracting and unexplained. Code length: Extensive attribute configuration and initialization create verbosity; many imports are unused in this excerpt. Action granularity: Assignments and operations generally occupy separate lines, making individual steps easy to follow. Reading flow: Consistent formatting and straightforward method bodies support natural reading, but the large metadata declaration delays the core behavior, and references defined outside the excerpt require additional context.
Run 3
Code Structure: Logically organized into a documented class, attribute declarations, initialization, and focused decorator methods. Nesting: Mostly flat, with simple conditionals and a moderately complex tuple comprehension. Clarity of intent: Descriptive names and docstrings explain responsibilities, but repeated always-false hexadecimal XOR checks introduce confusing noise; external definitions also require context. Code length: Verbose attribute configuration and a long constructor increase reading effort, while numerous imports are unused in this excerpt. Action granularity: Assignments and operations generally occupy separate lines, making individual steps easy to follow. Reading flow: Consistent formatting and straightforward method bodies support natural reading, but dead assertion branches interrupt every method and the large declaration block delays reaching the core behavior.