Sample
int-a8bc0d7ce0eb-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.732 | 0–1; higher is more readable |
| Dorn | 0.194 | 0–1; higher is more readable |
| Mi | 0.616 | 0–1; higher is more readable |
| LLOC | 63 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.352 | 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. | 4981.029 | −164.374 |
| Source linesThe number of non-empty source lines. | 141 | +56.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. | 5.05 | −7.575 |
Intercept 8.87 + feature contributions = -106.679 (log-odds).
Score = sigmoid(-106.679) = 0.
| Score | 0.732 |
|---|
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. | 141 | −3.956 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 109 | +3.033 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 108 | −2.057 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 140.854 | +1.559 |
| 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. | 121.972 | −1.501 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 121.944 | +1.163 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.07 | +0.265 |
Intercept 0.07 + feature contributions = -1.424 (log-odds).
Score = sigmoid(-1.424) = 0.194.
| Score | 0.616 |
|---|
| Score | 63 |
|---|
Run 1
The code has severe readability problems, mainly due to obfuscated integer arithmetic in critical methods. Logical structure, comments, and constant naming are reasonably good, but deeply obscure expressions like `final int a = 2; final int b = -1; ... return (exponent == MIN_EXPONENT - (a + b)) ? bits << (c + e) : bits | IMPLICIT_BIT;` destroy clarity and intent. The `bigToDouble` method is extremely difficult to follow: many meaningless single-letter variables (`f`, `g`, `h`, `i`, etc.) are used to encode simple values (e.g., 1), making the code look intentionally obfuscated rather than just complex. Nesting is moderate, but action granularity is inconsistent—some lines perform multiple operations, while others are pointlessly split. Reading flow is severely disrupted by unexplained magic-number arithmetic. The code also lacks explanatory comments for the obfuscated parts. Overall, the structure is acceptable, but the core logic is nearly unreadable despite relatively flat nesting.
Run 2
The code has a clear structure with logical grouping of constants and methods, and comments explain the high-level purpose. However, readability is severely degraded by numerous contrived `final int` declarations (e.g., `final int a = 2; final int b = -1;`) used to compute trivial values like `1` and `-1`. This obscures intent, adds unnecessary length, and breaks the natural reading flow. The `bigToDouble` method suffers from deeply nested conditional logic and long, densely packed boolean expressions that make the rounding logic hard to follow. Action granularity is inconsistent, with some lines performing several operations. While the original domain logic is inherently complex, the artificial obfuscation of simple arithmetic and the dense formatting push this code toward the unreadable end of the scale.
Run 3
The code has a logical class structure and some meaningful constants, but readability is severely undermined by deliberate obfuscation. Numerous local variables like 'a', 'b', 'c' through 'w' with values 2, -1, or 1 are used in trivial arithmetic (e.g., 'a + b' evaluates to 1, 'c + e' to 1, 'n + o' to 1, '(p + q)' to 0), making the intent deeply ambiguous and the expressions far longer than necessary. Nesting is moderate, but the presence of these variables and complex bit-manipulation logic without clear helper abstractions obscures the algorithm. Several comments explain intent, yet the code itself contradicts clarity with redundant computations. The reading flow is disrupted by meaningless variable names and convoluted expressions, making verification difficult. Overall, while the original logical structure might be sound, the inserted 'a...w' variables and redundant arithmetic render the implementation unnecessarily cryptic.
Run 1
Code Structure: The utility class is logically organized into constants and focused methods, though bigToDouble is substantially more complex. Nesting: Mostly flat, with early returns and minimal conditional nesting. Clarity of intent: Descriptive method names and detailed comments explain floating-point operations, but meaningless variables a through w and arithmetic disguising simple constants severely obscure intent. Code length: Numerous unnecessary constant declarations inflate otherwise compact algorithms. Action granularity: Generally one declaration or operation per line, although the rounding condition packs several bitwise checks into a long expression. Reading flow: Method boundaries and explanatory comments provide a natural progression, but repeated artificial arithmetic interrupts that flow and forces readers to mentally simplify expressions. Overall, sound organization and documentation are undermined by deliberate-looking obfuscation and dense numerical logic.
Run 2
Code Structure: Utilities are logically separated into focused methods, with named constants and explanatory comments. Nesting: Mostly flat, with early returns and minimal branching. Clarity of intent: Method names and floating-point explanations help, but meaningless variables a through w and arithmetic disguising simple constants significantly obscure intent. Code length: Numerous unnecessary constant declarations inflate otherwise concise operations. Action granularity: Generally one declaration or operation per line, although the rounding condition combines several dense expressions. Reading flow: Consistent formatting and method organization support navigation, but repeated artificial constants interrupt the mathematical flow and force readers to mentally simplify expressions. Overall, the sound structure and documentation are substantially undermined by avoidable obfuscation.
Run 3
Code Structure: Focused utility methods and grouped constants provide logical organization. Nesting: Mostly flat, with simple branches and early returns. Clarity of intent: Descriptive method names and detailed numerical comments help, but meaningless variables a through w and arithmetic disguising constants obscure straightforward operations. Code length: Numerous unnecessary constant declarations substantially inflate otherwise compact methods. Action granularity: Most statements perform one action, although the rounding predicate combines several bitwise checks into a dense expression. Reading flow: Method boundaries and comments support navigation, but repeated trivial declarations interrupt the algorithm and force readers to mentally simplify expressions. Overall, the sound organization is undermined by artificial complexity in the core calculations.