Sample
int-3af64ef22dd8-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.998 | 0–1; higher is more readable |
| Scalabrino | 0.741 | 0–1; higher is more readable |
| Dorn | 0.626 | 0–1; higher is more readable |
| Mi | 0.63 | 0–1; higher is more readable |
| LLOC | 3 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.585 | 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. | 57 | +22.8 |
| 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.736 | −7.104 |
Intercept 8.87 + feature contributions = 6.077 (log-odds).
Score = sigmoid(6.077) = 0.998.
| Score | 0.741 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 57 | +1.234 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 57 | −0.982 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 56.807 | +0.384 |
| 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. | 81.966 | +0.193 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.021 |
Intercept 0.07 + feature contributions = 0.515 (log-odds).
Score = sigmoid(0.515) = 0.626.
| Score | 0.63 |
|---|
| Score | 3 |
|---|
Run 1
The code is a simple interface declaration, so it is generally readable. The structure is clear, with imports grouped logically and annotations placed appropriately. Nesting is not an issue. The intent of the interface is evident: it defines a `PeekingIterator` with `peek()`, `next()`, and `remove()` methods. Code length is appropriate for the task. However, readability is hampered by excessive whitespace—multiple blank lines between imports and methods feel inconsistent and unnecessarily long. The reading flow is disrupted by these gaps. Action granularity is fine, as each method declaration stands alone. Overall, the code is understandable but not optimally formatted.
Run 2
The code is highly readable for an interface definition. It has clear structure with logical imports and annotations. Nesting is minimal (nonexistent beyond the interface itself). Intent is clear: it defines a PeekingIterator contract with peek, next, and remove methods. Code length is concise and appropriate for the purpose. Action granularity is fine—each method is declared on one line. Reading flow is natural: annotations, method declarations, and documentation comments are organized logically. Minor deductions for excessive blank lines and unnecessary vertical whitespace, which slightly disrupt flow, and the missing import for @ParametricNullness, though this may be implied by package context. Overall, it is exemplary clean code.
Run 3
The code is highly readable. It has a clear interface declaration with proper imports, meaningful annotations, and well-chosen method names. The structure is logical: interface PeekingIterator extends Iterator, with peek() clearly documented as the key addition. Nesting is flat, and each method is separated by blank lines or comments. Clarity of intent is excellent—annotations like @DoNotMock and @CanIgnoreReturnValue convey important usage constraints. However, the code contains excessive empty comment templates (e.g., '/** */') spanning multiple lines, which increase length unnecessarily. The generic type parameter 'E extends @Nullable Object' adds slight complexity but is standard for Guava's nullness annotations. Reading flow is natural, with the intuitive ordering of peek, next, and remove. Overall, it is concise and well-organized, with minor redundancy from empty comment blocks preventing a perfect score.
Run 1
Code Structure: The package, imports, annotations, and interface methods are logically organized, though excessive blank lines disrupt the layout. Nesting: Minimal nesting makes the interface easy to scan. Clarity of intent: PeekingIterator and its method names convey purpose, but peek's behavior and its interaction with remove are undocumented; NoSuchElementException is imported but unused. Code length: The declarations are concise, but unnecessary whitespace greatly inflates the snippet. Action granularity: Each declaration and annotation occupies its own line, keeping responsibilities distinct. Reading flow: The order peek, next, remove is natural, although large gaps interrupt continuity.
Run 2
Code Structure: The package, imports, annotations, and interface methods are logically organized, although the unused NoSuchElementException import adds clutter. Nesting: There is only one interface scope, making the code easy to scan. Clarity of intent: PeekingIterator, peek(), and inherited iterator methods communicate the purpose clearly, but peek/remove interaction semantics are undocumented. Code length: The functional code is concise, but excessive blank lines unnecessarily inflate its visual length. Action granularity: Each declaration and annotation occupies its own line, with no bundled actions. Reading flow: Declaration order is natural, but large whitespace gaps interrupt the flow.
Run 3
Code Structure: The package, imports, annotations, and interface methods are logically organized, though unused NoSuchElementException import adds clutter. Nesting: Minimal nesting makes the interface easy to scan. Clarity of intent: PeekingIterator and its method names communicate the general purpose, but missing documentation leaves peek semantics and remove restrictions unclear. Code length: The actual declarations are concise, but excessive blank lines unnecessarily stretch the file. Action granularity: Each declaration and annotation occupies its own line, keeping responsibilities distinct. Reading flow: The method order is natural, but large whitespace gaps interrupt continuity.