Sample
int-a90e37dd27c3-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.05 | 0–1; higher is more readable |
| Scalabrino | 0.619 | 0–1; higher is more readable |
| Dorn | 0.764 | 0–1; higher is more readable |
| Mi | 0.729 | 0–1; higher is more readable |
| LLOC | 12 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.582 | 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. | 872.167 | −28.782 |
| Source linesThe number of non-empty source lines. | 60 | +24 |
| 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.683 | −7.024 |
Intercept 8.87 + feature contributions = -2.936 (log-odds).
Score = sigmoid(-2.936) = 0.05.
| Score | 0.619 |
|---|
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. | 58 | −1.017 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.721 | +0.756 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 40 | +0.646 |
| 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. | 100 | −0.57 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.049 | +0.463 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 59.941 | +0.428 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.173 (log-odds).
Score = sigmoid(1.173) = 0.764.
| Score | 0.729 |
|---|
| Score | 12 |
|---|
Run 1
The code is well-structured and organized as an interface, with method names that generally convey intent (e.g., adjacent, incident, in, out, remove, add). Documentation is helpful for most methods, and the overall length is concise with flat structure. However, readability is hindered by inconsistent and abbreviated parameter names like 'nod', 'edg', 'edg2', 'is', 'nod2', 'is2', 'edg3', 'edg4', 'edg5', and 'nod3'. These names are ambiguous and force the reader to rely on comments to understand what each parameter represents. The method names 'adjacent2', 'remove2', and 'add2' also lack clarity, as the '2' suffix does not convey meaning without inspecting the corresponding comment. This reduces the self-documenting quality of the code and hurts the natural reading flow.
Run 2
The code has a clear overall structure as an interface with logically grouped methods, and the method declarations are concise with one action per line. However, readability suffers from poor naming choices: method names like 'adjacent2', 'add2', 'remove2' obscure intent, and parameters like 'nod', 'edg', 'is' are ambiguous abbreviations. The method signatures do not explain the difference between 'remove' and 'remove2' without reading the docs, and 'is'/'is2' parameters are especially unclear. Some Javadoc is present but lacks consistency and detail for several methods. Nesting is flat, which is good, and the reading flow is acceptable, but the unclear naming and vague parameters significantly reduce overall readability. The code could be improved with descriptive names such as 'adjacentNodeViaEdge', 'removeIncomingEdge', and boolean parameters like 'isSelfLoop'.
Run 3
The code is generally readable but has some flaws. The interface has clear purpose and logical structure, with methods organized by adjacent, incident, in/out, and edge manipulation. However, parameter names are poor: 'nod', 'edg', 'edg2', 'edg3', 'edg4', 'edg5', 'nod2', 'nod3', 'is', 'is2' are cryptic and reduce clarity. Javadoc quality is inconsistent—some methods have no documentation (adjacent(), pre(), suc(), incident(), in(), out()), while others have overly brief or vague docs. Method names like 'adjacent2()', 'remove2()', 'add2()' are ambiguous and don't clearly convey intent. The interface is concise (good), not deeply nested, and action granularity is fine. Overall structure is sound but naming significantly impacts readability.
Run 1
Code Structure: The interface is logically organized, grouping node queries, edge queries, removals, and additions. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The main weakness is ambiguous naming, including pre, suc, adjacent2, remove2, and add2, alongside cryptic parameters such as edg4 and is2. Documentation helps explain behavior, but its parameter references do not match the actual names, reducing clarity. Code length: The interface is concise, with little unnecessary content. Action granularity: Each method declaration occupies a separate line, cleanly separating operations. Reading flow: Consistent formatting and method grouping support natural reading, but readers must repeatedly consult comments to distinguish incoming and outgoing operations.
Run 2
Code Structure: The interface is logically organized, grouping adjacency queries, edge queries, removals, and additions. Nesting: Flat declarations with no nested control flow make scanning easy. Clarity of intent: The main weakness is abbreviated or numbered names such as pre, suc, adjacent2, remove2, edg4, and is2. Documentation helps explain operations, but references to edge, node, and isSelfLoop do not match actual parameter names, reducing clarity. Code length: Concise and appropriate for an interface, without unnecessary implementation detail. Action granularity: Each method declaration represents a single operation, and annotations are clearly separated. Reading flow: Consistent spacing and query-before-mutation ordering support natural reading, but ambiguous names force readers to consult comments repeatedly.
Run 3
Code Structure: The interface logically groups adjacency queries and edge mutations, with consistent formatting. Nesting: It is flat, with no nested control flow. Clarity of intent: The main weakness is abbreviated and numbered names such as pre, suc, adjacent2, remove2, edg4, and is2. These obscure distinctions between incoming and outgoing operations. Documentation helps, but references parameter names such as edge, node, and isSelfLoop that do not match the declarations. Code length: The interface is concise without obvious redundancy. Action granularity: Each declaration occupies its own line and represents a single operation. Reading flow: Query methods followed by mutation methods provide a natural sequence, but ambiguous names and mismatched documentation force readers to infer meaning.