Sample
int-8096c343d31d-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.801 | 0–1; higher is more readable |
| Dorn | 0.463 | 0–1; higher is more readable |
| Mi | 0.705 | 0–1; higher is more readable |
| LLOC | 19 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.178 | 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. | 1788.323 | −59.015 |
| Source linesThe number of non-empty source lines. | 57 | +22.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.924 | −7.387 |
Intercept 8.87 + feature contributions = -34.731 (log-odds).
Score = sigmoid(-34.731) = 0.
| Score | 0.801 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 52 | +1.061 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 58 | −1.017 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 52 | −0.772 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.845 | +0.758 |
| 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. | 96.914 | −0.44 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 56.776 | +0.384 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.117 | −0.192 |
Intercept 0.07 + feature contributions = -0.148 (log-odds).
Score = sigmoid(-0.148) = 0.463.
| Score | 0.705 |
|---|
| Score | 19 |
|---|
Run 1
The code is highly readable. Structure is logical, with imports, a clear class-level Javadoc, and method implementations grouped naturally. Nesting is minimal; only one conditional block exists in equals(). Intent is clear throughout, especially in equals(), hashCode(), and the concise toString(). Code length is appropriate—no unnecessary lines or bloated logic. Action granularity is mostly one action per line, though the return statement in equals() combines two boolean checks, and the hashCode() expression is dense but still understandable. Reading flow is natural, moving from object comparison to hashing to string representation. The only minor readability issue is the somewhat cryptic constants (a, b, c, d) in hashCode(), which obscure the purpose of returning the same hash code for null keys and values. This could be simplified with a direct return of 0 for null values, but it remains clear enough for experienced Java developers.
Run 2
The code is well-structured with clear separation of methods and logical organization. It implements Entry methods in a flat, readable manner with minimal nesting. Intent is clear through meaningful method names and Javadoc. The equals, hashCode, and toString implementations are concise and idiomatic. One minor readability issue: the hashCode method introduces unnecessary constants (a, b, c, d) that obscure the intent — a simpler ternary with 0 would be clearer. Also, the setValue method silently throws UnsupportedOperationException, which may surprise readers. Overall, the code is highly readable with only small opportunities for improvement.
Run 3
The code is generally readable with a clear logical structure and small, focused methods. It follows common Java conventions and has minimal nesting. Intent is mostly clear, especially in equals and toString. However, the hashCode method is unnecessarily verbose and confusing: it declares constants a, b, c, d that obscure the intent and make the logic harder to follow. A simpler conditional expression or Objects.hashCode would improve clarity. The use of @ParametricNullness annotations is slightly distracting but consistent with Guava's style. Overall, the code is concise and follows good action granularity, but the hashCode implementation and minor annotation noise prevent a higher score.
Run 1
Code Structure: Methods are logically organized around the Map.Entry contract, with clear separation of responsibilities. Nesting: Minimal nesting; equals uses one conditional, while hashCode uses shallow ternary expressions. Clarity of intent: Documentation, standard method names, and annotations establish the purpose, but hashCode introduces cryptic constants a, b, c, and d whose sums merely represent zero. Code length: Most methods are concise; the four constants unnecessarily lengthen hashCode. Action granularity: Each statement performs a single action, although the hashCode return expression combines several operations. Reading flow: Consistent formatting and familiar method implementations support natural reading, but the redundant arithmetic interrupts the flow and obscures otherwise straightforward null handling.
Run 2
Code Structure: Methods are logically separated, with standard overrides and useful documentation. Nesting: Minimal nesting; equals has only one conditional, and other methods are flat. Clarity of intent: Most methods clearly implement Map.Entry behavior, but hashCode introduces meaningless constants a, b, c, and d to represent zero, obscuring straightforward null handling. Code length: Generally concise, although four unnecessary constant declarations lengthen hashCode. Action granularity: Each statement performs one action; the hash expression combines several operations but remains manageable. Reading flow: Method order and consistent formatting support natural reading, though terse local names and artificial arithmetic interrupt the otherwise clear flow.
Run 3
Code Structure: Methods are logically organized around the Map.Entry contract, with clear separation of responsibilities. Nesting: Only one shallow conditional appears in equals; other methods remain flat. Clarity of intent: Documentation, standard method names, and Objects.equals make the purpose clear, but hashCode introduces four unexplained constants whose sums merely represent zero, obscuring straightforward null handling. Code length: Mostly concise, though those constants unnecessarily lengthen hashCode. Action granularity: Statements generally perform one action per line; the hashCode return combines several operations into a dense expression. Reading flow: Consistent formatting and method ordering support natural reading, but terse variable names and artificial arithmetic interrupt comprehension in hashCode.