Sample
int-70dba251cb6f-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.445 | 0–1; higher is more readable |
| Dorn | 0.133 | 0–1; higher is more readable |
| Mi | 0.02 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11.67 | 0–20; mean of three runs |
| BTTF | 0.31 | 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. | 3171.581 | −104.662 |
| Source linesThe number of non-empty source lines. | 63 | +25.2 |
| 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.869 | −7.304 |
Intercept 8.87 + feature contributions = -77.896 (log-odds).
Score = sigmoid(-77.896) = 0.
| Score | 0.445 |
|---|
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. | 158.938 | −3.067 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 158.984 | +1.761 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 64 | −1.23 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 51 | +1.027 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 51 | −0.749 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 62.7 | +0.467 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.113 | −0.152 |
Intercept 0.07 + feature contributions = -1.874 (log-odds).
Score = sigmoid(-1.874) = 0.133.
| Score | 0.02 |
|---|
| Score | 35 |
|---|
Run 1
The code suffers from significant readability issues. The package declaration, imports, and class Javadoc are all on one physical line despite being logically separate. Several methods and enum constants are formatted with opening braces, statements, and closing braces on the same line, disrupting the visual hierarchy. The `size()` method contains a complex ternary expression that combines multiple operations on one line, violating the 'one action per line' principle. The `contains` method has long boolean expressions that are difficult to parse. While the class has a clear overall purpose and the helper methods (`predecessorsOrEmpty`, `successorsOrEmpty`) are reasonable, the inconsistent formatting obscures the logical structure. Proper indentation, line breaks, and brace placement would significantly improve readability, as the underlying logic itself is not inherently tangled.
Run 2
The code is poorly formatted and hard to read. It arranges multiple statements on one line, overuses braces on the same line, and mixes imports with class documentation, disrupting logical structure. The nesting in methods like contains() and size() is moderate but made worse by inconsistent indentation. While intent is understandable, the compressed formatting obscures method boundaries and action granularity. For example, multiple actions and declarations appear on single lines, violating the 'one action per line' principle. Long boolean expressions in contains() and size() add cognitive load. The reading flow is disorganized due to erratic line breaks and brace placement. Although the code is relatively concise, clarity severely suffers from the lack of consistent formatting and whitespace. Overall, it is functionally structured but visually tangled and hard to follow.
Run 3
The code suffers from severe formatting issues that hurt readability. Imports are compressed onto one line, and multiple class members are placed on the same line, violating standard Java conventions. The size() and contains() methods contain long, dense conditional expressions that require careful reading to understand. Nesting depth is moderate (2-3 levels), but the compressed formatting makes it feel deeper than it actually is. Action granularity is poor — multiple statements and expressions are crammed onto single lines. While the class structure itself is reasonably logical (abstract base class with edge type enum), the intent is obscured by the formatting. The helper methods predecessorsOrEmpty and successorsOrEmpty are well-named, but their implementations are compressed. Overall, this appears to be the result of an aggressive code formatter/minifier rather than hand-written code, which significantly degrades readability despite having sound underlying logic.
Run 1
Code Structure: Fields, enum, constructor, public methods, and helpers are logically organized, but compressed formatting obscures their boundaries. Nesting: Control flow is shallow, with simple conditionals and early returns. Clarity of intent: Descriptive names, enum values, and helper documentation explain the purpose; the size calculation and long containment expressions require extra attention. Code length: The implementation is reasonably concise without substantial unnecessary code. Action granularity: Several imports, declarations, assignments, and control-flow statements share lines, making individual operations harder to distinguish. Reading flow: Inconsistent line breaks, inline braces, and comments attached to preceding code repeatedly interrupt scanning. Overall, the underlying design is readable, but poor formatting significantly reduces accessibility.
Run 2
Code Structure: The class is logically divided into fields, an enum, and focused methods, but compressed formatting obscures boundaries. Nesting: Mostly shallow conditionals and early returns keep complexity manageable. Clarity of intent: Descriptive names and documentation explain incident-edge behavior, although compound membership checks and self-loop counting require careful reading. Code length: The implementation is reasonably concise without substantial unnecessary code. Action granularity: Several lines combine imports, declarations, assignments, or control-flow transitions, making individual actions harder to distinguish. Reading flow: Inconsistent indentation, inline braces, long expressions, and comments attached to preceding code interrupt otherwise logical progression. Overall, the underlying design is readable, but presentation significantly reduces scanability.
Run 3
Code Structure: Fields, an edge-type enum, overrides, and helper methods provide logical organization, but cramped formatting obscures boundaries. Nesting: Conditional nesting is shallow, and early returns simplify contains(). Clarity of intent: Descriptive names and helper documentation explain edge handling; the size calculation and self-loop adjustment require closer inspection. Code length: The implementation is reasonably concise without major unnecessary code. Action granularity: Several imports, declarations, assignments, and control-flow statements share lines, making individual actions harder to distinguish. Reading flow: Inconsistent line breaks, inline braces, and long Boolean expressions interrupt scanning, although method order and helper extraction retain a coherent overall flow.