Sample
int-abaff656eb18-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.604 | 0–1; higher is more readable |
| Dorn | 0.413 | 0–1; higher is more readable |
| Mi | 0.449 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.527 | 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. | 2377.446 | −78.456 |
| Source linesThe number of non-empty source lines. | 97 | +38.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.98 | −7.47 |
Intercept 8.87 + feature contributions = -38.256 (log-odds).
Score = sigmoid(-38.256) = 0.
| Score | 0.604 |
|---|
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. | 98 | −2.434 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 77 | +1.926 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 77 | −1.346 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 96.85 | +0.944 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.99 | +0.76 |
| 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.939 | −0.525 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.071 | +0.253 |
Intercept 0.07 + feature contributions = -0.351 (log-odds).
Score = sigmoid(-0.351) = 0.413.
| Score | 0.449 |
|---|
| Score | 22 |
|---|
Run 1
The code has reasonable class structure and comments, but contains a bizarre stray block in the comparator() method: an empty while loop that serves no purpose. This significantly harms clarity. The javadoc and method-level comments are helpful, but some comments are verbose or contain outdated TODOs. The code is mostly flat with minimal nesting, but the stray block adds confusion. Method granularity is acceptable, but the redundant writeReplace override feels unnecessary. Reading flow is disrupted by the dead code block and inconsistent formatting. Overall, the structure and intent are mostly clear, but the stray code makes it difficult to trust or understand the implementation.
Run 2
The code is largely unreadable due to severe structural flaws. There is an inexplicable, empty while-loop block inside the comparator() method that serves no purpose and disrupts the logical flow, making the intent ambiguous. Nesting is not deeply nested in most methods, but the malformed block creates confusion. The class structure is mostly organized with proper annotations and method overrides, yet the anomalous block breaks cohesion. Code length is reasonable but unnecessarily inflated by the dead loop. Action granularity is inconsistent: most methods have one clear action per line, but the stray block violates this. Reading flow is severely impaired—the reader encounters an arbitrary loop with no comments or rationale, forcing them to question its presence. While some methods include helpful comments (e.g., performance notes), they cannot compensate for the glaring mistake. The override of writeReplace is also poorly formatted with inconsistent indentation. Overall, the presence of non-functional code and formatting inconsistencies makes this extremely hard to read and trust.
Run 3
The code is generally well-structured and readable, with clear class purpose and reasonable method organization. It uses inheritance effectively and maintains concise methods with good action granularity. However, there is a significant issue: the `comparator()` method contains a stray block with an unused while loop (`int remainingSteps = 3; while (remainingSteps > 0) { remainingSteps--; }`) that appears to be leftover debugging code, which harms clarity and intent. The code also includes several long comments and TODOs that, while informative, add some noise. Nesting is mostly flat except for the ternary in `indexOf` and the chained call in `subListUnchecked`, which are acceptable but slightly reduce readability. Annotations are stacked clearly, and method names are descriptive. Overall, the code is readable but would score higher if the extraneous loop were removed and comments were tightened.
Run 1
Code Structure: Methods are logically organized around sorted-list operations, although comparator() contains an unrelated countdown block. Nesting: Most methods are flat; the unnecessary block and loop introduce avoidable nesting. Clarity of intent: Descriptive names, overrides, and comments explain delegation, lookup behavior, and compatibility constraints, but the countdown has no apparent purpose. Code length: Methods are generally concise; the countdown and lengthy TODO comments add distracting material. Action granularity: Statements mostly perform one action per line, and multiline calls are clearly formatted. Reading flow: Organization and formatting are mostly consistent, but the poorly indented countdown block and writeReplace() declaration interrupt the flow.
Run 2
Code Structure: Well-organized class with small, focused overrides, but comparator() contains an unrelated countdown block. Nesting: Mostly flat; the unnecessary block and while loop introduce avoidable nesting. Clarity of intent: Descriptive method names and comments explain delegation, lookup complexity, and comparator consistency; the countdown has no apparent purpose. Code length: Implementation is concise overall, although the countdown and lengthy compatibility TODOs add clutter. Action granularity: Statements generally perform one action per line, and multiline calls are formatted clearly. Reading flow: Methods follow a coherent progression, but inconsistent indentation in comparator() and writeReplace(), plus the extraneous loop, interrupt an otherwise natural flow.
Run 3
Code Structure: Methods are logically separated and focused, but comparator() contains an unrelated countdown block. Nesting: Mostly flat; the redundant block and loop introduce unnecessary nesting. Clarity of intent: Descriptive names, overrides, and comments explain delegation and comparator compatibility, while the countdown has no apparent purpose. Code length: Most methods are concise, though the pointless loop and lengthy TODO comments add noise. Action granularity: Statements generally perform one action per line, and multiline arguments remain readable. Reading flow: Method ordering and consistent delegation support natural reading, but the poorly indented countdown block and misaligned writeReplace() declaration interrupt the flow.