Sample
pyint-b06626aec1e5-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.619 | 0–1; higher is more readable |
| Mi | 0.266 | 0–1; higher is more readable |
| LLOC | 40 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.392 | 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. | 2144.972 | −70.784 |
| Source linesThe number of non-empty source lines. | 88 | +35.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.743 | −7.115 |
Intercept 8.87 + feature contributions = -33.829 (log-odds).
Score = sigmoid(-33.829) = 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. | 89 | −2.115 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 65 | +1.511 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 64 | −1.048 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 87.85 | +0.818 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.045 | +0.502 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76.337 | +0.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. | 78.955 | +0.321 |
Intercept 0.07 + feature contributions = 0.487 (log-odds).
Score = sigmoid(0.487) = 0.619.
| Score | 0.266 |
|---|
| Score | 40 |
|---|
Run 1
The code is well-structured and readable, with clear class and method organization, logical flow, and helpful docstrings. The constructor handles URL logic with reasonable nesting and intuitive checks, though the assertion combining boolean conditions could be slightly clearer. Lines are concise and mostly perform one action. Import organization is standard. Minor noise from unnecessary debug assertions and inconsistent type usage slightly affects clarity, but overall the code demonstrates high readability with natural reading flow and clear intent.
Run 2
The code is generally readable with clear structure, good type hints, and well-documented parameters. However, several issues reduce clarity: the assertion at the start appears obfuscated due to XOR operations that always evaluate to false, making it confusing and unnatural. The validation condition is overly complex and hard to parse quickly. The nested logic for URL construction, while logically organized, could be flatter and more explicit. Variable naming is mostly clear, and the class structure is logical. The code length is reasonable, but the assertion and validation logic add unnecessary complexity, hurting readability. Action granularity is mostly good, though some lines combine multiple operations. Overall, it is readable but could be improved by simplifying the assertion and URL-building logic.
Run 3
The code is generally readable but has some awkward elements. Structure is logical with clear class definition and a well-documented __init__ method. Nesting is minimal—only one level deep in the base_url conditional block. Intent is clear for domain experts, though the condition logic in the assertion is convoluted and hard to parse. Code length is reasonable. Action granularity is mostly one action per line, but the assert statement combines multiple conditions. Reading flow is natural aside from the strange zero-check assertions (e.g., `if ((0xdf7b ^ 0xdf7b) != 0)`) that appear to be obfuscated debugging remnants and should be removed. The base_url construction is slightly dense, and the assertion about mutually exclusive parameters could be simplified or split for clarity.
Run 1
Code Structure: Imports, class documentation, initialization, and serialization are logically organized. Nesting: Control flow is shallow, with straightforward conditional blocks. Clarity of intent: Descriptive names, type annotations, and detailed docstrings explain environment construction well, but the compound assertion is difficult to parse, and constant-false XOR checks introduce distracting, unexplained dead code. Code length: Most implementation is concise; documentation is useful, while redundant assertion checks add unnecessary length. Action granularity: Statements generally perform one action per line, and multiline expressions are formatted clearly. Reading flow: Configuration lookup, URL construction, and superclass initialization follow a natural sequence, but obfuscated checks interrupt that flow.
Run 2
Code Structure: The class logically separates environment initialization from JSON serialization, though numerous unused imports clutter the excerpt. Nesting: Mostly shallow, with straightforward conditionals inside one main configuration branch. Clarity of intent: Descriptive names, type annotations, and detailed docstrings explain the purpose well; however, the compound assertion is difficult to parse, and constant-false XOR checks are distracting dead code. Code length: Implementation is reasonably concise, but irrelevant imports and redundant checks add unnecessary length. Action granularity: Statements generally perform one action per line, with sensible multiline formatting for signatures and expressions. Reading flow: Configuration lookup, URL construction, and superclass initialization follow a natural sequence, interrupted by the unexplained assertions.
Run 3
Code Structure: Imports, class definition, and methods are logically organized, with initialization and serialization separated. Nesting: Mostly shallow, with straightforward conditional branches inside base URL construction. Clarity of intent: Descriptive names, type annotations, and documentation explain the purpose well, but the compound assertion is difficult to parse, and constant-false XOR checks obscure intent. Code length: Functional code is reasonably concise, though dead checks and extensive documentation increase reading overhead. Action granularity: Statements generally perform one action per line; multiline expressions are appropriately formatted. Reading flow: Configuration lookup, URL construction, and superclass initialization follow a natural sequence, but meaningless assertion branches interrupt that flow.