Sample
pyint-eabc9dfd2a8f-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.349 | 0–1; higher is more readable |
| Dorn | 0.715 | 0–1; higher is more readable |
| Mi | 0.508 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.554 | 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. | 653.284 | −21.558 |
| Source linesThe number of non-empty source lines. | 48 | +19.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.758 | −7.136 |
Intercept 8.87 + feature contributions = -0.625 (log-odds).
Score = sigmoid(-0.625) = 0.349.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.022 | +0.723 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 49 | −0.699 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.939 | +0.598 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 47.852 | +0.259 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 26 | −0.176 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 26 | +0.162 |
| 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.959 | −0.018 |
Intercept 0.07 + feature contributions = 0.92 (log-odds).
Score = sigmoid(0.92) = 0.715.
| Score | 0.508 |
|---|
| Score | 21 |
|---|
Run 1
The code is well-structured with clear imports, a focused class definition, and a single property method. Nesting is minimal with only one conditional level. Intent is clearly documented through docstrings and type annotations. Code length is appropriate for the functionality, though the docstring is somewhat verbose. Action granularity is good - each line performs one logical action. Reading flow is natural with the property following class attributes. Minor deductions: the verbose docstring adds length without proportional value, the weird assertion check (0x35b0 ^ 0x35b0) is confusing and appears to be artificially inserted, and there's slight redundancy in acceptable type ignores. Overall highly readable Python with excellent type hints and clear separation of concerns.
Run 2
The code is well-structured and highly readable. It uses clear imports, type annotations, and a concise class definition with a focused method. The method body is flat, with only one level of nesting and no deep indentation. Intent is clear: expose a read-only config value with a sensible fallback. Code length is minimal and avoids redundancy. Each logical action is on its own line. The flow is natural, moving from imports to class definition to method implementation. The only slight distractions are the vestigial assertion line and type-ignore comments, but they do not significantly impair readability.
Run 3
The code is well-structured and readable. It uses clear imports, type hints, and follows a logical class definition. The docstring is informative and explains the purpose of the Response class. The class attributes are clearly defined with default values. The property method `max_cookie_size` has a descriptive name and includes a docstring. The nesting is minimal with only one level of indentation in the conditional check. The action granularity is appropriate, with each meaningful operation on its own line. The reading flow is natural, moving from imports to class definition to method. One minor issue is the inclusion of a dead code assertion check (`if ((0x35b0 ^ 0x35b0) != 0)`) which serves no functional purpose and slightly detracts from clarity. Overall, the code demonstrates good practices with clear intent and reasonable organization.
Run 1
Code Structure: Imports, class attributes, and the property are logically organized. Nesting: Control flow is shallow and easy to follow. Clarity of intent: Naming, type annotations, and documentation clearly explain the response configuration, but the always-false hexadecimal XOR assertion is pointless and confusing. Code length: The implementation is concise, although historical documentation is lengthy relative to the functional code and the assertion adds unnecessary lines. Action granularity: Each statement performs one action, with no compressed multi-action lines. Reading flow: The property naturally checks application configuration before falling back to the superclass, but the dead assertion interrupts that flow. Additional spacing between imports and the class would improve visual separation.
Run 2
Code Structure: Imports, class configuration, and the property are logically organized. Nesting: Control flow is shallow and easy to follow. Clarity of intent: Descriptive names, type annotations, and documentation explain the response customization and configuration fallback, but the always-false hexadecimal XOR condition and unreachable assertion are distracting and obscure intent. Code length: The implementation is concise, although historical documentation and dead code add unnecessary reading. Action granularity: Statements generally perform one action per line. Reading flow: The progression from imports to class settings to the property is natural, and the fallback comment helps; however, the unexplained assertion branch interrupts that flow.
Run 3
Code Structure: Imports, class configuration, and the property are logically organized. Nesting: The method is shallow, with simple conditional branches and early returns. Clarity of intent: Descriptive names, type annotations, and documentation explain the response customization and configuration lookup, but the always-false hexadecimal XOR check is confusing and serves no apparent purpose. Code length: Executable code is concise, though the extensive class documentation and redundant assertion branch add reading overhead. Action granularity: Each statement performs one action, without compressed multi-operation lines. Reading flow: The progression from defaults to application configuration and superclass fallback is natural; however, the unexplained dead-code check interrupts that flow, and missing blank lines between imports and the class slightly weaken visual separation.