Sample
int-613b51616edc-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.853 | 0–1; higher is more readable |
| Dorn | 0.45 | 0–1; higher is more readable |
| Mi | 0.279 | 0–1; higher is more readable |
| LLOC | 20 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.48 | 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. | 1873.05 | −61.811 |
| Source linesThe number of non-empty source lines. | 77 | +30.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.841 | −7.262 |
Intercept 8.87 + feature contributions = -29.402 (log-odds).
Score = sigmoid(-29.402) = 0.
| Score | 0.853 |
|---|
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. | 77 | −1.69 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 47 | +0.889 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 91.128 | +0.666 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 76.871 | +0.665 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 47 | −0.658 |
| 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.936 | −0.568 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.427 |
Intercept 0.07 + feature contributions = -0.2 (log-odds).
Score = sigmoid(-0.2) = 0.45.
| Score | 0.279 |
|---|
| Score | 20 |
|---|
Run 1
The code is generally well-structured, with clear method separation, Javadoc, and single-action lines, but it has serious readability problems. The class follows a logical layout and methods like `initialize` and `newProxy` are clear and straightforward. However, the `getPackageName(String)` method is unnecessarily obfuscated: it introduces meaningless constants `a`, `b`, `c`, `d`, and uses arithmetic like `(a + b)` and `(c + d)` where a direct check for `lastDot < 0` and a simple substring would be far clearer. This injects ambiguity and hurts clarity of intent. Nesting is flat and method length is mostly concise, but the gratuitous complexity in one method drags down the score. Action granularity is adequate overall, but the weird constant dance violates the principle of clear intent. Reading flow is mostly natural, but the affected method makes the reader stop and puzzle over trivial logic.
Run 2
The code is generally well-structured and readable, with a clear class purpose, concise methods, and helpful Javadoc on public APIs. However, the `getPackageName(String)` method introduces unnecessary local variables (`a`, `b`, `c`, `d`) that obscure intent and reduce clarity. The arithmetic on these constants makes the logic harder to follow than a direct comparison like `lastDot < 0`. Nesting is minimal, and each method generally performs one logical action, but the artificial complexity of the variable names undermines clarity. The `initialize` and `newProxy` methods are clean, with clear intent and appropriate use of helper methods like `checkNotNull` and `checkArgument`. Overall, the code is readable but could be improved by simplifying the package name parsing logic and removing redundant local variables.
Run 3
The code is generally well-structured with clear class-level organization and good Javadoc comments explaining intent. It is relatively flat, with only one nested try-catch. However, the getPackageName(String) method significantly hurts readability: it introduces meaningless constants (a, b, c, d) and a convoluted expression that obscures the simple logic of checking if a dot exists and returning the substring. This is unnecessarily long and ambiguous compared to a straightforward implementation. Action granularity is mostly fine but mixed in that method. The rest of the code (initialize, newProxy) is clear, concise, and readable, but the problematic method drags down the overall score.
Run 1
Code Structure: Well-organized utility class with focused methods, adjacent overloads, and a private constructor. Nesting: Mostly flat; the loop and try/catch in initialize add only modest nesting. Clarity of intent: Descriptive method names and thorough documentation explain the behavior, but meaningless constants a, b, c, and d obscure simple zero comparisons and substring indexing. Code length: Generally concise, although those four constants introduce unnecessary lines and arithmetic. Action granularity: Statements generally perform one action each; the multiline proxy creation remains a single coherent operation. Reading flow: Methods follow a natural sequence, and consistent formatting supports scanning. The redundant arithmetic in getPackageName interrupts otherwise straightforward reading.
Run 2
Code Structure: Well-organized utility class with focused methods and a private constructor. Nesting: Shallow overall; the loop and try/catch in initialize are straightforward. Clarity of intent: Descriptive method names and useful documentation explain behavior, but meaningless constants a, b, c, and d obscure simple zero values in getPackageName. Code length: Mostly concise, though those four declarations and arithmetic expressions are unnecessary. Action granularity: Statements generally perform one action per line; the ternary remains manageable. Reading flow: Consistent formatting and logical method grouping support natural reading, with the artificial arithmetic being the main interruption.
Run 3
Code Structure: Well-organized utility class with focused methods and a private constructor. Nesting: Shallow overall; the loop containing try/catch is easy to follow. Clarity of intent: Descriptive method names and thorough documentation explain the reflection operations, but meaningless variables a, b, c, and d obscure simple zero values in getPackageName. Code length: Generally concise, although those four constants add unnecessary lines and arithmetic. Action granularity: Each statement performs a distinct action; the multiline proxy construction remains a single coherent operation. Reading flow: Consistent formatting and method-level documentation support natural reading, with the artificial constant calculations being the main interruption.