Sample
int-d36ef0439ddd-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.65 | 0–1; higher is more readable |
| Dorn | 0.429 | 0–1; higher is more readable |
| Mi | 0.48 | 0–1; higher is more readable |
| LLOC | 19 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.599 | 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. | 2272.982 | −75.008 |
| Source linesThe number of non-empty source lines. | 90 | +36 |
| 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.984 | −7.477 |
Intercept 8.87 + feature contributions = -37.615 (log-odds).
Score = sigmoid(-37.615) = 0.
| Score | 0.65 |
|---|
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. | 91 | −2.186 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 70 | +1.684 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 70 | −1.185 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 89.78 | +0.845 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97.912 | +0.775 |
| 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. | 98.901 | −0.524 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.234 |
Intercept 0.07 + feature contributions = -0.287 (log-odds).
Score = sigmoid(-0.287) = 0.429.
| Score | 0.48 |
|---|
| Score | 19 |
|---|
Run 1
The code is generally readable with clear class hierarchy and purpose (immutable sorted list view). Documentation comments and TODO items help explain intent. Structure is logical with related methods grouped together. However, readability is affected by several factors: abbreviated method names (com, sub, spl, index, last, con, write) that obscure their meaning; inconsistent parameter naming (tar, tar2, tar3); multiple annotations on single lines creating visual clutter; and incomplete comments referencing TODO fixes. The nesting is minimal which is good, and action granularity is reasonable. The code is concise, though several overrides exist primarily for performance optimization which adds complexity. The reading flow suffers from scattered annotation blocks and abbreviated names requiring the reader to infer purpose from context rather than clear naming conventions.
Run 2
The code is generally structured and follows consistent patterns, but suffers from poor naming conventions that obscure intent. Method names like 'com()', 'index()', 'last()', 'con()', 'sub()', 'spl()', and 'write()' are overly abbreviated and fail to clearly convey their purpose, reducing readability. The code is relatively flat with minimal nesting, which is positive, and actions are mostly separated per line. Comments provide some context but are incomplete or reference TODOs that add confusion. The class hierarchy and use of annotations are standard, but the inconsistent and cryptic abbreviations throughout the code significantly hinder readability. While the overall organization is logical, the unclear naming and incomplete documentation make the code harder to follow than necessary.
Run 3
The code is generally well-structured within a single class, with clear logical organization by method. Nesting is minimal, and each method performs a single, clear action. Variable names like 'ind' and 'tar' are overly abbreviated and reduce clarity. Several method names (e.g., 'com', 'index', 'last', 'con', 'sub', 'spl') are non-standard and obscure intent, likely due to a rename in the provided snippet. Comments are helpful, explaining non-obvious performance considerations. The class-level Javadoc is missing from this snippet but referenced. The code could be more readable with descriptive method names that match standard Java conventions.
Run 1
Code Structure: The class is logically organized into small, focused methods, though annotations and TODO comments add clutter. Nesting: Methods are flat, with no deeply nested control flow. Clarity of intent: The class documentation and comparator-related comments help, but abbreviated names such as com, index, last, con, sub, spl, and write obscure familiar operations; backing2 and tar2/tar3 are also weak names. Some comments reference conventional method names rather than the actual declarations, increasing confusion. Code length: Implementations are concise, although lengthy compatibility comments interrupt otherwise compact code. Action granularity: Most lines perform one clear action; the conditional return and chained construction remain manageable. Reading flow: Delegation and related lookup methods follow a natural sequence, but inconsistent indentation in write(), dense annotations, and cryptic naming reduce fluency.
Run 2
Code Structure: Logically organized into small overrides around a backing sorted set, though annotations and lengthy TODOs add clutter. Nesting: Very flat, with no nested control flow. Clarity of intent: Class documentation and comparator-consistency comments help, but abbreviated method names (com, index, last, con, sub, spl, write) and parameters (backing2, tar2, tar3, ind) obscure meaning; comments referencing different method names increase confusion. Code length: Implementations are concise, although maintenance comments occupy substantial space. Action granularity: Generally one operation per statement, with a compact, understandable conditional return. Reading flow: Delegation and lookup methods follow a sensible sequence, but annotation blocks, inconsistent indentation on write(), and cryptic naming interrupt otherwise straightforward reading.
Run 3
Code Structure: Logically organized into small overrides, with delegation keeping responsibilities clear. Nesting: Very flat; no nested control flow and only a simple conditional expression. Clarity of intent: Comments explain comparator consistency and performance concerns, but abbreviated names such as com, con, spl, tar, and backing2 obscure meaning. Comments referencing indexOf and lastIndexOf do not match the actual method names, creating confusion. Code length: Methods are concise, although lengthy compatibility comments and annotations add visual overhead. Action granularity: Statements generally perform one action per line; chained calls and the conditional return remain manageable. Reading flow: Consistent method layout mostly supports natural reading, but cryptic naming, framework-specific details, and inconsistent indentation on write interrupt it.