Sample
int-78cc8ea2ff23-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.494 | 0–1; higher is more readable |
| Dorn | 0.117 | 0–1; higher is more readable |
| Mi | 0.03 | 0–1; higher is more readable |
| LLOC | 37 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11.33 | 0–20; mean of three runs |
| BTTF | 0.404 | 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. | 3304.828 | −109.059 |
| Source linesThe number of non-empty source lines. | 96 | +38.4 |
| 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.782 | −7.173 |
Intercept 8.87 + feature contributions = -68.963 (log-odds).
Score = sigmoid(-68.963) = 0.
| Score | 0.494 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 155 | −2.9 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 97 | −2.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 155 | +1.696 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 53 | +1.096 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 95.654 | +0.927 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 53 | −0.795 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.068 | +0.278 |
Intercept 0.07 + feature contributions = -2.026 (log-odds).
Score = sigmoid(-2.026) = 0.117.
| Score | 0.03 |
|---|
| Score | 37 |
|---|
Run 1
The code has clear intent and useful documentation, especially for the undirected algorithm. The class structure is logical, separating directed and undirected iterators. However, readability is hurt by inconsistent and compressed formatting: multiple statements are on single lines, and the `of()` method mixes logic with closing braces. Deeply nested loops with while(true) and inner while loops reduce clarity. The `advance()` method contains a multi-line validation-then-return pattern on one line, and repeated requireNonNull comments add noise. Overall, the code is maintainable but could be much clearer with consistent formatting and simpler control flow.
Run 2
The code has some good documentation and logical class structure, but readability is significantly hampered by inconsistent formatting. Many method declarations, statements, and comments are compressed onto single lines, violating the 'one action per line' principle. Imports are also jumbled together. The deeply nested while loops with embedded comments and requireNonNull calls disrupt the natural reading flow. While the Javadocs for the inner classes are helpful, the overall inconsistent indentation and line breaks make the code visually chaotic and harder to parse than necessary.
Run 3
The code has logical organization with clear class structure and documentation, but readability is severely compromised by poor formatting and line breaks. Multiple statements are crammed onto single lines (e.g., field declarations, static factory methods, constructors, method bodies), violating the 'one action per line' principle and disrupting natural reading flow. While nesting depth is moderate and the intent is reasonably clear from the comments and structure, the inconsistent and compressed formatting makes the code significantly harder to scan and understand. The excessive line-wrapping inside methods like `computeNext()` creates an uneven rhythm, and the variable declarations with inline comments add clutter. Overall, the code's logic is sound but its presentation substantially reduces readability.
Run 1
Code Structure: Logical separation into a shared iterator and directed/undirected implementations is strong, but compressed formatting obscures method and class boundaries. Nesting: Mostly moderate; the undirected implementation adds a nested loop and conditional but remains manageable. Clarity of intent: Descriptive names and detailed comments explain traversal, duplicate suppression, null safety, and self-loops. Code length: Implementation is reasonably concise; the extensive example adds length but clarifies behavior. Action granularity: Multiple imports, declarations, statements, and closing braces share lines, making individual actions harder to distinguish. Reading flow: Inconsistent line breaks, inline comments, and merged method boundaries repeatedly interrupt scanning. Overall, sound organization and documentation are substantially undermined by poor formatting.
Run 2
Code Structure: A shared iterator base with separate directed and undirected implementations provides logical organization, but compressed method and class boundaries obscure it. Nesting: Mostly moderate; the undirected implementation adds a nested loop and conditional, remaining manageable. Clarity of intent: Descriptive names and detailed comments explain traversal, duplicate suppression, null handling, and self-loops well. Code length: Implementation is reasonably concise, though the lengthy example documentation slows scanning. Action granularity: Multiple imports, declarations, statements, and braces share lines, making individual operations harder to distinguish. Reading flow: The conceptual progression is natural, but inconsistent formatting, inline comments, and crowded boundaries repeatedly interrupt reading.
Run 3
Code Structure: The shared iterator base and separate directed/undirected implementations provide logical organization, but merged declarations and braces obscure boundaries. Nesting: Mostly moderate; the undirected implementation adds nested loops and a conditional, increasing reading effort. Clarity of intent: Descriptive names and comments clearly explain iteration, duplicate suppression, null safety, and self-loop handling. Code length: Implementation is reasonably concise, though the extensive example adds scanning overhead. Action granularity: Multiple imports, declarations, assignments, and control-flow statements share lines, making individual actions harder to distinguish. Reading flow: The conceptual progression is sensible, but inconsistent formatting, inline comments, and crowded closing braces repeatedly interrupt it. Strong design and documentation partially compensate for poor presentation.