Sample
int-160c8d2dea0c-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.945 | 0–1; higher is more readable |
| Scalabrino | 0.929 | 0–1; higher is more readable |
| Dorn | 0.643 | 0–1; higher is more readable |
| Mi | 0.077 | 0–1; higher is more readable |
| LLOC | 3 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.645 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 560.253 | −18.488 |
| 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.759 | −7.139 |
Intercept 8.87 + feature contributions = 2.842 (log-odds).
Score = sigmoid(2.842) = 0.945.
| Score | 0.929 |
|---|
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. | 108.92 | −0.948 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 106.82 | +0.919 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 48 | −0.663 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.029 | +0.656 |
| 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. | 48.845 | +0.273 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 18 | −0.115 |
Intercept 0.07 + feature contributions = 0.59 (log-odds).
Score = sigmoid(0.59) = 0.643.
| Score | 0.077 |
|---|
| Score | 3 |
|---|
Run 1
The code is generally well-structured with clear documentation and logical organization. The interface is concise and purposeful, with good use of annotations and Javadoc. However, there are some readability issues: multiple import statements are compressed onto single lines, and class-level annotations are appended to the end of the Javadoc block rather than on separate lines. The closing brace shares a line with the final method, which slightly disrupts the reading flow. The method declarations are appropriately flat with no nesting, and each action is clearly separated. The Javadoc is thorough but well-formatted. Overall, the code is readable but would benefit from more consistent line breaks and formatting, particularly around imports and annotations.
Run 2
The code is highly readable overall. Structure is logical with clear separation between interface declaration, annotations, and method definitions. Javadoc is thorough and well-formatted, adding significant clarity. Nesting is essentially flat — the interface has no nested blocks. Intent is unambiguous: a peeking iterator with clear behavioral contracts. Action granularity is mostly one action per line, though a few lines combine annotations (e.g., '@Override void remove();' and the interface-level annotations). Reading flow is natural: imports, documentation, declaration, then methods. Minor deductions: multiple imports on one line (admittedly common in Java), some annotation stacking on single lines, and the class-level annotations placed after the Javadoc slightly disrupt visual separation. Overall, excellent clarity and organization.
Run 3
The code is generally well-structured and readable: clear interface definition, good use of Javadoc, and natural method ordering (peek, next, remove). However, readability is negatively impacted by inconsistent formatting in the imports section (multiple imports on one line) and annotations placed on the same line as declarations rather than on separate lines. The Javadoc is comprehensive and clarifies intent, but the method signature annotations are cramped on a single line, reducing scanability. Nesting is minimal and clarity of intent is strong; the main issues are typographic spacing and line-break consistency, which slightly disrupt natural reading flow.
Run 1
1. Code Structure: The interface logically groups three related iterator methods, with documentation attached to each. 2. Nesting: No nested control flow; the interface is flat and easy to scan. 3. Clarity of intent: Descriptive names and detailed Javadoc clearly explain lookahead behavior and removal constraints. 4. Code length: Concise declarations; documentation adds useful contract details rather than unnecessary bulk. 5. Action granularity: Multiple imports on one line and annotations, declarations, and the closing brace sharing lines reduce visual separation. 6. Reading flow: Method order is natural, but compressed formatting around the interface annotations and remove() interrupts an otherwise clean reading flow.
Run 2
Code Structure: The interface is logically organized into peek, next, and remove declarations, each with relevant documentation. Nesting: There is no deep nesting or complex control flow. Clarity of intent: Descriptive names and detailed contracts clearly explain lookahead behavior and removal restrictions. Code length: The interface is concise; its documentation is substantial but useful rather than unnecessarily long. Action granularity: Several imports share one line, and some annotations, declarations, and closing braces are compressed together, reducing scanability. Reading flow: Method ordering is natural, but inconsistent formatting, annotations appended to documentation endings, and the final inline closing brace interrupt an otherwise clear presentation.
Run 3
Code Structure: The interface is logically organized around peek(), next(), and remove(), with relevant documentation grouped with each method. Nesting: There is no deep nesting, making the code easy to scan. Clarity of intent: Descriptive method names and precise Javadoc clearly explain lookahead behavior and removal constraints. Code length: The interface is concise; its documentation is longer than the declarations but provides useful contract details. Action granularity: Multiple imports on one line and annotations, declarations, and closing braces compressed together reduce readability. Reading flow: Method ordering is natural, but inconsistent line breaks and annotations appended to comment endings interrupt the otherwise clear flow.