Sample
int-5f60be08a81f-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.449 | 0–1; higher is more readable |
| Dorn | 0.245 | 0–1; higher is more readable |
| Mi | 0.059 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.501 | 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. | 1511.099 | −49.866 |
| Source linesThe number of non-empty source lines. | 35 | +14 |
| 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.831 | −7.246 |
Intercept 8.87 + feature contributions = -34.243 (log-odds).
Score = sigmoid(-34.243) = 0.
| Score | 0.449 |
|---|
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. | 152 | −2.773 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 152 | +1.648 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 36 | −0.238 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 27 | −0.199 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.087 | +0.093 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 34.791 | +0.076 |
Intercept 0.07 + feature contributions = -1.126 (log-odds).
Score = sigmoid(-1.126) = 0.245.
| Score | 0.059 |
|---|
| Score | 15 |
|---|
Run 1
The code has some positive aspects: the class purpose is documented with a clear Javadoc, and most methods are small and focused (good action granularity). However, readability is significantly hurt by formatting. Several unrelated statements are compressed onto single lines, especially in the imports and constructor, breaking the 'one action per line' principle. The inconsistent indentation and spacing make the code feel disorganized, reducing reading flow. The iterator() method uses a nested ternary, adding avoidable nesting and cognitive load. Method order is logical, but the cramped formatting obscures the structure. Overall, the code is functional but visually cluttered, requiring extra effort to parse, landing it in the lower-middle range of readability.
Run 2
The code is functional and mostly readable, but formatting and structural choices detract from clarity. The class has a clear purpose and single responsibility, and method names reflect their intent. The logic is flat with minimal nesting, which aids comprehension. However, the one-line class fields, constructor body, and method declarations create visual clutter and reduce readability. Several lines combine multiple actions, violating action granularity and disrupting natural reading flow. Imports are also compressed onto single lines, making them harder to scan. While the code is concise, it feels unnecessarily compact at the expense of consistency and readability. With standard formatting and spaced-out declarations, it would be significantly more readable.
Run 3
The code suffers from severe formatting issues that undermine readability. Multiple statements are crammed onto single lines (e.g., imports, field declarations, constructor body), violating the 'one action per line' principle. Opening braces are placed incorrectly in some methods, making the structure feel disjointed. The logic itself is simple and the class purpose is documented, but the poor layout obscures natural reading flow and makes the code appear tangled. Nesting is minimal, which is positive, and method names generally express intent. Overall, the code is functionally understandable but visually unpolished, requiring a reader to mentally reformat it.
Run 1
Code Structure: The class is logically organized into fields, a constructor, collection overrides, and a lookup helper, but compressed declarations and imports obscure those boundaries. Nesting: Minimal nesting and straightforward conditional expressions make the logic easy to follow. Clarity of intent: Descriptive names and class documentation clearly explain the single-edge constraint and lookup behavior. Code length: The implementation is appropriately concise without unnecessary logic, although excessive compression reduces readability. Action granularity: Multiple imports, field declarations, assignments, and statements share lines, making individual actions harder to scan. Reading flow: Method order is natural, but inconsistent line breaks, inline method bodies, and annotations attached to closing braces interrupt visual flow. Conventional formatting would substantially improve readability without changing the design.
Run 2
Code Structure: The class is logically organized around fields, construction, set operations, and a lookup helper, but compressed formatting obscures these boundaries. Nesting: Minimal nesting and simple conditional expressions make the logic easy to follow. Clarity of intent: Descriptive names and class documentation clearly explain the purpose and restriction against parallel edges. Code length: The implementation is appropriately concise without unnecessary logic. Action granularity: Multiple imports, field declarations, assignments, and statements share lines, reducing readability. Reading flow: Inconsistent brace placement and annotations attached to preceding closing braces interrupt otherwise natural method ordering. Conventional formatting would significantly improve readability.
Run 3
Code Structure: A logically organized class separates construction, iteration, size, membership, and lookup, but cramped formatting obscures these boundaries. Nesting: Very shallow; simple conditional expressions avoid nested control flow. Clarity of intent: Descriptive names and class documentation clearly explain the single-edge set and its restriction against parallel edges. Code length: Concise, with little unnecessary code and a useful shared lookup helper. Action granularity: Multiple imports, field declarations, assignments, and statements share lines, making individual actions harder to scan. Reading flow: Conventional method ordering supports understanding, but inconsistent brace placement, inline method bodies, and annotations attached to closing braces disrupt the flow. Overall, straightforward logic and clear naming are weakened primarily by formatting.