Sample
pyint-2f8663171740-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.615 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.263 | 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. | 861.123 | −28.417 |
| Source linesThe number of non-empty source lines. | 26 | +10.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.748 | −7.122 |
Intercept 8.87 + feature contributions = -16.269 (log-odds).
Score = sigmoid(-16.269) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 59.926 | +1.127 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.109 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 27 | +0.08 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 25.721 | −0.05 |
Intercept 0.07 + feature contributions = 0.518 (log-odds).
Score = sigmoid(0.518) = 0.627.
| Score | 0.615 |
|---|
| Score | 22 |
|---|
Run 1
The code is poorly readable due to injected nonsensical conditional blocks (e.g., 'if ((0x13d ^ 0x13d) != 0): raise AssertionError()') that add no functional value and obscure intent. While the methods are short and logically organized, the presence of dead code and zero-value checks breaks reading flow and clarity. Nesting is low, and each method performs roughly one action, but the overall structure is undermined by redundant imports and placeholder code. The class inherits from JSONTag without that class being defined in the snippet, increasing ambiguity. The use of 'tag = to_json' aliasing is concise but unconventional and may confuse readers unfamiliar with custom serialization patterns. Overall, the code appears obfuscated or auto-obfuscated, drastically reducing its readability despite structurally simple components.
Run 2
The code is mostly readable in terms of structure and intent, but it is marred by several issues that significantly reduce readability. The class is small and flat, and the purpose of serialization is clear. However, there are unnecessary type-ignoring comments, a redundant 'tag = to_json' alias, and dead code branches (e.g., `if ((0x13d ^ 0x13d) != 0): raise AssertionError()`) that add noise and confusion. The action granularity is reasonable, but the reading flow is disrupted by these artifacts. The code is concise, but not clean.
Run 3
This code is functionally simple but practically unreadable due to dead code and misleading constructs. The class structure is minimal, but `tag = to_json` creates redundancy without clarity. Every method begins with `if ((0x13d ^ 0x13d) != 0): raise AssertionError()` — a tautological false condition that adds noise and confuses intent. The imports are numerous and unused (e.g., `b64decode`, `UUID`, `Markup`, `http_date`), bloating the file. The nesting is shallow, which is good, but the dead code inside methods inflates length and breaks reading flow. Action granularity is mostly one action per line, but the assertions add pointless steps. Intent is obscured by the strange bitwise checks and unused imports; readers must spend effort determining whether they matter. Overall, the code is technically concise in core logic but padded with confusing artifacts, making it hard to read and maintain.
Run 1
Code Structure: The class and its methods are logically organized, but numerous unused imports and an undefined JSONTag base class in the snippet distract from the core functionality. Nesting: Very shallow; the conditional blocks and list comprehension are easy to follow. Clarity of intent: List checking and item serialization are clear, but the hexadecimal XOR conditions are always false and introduce confusing dead code. The tag alias is concise but its role is not explained. Code length: The useful implementation is short, yet unnecessary assertion blocks and imports substantially inflate it. Action granularity: Each line generally performs one action, with a straightforward comprehension for serialization. Reading flow: Conventional method layout supports natural reading, but irrelevant guards interrupt both methods and the import-heavy opening delays the actual logic.
Run 2
Code Structure: The class is logically organized into small methods, but numerous unused imports and an undefined JSONTag base class in the snippet distract from its structure. Nesting: Shallow conditionals and a straightforward comprehension are easy to follow. Clarity of intent: List detection and item serialization are clear, but always-false XOR checks obscure intent and add meaningless defensive-looking code. Code length: The methods are concise, though dead checks and unused imports unnecessarily lengthen the snippet. Action granularity: Each statement performs one action, and the comprehension expresses a simple transformation. Reading flow: Method names and type annotations support natural reading, but the unexplained assertions interrupt it, and the tag alias requires a small interpretive step.
Run 3
Code Structure: The class and methods are logically organized, but numerous unused imports and an undefined JSONTag base class distract from the small implementation. Nesting: Shallow, with only one conditional level per method. Clarity of intent: List checking and item serialization are clear, but constant-false XOR checks obscure intent and add meaningless assertions. Code length: The functional code is concise, although irrelevant imports and dead checks unnecessarily inflate it. Action granularity: Statements generally perform one action per line; the list comprehension is compact and readable. Reading flow: Method names and type annotations support natural reading, but unexplained dead code interrupts the flow, and the tag alias requires a small conceptual jump.