Sample
int-29946d2d2e3d-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.634 | 0–1; higher is more readable |
| Dorn | 0.488 | 0–1; higher is more readable |
| Mi | 0.554 | 0–1; higher is more readable |
| LLOC | 20 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.253 | 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. | 1666.537 | −54.996 |
| 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.763 | −7.145 |
Intercept 8.87 + feature contributions = -29.27 (log-odds).
Score = sigmoid(-29.27) = 0.
| Score | 0.634 |
|---|
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. | 61 | −1.123 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 49 | +0.958 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 99.934 | +0.808 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 50 | −0.727 |
| 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 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 59.911 | +0.428 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.111 |
Intercept 0.07 + feature contributions = -0.046 (log-odds).
Score = sigmoid(-0.046) = 0.488.
| Score | 0.554 |
|---|
| Score | 20 |
|---|
Run 1
The code is mostly readable, with clear structure and a straightforward adapter pattern. The class has a clear purpose, and methods are concise. However, there is a significant issue: a block of unrelated, nonsensical code (comparing two int scores) was erroneously inserted inside the `next()` method, creating confusion and breaking the logic. This causes the method to be deeply nested and disrupts the reading flow. Additionally, the method mixes actions, reducing clarity. While the intent is evident from the comments and naming, the inserted code severely undermines readability and correctness.
Run 2
The code is mostly readable but contains a critical unrelated block inside the next() method that severely damages clarity. The class structure is logical, has minimal nesting, and each line performs one action. However, the stray code snippet (comparing two scores) is completely disconnected from the adapter's purpose, creating ambiguity and breaking the reading flow. The Javadoc and method names are clear, and delegation to innerIterator is straightforward. The adapter's core logic (adding header format) is simple. But the random embedded code makes the method seem like an error, reducing overall readability significantly. Additionally, the class is slightly verbose for the simple wrapping it does, though that is acceptable for adapter patterns.
Run 3
The code is mostly clear at the top, with a focused adapter class and sensible delegation methods. However, a massive readability issue appears in the middle of the `next()` method: a disconnected block of unrelated Java code (comparing two integers and assigning `higherScore`) is inserted before the actual iterator logic. This block is not only logically unrelated but also structurally breaks the method, adding unnecessary nesting and ruining the flow. The method then continues correctly, but the disruption destroys clarity of intent and reading flow. Other issues include inconsistent brace indentation around that inserted block and a jarring switch from clean delegation to tangled logic. Without the extraneous block, the code would be concise and reasonably readable, but as presented it is confusing and poorly structured.
Run 1
Code Structure: The adapter is logically organized into small delegation methods, but an unrelated score-comparison block disrupts next(). Nesting: Most methods are flat; the unnecessary block and conditional introduce avoidable nesting. Clarity of intent: Class documentation, descriptive names, and delegation clearly explain the adapter, while unused score variables obscure the purpose of next(). Code length: The core implementation is concise, but the score-comparison block adds unnecessary lines. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Method ordering and straightforward delegation support natural reading, but inconsistent indentation and irrelevant logic interrupt the main value-conversion path.
Run 2
Code Structure: The adapter is logically organized into small delegation methods, but next() contains an unrelated score-comparison block. Nesting: Generally shallow; the unnecessary block and its if/else add avoidable nesting. Clarity of intent: Documentation, class naming, and delegation clearly explain the adapter, while unused score variables distract from its purpose. Code length: Most methods are concise, but the score-comparison block adds unnecessary length. Action granularity: Statements consistently perform one action per line. Reading flow: The delegation methods read naturally, but the abruptly inserted, poorly indented block interrupts the transition to the actual iterator conversion.
Run 3
Code Structure: The adapter is logically organized into short delegation methods, but next() contains an unrelated score-comparison block that disrupts cohesion. Nesting: Mostly shallow, with an unnecessary nested block and if/else adding avoidable complexity. Clarity of intent: The class documentation, naming, and header conversion clearly communicate the adapter’s purpose; unused score variables introduce ambiguity. Code length: Delegation and conversion are concise, but the score-comparison code adds unnecessary length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: The methods follow a natural iterator-adapter pattern, but inconsistent indentation and the unrelated block abruptly interrupt that flow.