Sample
int-e979b25f6ce0-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable |
| Scalabrino | 0.544 | 0–1; higher is more readable |
| Dorn | 0.322 | 0–1; higher is more readable |
| Mi | 0.034 | 0–1; higher is more readable |
| LLOC | 12 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.53 | 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. | 840.254 | −27.728 |
| Source linesThe number of non-empty source lines. | 47 | +18.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.668 | −7.001 |
Intercept 8.87 + feature contributions = -7.06 (log-odds).
Score = sigmoid(-7.06) = 0.001.
| Score | 0.544 |
|---|
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. | 175 | −3.747 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 175 | +2.019 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.047 | +0.487 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 41 | −0.415 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 46.886 | +0.246 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
Intercept 0.07 + feature contributions = -0.746 (log-odds).
Score = sigmoid(-0.746) = 0.322.
| Score | 0.034 |
|---|
| Score | 12 |
|---|
Run 1
The code is an interface with relatively simple methods, but formatting choices severely harm readability. Multiple methods appear on the same line (e.g., predecessors() and successors()), making the structure feel tangled and creating unnaturally high information density. Nesting is not a major issue (it is an interface), but the flow is disrupted by method declarations being squashed together and Javadoc comments being placed on the same line as annotations or code. Action granularity is violated: several logical declarations occupy a single line. The intent of individual methods is mostly clear from names, but the overall messy layout obscures the interface's purpose. While the code is not deeply nested or excessively long, the poor formatting and disorganized reading flow make it difficult to scan quickly. Overall, it falls well below average readability, earning a low score despite straightforward content.
Run 2
The code has several readability issues. Methods like predecessors() and successors() are crammed onto one line, making it harder to scan. Javadoc comments are merged with method declarations in a few places, which obscures the separation between documentation and code. 'Reading flow' feels disjointed and unnatural. However, method names are clear and the interface declares logical operations. The lack of whitespace and inconsistent formatting significantly reduce readability.
Run 3
The code is poorly structured with inconsistent indentation, collapsed method definitions, and cramped spacing. Methods like `Set<N> predecessors(); Set<N> successors();` are placed on the same line, violating one-action-per-line. Javadoc and annotations are compressed into single lines with method signatures, making the code hard to scan. Imports lack spacing, and the interface body is inconsistently formatted. While the method names are reasonably clear, the overall layout disrupts reading flow and obscures intent. Deep documentation merging reduces clarity despite the relatively flat nesting. Concise? Yes, but at the expense of readability.
Run 1
Code Structure: The interface logically groups node queries, edge queries, and mutation methods, though cramped formatting weakens separation. Nesting: Flat method declarations with no nested control flow make it easy to scan. Clarity of intent: Descriptive method names, types, and useful Javadoc clearly convey purpose and edge-case behavior. Code length: Concise and appropriate for an interface, without unnecessary implementation detail. Action granularity: Several declarations, annotations, comments, and closing braces share lines, obscuring individual elements. Reading flow: The overall ordering is natural, but inconsistent line breaks and comments attached to imports or preceding declarations interrupt reading.
Run 2
Code Structure: The interface logically groups node queries, edge queries, and mutation operations. Nesting: Flat declarations with no nested control flow make it easy to scan. Clarity of intent: Descriptive method names, generic types, and useful documentation clearly convey purpose and behavior. Code length: Concise and appropriate for an interface, with little unnecessary content. Action granularity: Several method declarations, annotations, and documentation boundaries share lines, reducing visual separation. Reading flow: The conceptual ordering is natural, but inconsistent formatting—such as Javadoc starting beside an import, declarations following comment endings, and the closing brace sharing a method line—interrupts scanning. Consistent line breaks and spacing would substantially improve readability.
Run 3
Code Structure: The interface logically groups adjacency queries, edge queries, and mutation methods, but inconsistent formatting weakens visual organization. Nesting: Flat declarations with no nested control flow make scanning easy. Clarity of intent: Descriptive method names, generic types, and useful documentation clearly convey graph operations and special cases. Code length: Concise and appropriate for an interface, with no unnecessary implementation detail. Action granularity: Several declarations, annotations, comments, and closing braces share lines, notably predecessors/successors and the removal methods, obscuring method boundaries. Reading flow: The ordering is natural, but comments attached to imports or declarations and compressed annotation placement interrupt smooth reading. Conventional line breaks and consistent spacing would substantially improve readability.