Sample
int-6d3a0cd47817-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.686 | 0–1; higher is more readable |
| Dorn | 0.612 | 0–1; higher is more readable |
| Mi | 0.672 | 0–1; higher is more readable |
| LLOC | 18 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.374 | 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. | 1493.122 | −49.273 |
| Source linesThe number of non-empty source lines. | 56 | +22.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.979 | −7.469 |
Intercept 8.87 + feature contributions = -25.472 (log-odds).
Score = sigmoid(-25.472) = 0.
| Score | 0.686 |
|---|
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. | 57 | −0.982 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 38 | +0.577 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82.912 | +0.533 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 38 | −0.451 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 55.786 | +0.37 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.078 | +0.187 |
| 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. | 82.982 | +0.15 |
Intercept 0.07 + feature contributions = 0.455 (log-odds).
Score = sigmoid(0.455) = 0.612.
| Score | 0.672 |
|---|
| Score | 18 |
|---|
Run 1
The code is severely obfuscated with meaningless constant variables (a, b, c, d, e, f, g, h) used to perform trivial arithmetic. This destroys readability: 'params.length - (a + b)' obscures the intent of checking for suspending functions, 'params.length == (c + d)' hides a zero-length check, and 'params.length == (e + f)' hides a single-parameter check. The naming gives no semantic meaning, forcing readers to trace each constant. While the overall structure is logical and nesting is minimal, clarity of intent is nearly non-existent due to this deliberate obfuscation. Action granularity suffers because each simple operation is spread across multiple cryptic lines. Reading flow is interrupted as readers must decode arithmetic instead of understanding caching logic. The original Spring Framework code is normally clear, but this modified version is unreadable for any maintainer.
Run 2
The code structure is clear, with a logical public API and helper method, but the variable declarations (a, b, c, d, e, f, g, h) obscure intent. Nesting is shallow, which helps readability, and action granularity is acceptable. However, expressions like `params.length - (a + b)` are unnecessarily confusing. The arithmetic constants (e.g., `c + d` for 0) are a major readability problem, replacing simple literals with cryptic calculations. The Javadoc is helpful, but the code inside methods does not match its clarity. Reading flow suffers because the reader must decode minor arithmetic just to understand array indices or length comparisons. Overall, the code would be significantly clearer with direct literals and fewer intermediate variables, but it remains reasonably structured and concise.
Run 3
This code demonstrates severely degraded readability through deliberate obfuscation of basic integer literals. Simple constants like 0, 1, and 2 are replaced with arithmetic expressions using meaningless variable names (a, b, c, d, etc.), forcing the reader to mentally compute each value. The variable names convey absolutely no semantic meaning and the expressions (e.g., params.length - (a + b) where a=2 and b=-1) hide trivial operations. Each simple operation is spread across multiple lines with absurd action granularity, inflating code length dramatically. The intent of handling Kotlin suspending functions is obscured behind this obfuscation. While the package structure and general logical organization follow Spring conventions, these positive aspects are completely overwhelmed by the perverse misuse of variables for basic integers, making the code practically unreadable. Only method names and class-level Javadocs offer any clarity, serving as the sole lifelines for understanding this code.
Run 1
Code Structure: Two focused methods logically separate parameter adjustment from key creation, but unnecessary constants clutter both. Nesting: Mostly flat with early returns and only one nested conditional. Clarity of intent: Documentation explains key generation, but meaningless names a through h and arithmetic expressions obscure straightforward checks for zero or one parameter and index zero. Code length: Artificial constant declarations make otherwise compact logic unnecessarily long. Action granularity: Statements generally perform one action per line, although the ternary return combines suspension detection, array copying, and key generation. Reading flow: The empty, single, and multiple-parameter cases follow a natural sequence, but repeated arithmetic decoding interrupts comprehension.
Run 2
Code Structure: Two focused methods logically separate parameter preprocessing from key generation. Nesting: Mostly shallow, with only one nested conditional. Clarity of intent: Documentation explains the purpose, but meaningless variables a–h and arithmetic expressions obscure simple values such as 0 and 1. The Kotlin-specific parameter adjustment also lacks an explanatory comment. Code length: Unnecessary constant declarations make otherwise concise logic longer and harder to scan. Action granularity: Statements generally perform one action per line, although the ternary combines condition checking, array copying, and delegation. Reading flow: Early returns provide a natural progression through empty, single-value, and multiple-value cases, but repeated arithmetic indirection interrupts that flow.
Run 3
Code Structure: Two focused methods and early returns provide logical organization. Nesting: Mostly shallow, with only one nested conditional; the ternary is manageable. Clarity of intent: Documentation explains key generation well, but meaningless variable names a–h and arithmetic expressions obscure simple constants, array indexing, and removal of the Kotlin continuation parameter. Code length: Unnecessary constant declarations make a short algorithm substantially longer. Action granularity: Each statement generally performs one action, although the return expression combines suspension detection, array copying, and key generation. Reading flow: The empty, single-parameter, and fallback cases follow a natural sequence, but repeated arithmetic indirection interrupts comprehension. Replacing these expressions with direct literals and clarifying the Kotlin-specific adjustment would substantially improve readability.