Sample
int-30bba825d566-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.416 | 0–1; higher is more readable |
| Scalabrino | 0.736 | 0–1; higher is more readable |
| Dorn | 0.579 | 0–1; higher is more readable |
| Mi | 0.181 | 0–1; higher is more readable |
| LLOC | 5 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 3.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.541 | 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. | 859.051 | −28.349 |
| Source linesThe number of non-empty source lines. | 66 | +26.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.84 | −7.26 |
Intercept 8.87 + feature contributions = -0.339 (log-odds).
Score = sigmoid(-0.339) = 0.416.
| Score | 0.736 |
|---|
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. | 65 | −1.265 |
| 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. | 109.94 | −0.991 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109.925 | +0.969 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.028 | +0.674 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 65.829 | +0.51 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
Intercept 0.07 + feature contributions = 0.32 (log-odds).
Score = sigmoid(0.32) = 0.579.
| Score | 0.181 |
|---|
| Score | 5 |
|---|
Run 1
The code has severe formatting issues that make it difficult to read. Multiple imports are on the same line, annotations and Javadoc comments are merged into single lines with method declarations, and there's inconsistent spacing. The interface itself has clear purpose and follows logical structure, but the presentation undermines readability. The nesting is minimal (good), but action granularity is violated - multiple declarations and comments are crammed together. The reading flow is disorganized due to compressed formatting. While the code's intent is discernible and the logic is simple (interface definition), the physical layout makes it unnecessarily hard to parse. Proper line breaks and separation would significantly improve readability.
Run 2
The code is highly unreadable due to severe formatting issues. Imports and Javadoc comments are crammed onto single lines, making the header section dense and difficult to scan. Annotations, method signatures, and comments are frequently placed on the same line, violating the 'one action per line' principle and creating visual clutter. This also disrupts the natural reading flow, as methods do not follow a standard vertical structure. The lack of blank lines between major sections further compounds the issue. While the underlying logic is simple (an interface definition), the tangled presentation makes it hard to quickly identify the API contract or distinguish comments from code. Proper indentation and line breaks would dramatically improve clarity.
Run 3
This code is essentially unreadable as presented. The imports are all on the same line (1), the Javadoc and class declaration are on the same line (1, 5), method declarations run into each other (8), and the closing brace is attached to the last line (25). There is no logical separation between type parameters, method signatures, and documentation blocks. The flattened structure eliminates any natural reading flow and makes it impossible to discern where one method ends and the next begins. While the underlying semantic content (a well-documented interface from Guava) would be highly readable if formatted normally, the actual given text violates every structural criterion: it has zero visual hierarchy, multiple actions per line, no whitespace grouping, and no code organization. It reads as a dense wall of characters rather than as evaluable source code.
Run 1
Code Structure: The interface is logically organized, with imports, a type declaration, and related method contracts, but inconsistent formatting weakens separation. Nesting: Flat declarations with no nested control flow make scanning easy. Clarity of intent: Descriptive method names, precise types, and detailed Javadoc clearly explain ordering, duplicates, return types, and equality. Code length: The API is concise, though repeated documentation adds some verbosity. Action granularity: Most method declarations occupy individual lines, but several imports share lines, annotations are compressed together, and comments begin on declaration lines. Reading flow: The method sequence is natural, but merged imports, attached Javadoc boundaries, and the closing brace on the final declaration line interrupt visual flow. Overall, the semantics are highly readable, while layout inconsistencies prevent a higher score.
Run 2
Code Structure: The interface is logically organized, with related method declarations and relevant documentation. Nesting: Flat declarations and no nested control flow make it easy to follow. Clarity of intent: Descriptive names, explicit types, and detailed Javadoc clearly explain ordering, duplicates, and return types. Code length: The interface is concise, although repeated method documentation adds bulk. Action granularity: Several imports share lines, and annotations, comment boundaries, and the closing brace are sometimes attached to declarations, reducing visual separation. Reading flow: Method ordering is natural, but inconsistent spacing and compressed formatting interrupt scanning. Overall, the API is understandable, with formatting rather than structural complexity being the main readability weakness.
Run 3
Code Structure: The interface is logically organized, with related operations grouped and documented. Nesting: Flat method declarations and no control flow make it easy to scan. Clarity of intent: Descriptive names, precise types, and thorough Javadoc clearly explain ordering, duplicates, and return-value guarantees. Code length: The interface itself is concise, but repeated documentation adds bulk. Action granularity: Several imports share lines, annotations appear beside comment endings, and some declarations share lines with subsequent comments, weakening visual separation. Reading flow: Method order is natural, but inconsistent line breaks, crowded annotations, and the closing brace on the final declaration interrupt scanning. Overall, the semantics are highly readable, while formatting noticeably reduces readability.