Sample
int-a90c9c0a419f-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.811 | 0–1; higher is more readable |
| Dorn | 0.462 | 0–1; higher is more readable |
| Mi | 0.745 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs |
| BTTF | 0.526 | 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. | 1567.161 | −51.716 |
| Source linesThe number of non-empty source lines. | 53 | +21.2 |
| 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.957 | −7.436 |
Intercept 8.87 + feature contributions = -29.082 (log-odds).
Score = sigmoid(-29.082) = 0.
| Score | 0.811 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 48 | +0.923 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 54 | −0.876 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.111 | +0.73 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 48 | −0.681 |
| 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.889 | −0.439 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 52.755 | +0.328 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.118 | −0.207 |
Intercept 0.07 + feature contributions = -0.151 (log-odds).
Score = sigmoid(-0.151) = 0.462.
| Score | 0.745 |
|---|
| Score | 15 |
|---|
Run 1
The code is logically organized but contains several readability issues. The class has a clear purpose and methods are separated appropriately, but method names are abbreviated inconsistently ('equ', 'hash', 'to', 'get2'), which obscures intent and deviates from standard Java conventions. The instanceof pattern with casting is slightly verbose but acceptable. Nesting is minimal, which is good. Code length is concise. Action granularity is reasonable—one operation per line for the most part. Reading flow is hampered by non-standard naming and incomplete Javadoc on some methods. The structure is flat and modular, but clarity of intent suffers significantly due to the abbreviated method names. With conventional naming (equals, hashCode, toString, getValue), the score would be 18 or higher. As written, it requires extra cognitive effort to map abbreviated names to their intended semantics, especially for readers unfamiliar with the codebase.
Run 2
The code has a clear, logical structure with a class-level Javadoc, annotated overrides, and a flat hierarchy with minimal nesting. However, it contains several naming issues that harm clarity: methods are incorrectly named 'get2', 'equ', 'hash', and 'to' instead of 'getValue', 'equals', 'hashCode', and 'toString', making the intent ambiguous. The method 'set' also lacks a Javadoc explaining the unsupported operation. Action granularity is mostly one action per line, and reading flow is natural within methods. Code length is concise but the naming mistakes undermine readability. The 'hash' method uses a ternary expression that is slightly dense but still acceptable. Overall, structure and flow are good, but naming errors and missing documentation reduce clarity significantly.
Run 3
The code shows reasonable structure with clear method separation and flat nesting, but has several readability issues. The method names 'equ', 'hash', 'to', and 'get2' are non-standard and ambiguous - they should be 'equals', 'hashCode', 'toString', and 'getValue'. The 'equ' method has unnecessary nested logic that could be flattened with early returns. Type casting is done in one line mixed with assignment. The abstract class structure is clear, and each method performs one action, but the weird naming creates confusion about intent. The code is concise but the abbreviated names damage readability despite good formatting and minimal nesting.
Run 1
Code Structure: Methods are logically grouped in a compact class, with annotations and documentation providing context. Nesting: Very shallow; only one conditional block appears. Clarity of intent: The documentation explains the intended Entry behavior, but names such as get, get2, equ, hash, to, and tha obscure meaning. These renamed methods also conflict with the Entry contract and @Override annotations, creating confusion. Code length: Concise, with little unnecessary code. Action granularity: Statements generally perform one action per line; the compound equality and hash expressions remain manageable. Reading flow: The progression from accessors to mutation, equality, hashing, and string conversion is natural, but misleading method names interrupt comprehension.
Run 2
Code Structure: Methods are logically grouped in a compact abstract class, though the renamed methods do not match Entry's interface or the documented Object overrides. Nesting: Minimal, with only one conditional block. Clarity of intent: Documentation and familiar equality/hash patterns help, but get, get2, equ, hash, and to obscure standard method meanings; tha is also unclear. Code length: Concise, with little unnecessary code. Action granularity: Generally one action per line; compound return expressions remain manageable. Reading flow: Natural progression from accessors to mutation, equality, hashing, and string conversion, but misleading @Override annotations and inconsistent naming interrupt understanding.
Run 3
Code Structure: Methods are logically grouped in a small class, with annotations and documentation consistently placed. Nesting: Only one shallow conditional keeps control flow simple. Clarity of intent: The documentation explains the intended Entry behavior, but names such as get, get2, equ, hash, to, and tha obscure meaning. These renamed methods also do not match the Entry/Object methods implied by @Override, making the contract confusing. Code length: The implementation is concise without substantial redundancy. Action granularity: Statements generally perform one action per line; the combined hash expression is compact but slightly harder to scan. Reading flow: Method ordering is natural, although ambiguous names repeatedly force readers to infer key/value roles and intended standard methods.