Sample
int-7e471a90a38a-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.564 | 0–1; higher is more readable |
| Dorn | 0.697 | 0–1; higher is more readable |
| Mi | 0.713 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs |
| BTTF | 0.44 | 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. | 4612.687 | −152.219 |
| Source linesThe number of non-empty source lines. | 147 | +58.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.774 | −7.162 |
Intercept 8.87 + feature contributions = -91.71 (log-odds).
Score = sigmoid(-91.71) = 0.
| Score | 0.564 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 147 | +4.347 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 148 | −4.204 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 146.673 | +1.64 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 96.919 | −0.44 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.115 | −0.175 |
Intercept 0.07 + feature contributions = 0.833 (log-odds).
Score = sigmoid(0.833) = 0.697.
| Score | 0.713 |
|---|
| Score | 53 |
|---|
Run 1
The code is generally clear and logically organized, following standard Guava patterns. Methods are short, with one primary action per line, and nesting is minimal. Naming conventions make intent obvious. However, readability is slightly reduced by the heavy use of null-checked lazy initialization, which adds boilerplate and interrupts natural flow. The file has redundant blank lines at the top, and some methods (like `subMultiset`) chain several calls in one line, reducing clarity. Overall it is readable but not maximally concise or flowing.
Run 2
This code is highly readable due to its clear logical structure, consistent naming, and straightforward delegation pattern. The class follows a single responsibility: reversing the order of a sorted multiset by delegating to an underlying forward multiset. Methods are short, focused, and named clearly (e.g., pollFirstEntry delegates to pollLastEntry). Nesting is minimal, with only one inner class and no deep conditionals. Lazy initialization is handled elegantly with a simple null-check ternary or if-statement. The code is concise without sacrificing clarity, and each line performs a single logical action. Annotations like @LazyInit and @WeakOuter add useful context. Minor deductions come from slightly verbose type annotations (e.g., @ParametricNullness) and a few wrapped method signatures that add visual noise, but overall the reading flow is natural and the intent is immediately clear.
Run 3
The code is generally clear and well-structured, with logical method organization and consistent delegation to a forwardMultiset(). Each method has a single clear purpose, and the lazy initialization pattern is applied consistently. However, readability is reduced by several factors: the generics and annotations are lengthy and visually dense, there is redundant null-check boilerplate across multiple methods, and some lines are very long (e.g., method signatures with annotations). The createEntrySet() inner class adds nesting and interrupts the flow slightly. Overall, the class is understandable for experienced Java developers familiar with Guava-style code, but the verbosity and repetition of null-handling prevent a higher score.
Run 1
Code Structure: Well-organized forwarding implementation with small, focused overrides and cached views placed near their accessors. Nesting: Mostly flat; the local EntrySetImpl class adds limited, manageable nesting. Clarity of intent: Descriptive method names and consistent reversal of first/last and head/tail operations clearly convey descending-view behavior, though reversed subMultiset arguments require attention. Code length: Concise for the interface implemented, with little unnecessary logic; excessive blank lines after imports add visual noise. Action granularity: Most lines perform a single action, but assignments embedded in returns and the entrySet ternary combine initialization and returning, slightly reducing clarity. Reading flow: Formatting and short methods support easy scanning, although inconsistent lazy-initialization styles and the placement of entryIterator between public methods mildly interrupt the flow.
Run 2
Code Structure: Well-organized forwarding class with small, focused overrides, though cached fields are interspersed with methods. Nesting: Mostly flat; lazy-initialization checks and one local class introduce only modest nesting. Clarity of intent: Descriptive names and explicit first/last and head/tail reversals clearly communicate descending behavior. Generic types and annotations add some visual complexity. Code length: Concise implementations with little unnecessary logic; repeated overrides are appropriate for the interface, but excessive blank lines add noise. Action granularity: Most statements perform one action, although assignment inside a return and a ternary expression combine caching and returning. Reading flow: Consistent formatting and straightforward delegation make the code easy to follow, with minor interruptions from scattered cache declarations and inconsistent lazy-initialization styles.
Run 3
Code Structure: Well-organized into small overriding methods, with related operations mostly grouped together; cached fields are somewhat scattered. Nesting: Shallow overall, with simple null checks and one local class adding modest nesting. Clarity of intent: Descriptive method names and explicit reversal of forward operations clearly communicate the descending-view behavior, though annotations and helper classes require library familiarity. Code length: Appropriately concise for the interface implementation, with little unnecessary logic; excessive blank lines before the class add clutter. Action granularity: Most lines perform a single action, but assignment inside a return and a ternary combines caching and returning, reducing immediate clarity. Reading flow: Consistent formatting and short delegation methods make the code easy to scan, although inconsistent lazy-initialization styles and interspersed fields slightly interrupt the flow.