Sample
int-7ef2fdf76411-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.543 | 0–1; higher is more readable |
| Dorn | 0.35 | 0–1; higher is more readable |
| Mi | 0.381 | 0–1; higher is more readable |
| LLOC | 32 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.423 | 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. | 3200.27 | −105.609 |
| Source linesThe number of non-empty source lines. | 104 | +41.6 |
| 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.877 | −7.316 |
Intercept 8.87 + feature contributions = -62.454 (log-odds).
Score = sigmoid(-62.454) = 0.
| Score | 0.543 |
|---|
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. | 105 | −2.681 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 94 | +2.514 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 94 | −1.736 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 103.84 | +1.042 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 85 | +0.567 |
| 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. | 98.933 | −0.525 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.13 |
Intercept 0.07 + feature contributions = -0.62 (log-odds).
Score = sigmoid(-0.62) = 0.35.
| Score | 0.381 |
|---|
| Score | 32 |
|---|
Run 1
The code is well-structured with clear separation of concerns, following a standard class pattern for immutable collection wrappers. The class has a clear purpose and is documented. Methods are concise, each performing a single action, and the code length is proportional to the functionality required. Nesting is minimal, limited to a single null check pattern in descendingMultiset(). Reading flow is generally natural, with methods grouped logically. Minor readability drawbacks include the generic type declaration with `@Nullable Object`, which adds cognitive overhead, and the one-liner field declaration `@LazyInit private transient @Nullable UnmodifiableSortedMultiset<E> descendingMultiset;` which combines multiple modifiers. The TODO comment is helpful but slightly verbose. Overall, it's readable code that would be easy for experienced Guava contributors to understand, but the specialized annotations and type constraints require domain familiarity.
Run 2
The code is highly readable with clear structure and intent. It follows a consistent pattern of delegating to an underlying SortedMultiset while wrapping results in unmodifiable views, which aligns with the class purpose. Nesting is minimal—only the descendingMultiset() method has one level of conditional logic, which is straightforward. Action granularity is excellent: each method performs a single, clear operation, often a one-line delegation or wrapper call. The reading flow is natural, with methods organized logically (overrides, then first/last entry accessors, then mutators, then range views). The class-level Javadoc explains why the file exists, and the TODO comment adds helpful context about a known issue. The main readability challenges stem from the verbose generic type signatures and annotations, which are inherent to Guava's style and add some visual noise but do not obscure the logic. Overall, the code is concise, well-organized, and easy to follow for experienced Java developers.
Run 3
The code is highly readable due to its clear structure and consistent patterns. The class has a single responsibility: wrapping a SortedMultiset to make it unmodifiable. Methods are short, flat, and delegate directly to the wrapped instance, making intent obvious. Nesting is minimal, with only one small conditional block in descendingMultiset(). Naming is descriptive, and annotations provide helpful context. The delegation pattern keeps action granularity at one primary operation per line. The only deductions are the TODO comment which introduces a minor distraction, and the slight cognitive overhead from generics and annotations, though these are inherent to the domain. Overall, the code follows clean, maintainable practices.
Run 1
Code Structure: Well-organized wrapper class with focused overrides and a documented purpose; placing the cached field among methods slightly weakens organization. Nesting: Almost entirely flat, with only one simple conditional. Clarity of intent: Descriptive names, explicit delegation, and unsupported mutation methods clearly communicate an unmodifiable sorted multiset. The lazy reciprocal cache requires some additional attention. Code length: Concise methods and minimal boilerplate for the interface; annotations and the platform-specific TODO add modest visual overhead. Action granularity: Nearly every statement performs one action, except the combined assignment and return in descendingMultiset(). Reading flow: Consistent formatting and predictable delegation make the class easy to scan, though superclass behavior and type casts require external context.
Run 2
Code Structure: Well-organized wrapper class with focused methods and consistent delegation; the cache field appearing midway through methods slightly disrupts organization. Nesting: Almost entirely flat, with only one shallow conditional. Clarity of intent: Descriptive names, class documentation, and explicit exceptions clearly communicate an unmodifiable sorted multiset; annotations and reciprocal cache references require some specialized knowledge. Code length: Concise for the interface implemented, with little unnecessary code; repetitive forwarding methods are appropriate. Action granularity: Most lines perform one action, though 'return descendingMultiset = result' combines assignment and return. Reading flow: Consistent formatting and predictable method patterns make scanning easy, although the lengthy platform-specific TODO and dense annotation declarations introduce minor interruptions.
Run 3
Code Structure: A cohesive wrapper class with small, logically grouped methods; the cache field could be placed nearer the top. Nesting: Almost entirely flat, with only one shallow conditional. Clarity of intent: Class documentation, descriptive names, delegation, and explicit exceptions clearly communicate an unmodifiable sorted multiset. Code length: Concise overall; repetitive forwarding methods are appropriate for the interface. Action granularity: Most lines perform one action, though 'return descendingMultiset = result' combines assignment and return. Reading flow: Consistent formatting and predictable method patterns support easy scanning. Minor friction comes from dense annotations, casts, and a lengthy platform-specific TODO interrupting the flow.