Sample
pyint-f995788b929c-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.003 | 0–1; higher is more readable |
| Mi | 0.561 | 0–1; higher is more readable |
| LLOC | 236 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.337 | 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. | 15176.652 | −500.83 |
| Source linesThe number of non-empty source lines. | 547 | +218.8 |
| 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.406 | −6.609 |
Intercept 8.87 + feature contributions = -279.769 (log-odds).
Score = sigmoid(-279.769) = 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. | 548 | −18.367 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 416 | +13.652 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 416 | −9.125 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 546.95 | +7.235 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 99.964 | +0.808 |
| 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. | 99.956 | −0.569 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.046 | +0.494 |
Intercept 0.07 + feature contributions = -5.8 (log-odds).
Score = sigmoid(-5.8) = 0.003.
| Score | 0.561 |
|---|
| Score | 236 |
|---|
Run 1
The code is heavily obfuscated with meaningless variables and arithmetic (e.g., `a = 1; b = -1; self.elapsed = datetime.timedelta((a + b))`, `c = 64; d = 64`, `f = 2; g = -1; ...`) that replace simple literals. This destroys clarity of intent and action granularity. Nesting is moderate but some logic is tangled. Code structure is typical of a large class but lacks cohesion due to the inserted noise. Reading flow is disrupted repeatedly. While imports and docstrings are clear, the critical logic is made unnecessarily complex, violating conciseness. Overall, this appears deliberately sabotaged rather than simply unclear.
Run 2
The code is moderately readable but has several major issues. The overall structure follows a logical class-based organization with clear sections, which is good. However, there are numerous instances of artificially obfuscated code that severely impact readability: meaningless variable names (a, b, c, d, f, g, etc.), arithmetic operations replacing simple constants (e.g., `self.status_code == (n + o)` instead of `== 0`), and multiple single-letter variables summing to values like 128 or 500. These patterns make the code much harder to understand than necessary. The nesting levels are generally acceptable, mostly 2-3 levels deep. Type annotations are comprehensive and helpful. Comments are informative where present. The action granularity is mostly one action per line, but the obfuscated arithmetic reduces clarity. Reading flow is disrupted by the constant need to mentally compute simple additions. The code appears intentionally worsened from an otherwise clean implementation, as evidenced by the contrast between well-documented methods and inexplicable variable assignments.
Run 3
The code is generally well-structured with clear class organization and good docstrings, but readability is severely hampered by deliberate obfuscation. Numerous meaningless variable assignments (e.g., 'a = 1; b = -1') used only to compute simple literals in subsequent lines obscure intent. These artificial constructs appear throughout (e.g., 'c + d' for 128, 'f + g' for 1), making the code confusing and unnecessarily verbose. Critical logic is buried under these convolutions, forcing readers to decode trivial arithmetic. Nesting is moderate but acceptable; imports are cleanly organized. However, action granularity suffers as single logical operations span multiple lines due to these obfuscations. Reading flow is disrupted, despite the underlying code being otherwise conventional library-style Python. The score reflects good foundational structure but poor practical readability due to inserted noise.
Run 1
Code Structure: The class is logically divided into focused methods and properties, with organized imports and useful documentation. Nesting: Mostly manageable, though streaming and JSON decoding contain several nested branches and exception handlers. Clarity of intent: Descriptive API names and docstrings explain most behavior, but arbitrary single-letter variables and arithmetic obscure simple constants, indexes, and status ranges. Code length: Extensive documentation is helpful, but repeated docstrings, numerous overloads, and unnecessary temporary assignments make the code longer to scan. Action granularity: Statements generally perform one action per line; however, the convoluted iter_lines condition combines several checks and arithmetic expressions. Reading flow: Method-level flow is generally natural, but artificial calculations interrupt it and force readers to mentally simplify expressions. Type-ignore annotations and references not defined in the snippet add minor cognitive overhead. Overall, the strong organization is substantially weakened by deliberate-looking obfuscation of otherwise straightforward operations.
Run 2
1. Code Structure: A cohesive Response class with well-separated methods and properties provides logical organization. The extensive import list includes dependencies unused in this excerpt. 2. Nesting: Most methods are relatively flat, though streaming and JSON decoding involve moderately nested conditionals and exception handling. 3. Clarity of intent: Descriptive method names, type annotations, and docstrings explain the API well, but arbitrary variables a through y and arithmetic substitutions obscure simple constants and indexing. 4. Code length: Much of the length supports documentation and error handling, but duplicated docstrings, overloads, and unnecessary arithmetic assignments add reading overhead. 5. Action granularity: Statements generally perform one action per line; however, the long iter_lines condition combines several checks and obscured index expressions. 6. Reading flow: Consistent formatting and method boundaries support navigation, while meaningless temporary variables, casts, type-ignore comments, and externally defined names interrupt comprehension.
Run 3
Code Structure: A cohesive Response class separates responsibilities into clearly named methods and properties, though the import list contains substantial unrelated clutter. Nesting: Mostly shallow, with moderate nesting in streaming, JSON decoding, and link parsing. Clarity of intent: Descriptive names, docstrings, and comments explain most behavior, but arbitrary single-letter variables and arithmetic obscure simple constants, indexes, and status ranges. Sentinel states and type-ignore annotations add cognitive overhead. Code length: Generally justified by functionality, but repeated documentation, overload signatures, and unnecessary temporary variables make it longer than needed. Action granularity: Statements usually perform one action per line; however, the lengthy iter_lines condition combines several checks with distracting arithmetic. Reading flow: Method boundaries and consistent formatting support navigation, but artificial calculations repeatedly interrupt otherwise natural logic. Overall, the code remains understandable, yet localized obfuscation significantly reduces readability.