Sample
int-baa407dca0c8-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.566 | 0–1; higher is more readable |
| Dorn | 0.901 | 0–1; higher is more readable |
| Mi | 0.586 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 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. | 4739.251 | −156.395 |
| 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.817 | −7.225 |
Intercept 8.87 + feature contributions = -95.951 (log-odds).
Score = sigmoid(-95.951) = 0.
| Score | 0.566 |
|---|
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. | 148 | −4.204 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 141 | +4.14 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 146.724 | +1.641 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.676 | +0.739 |
| 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.912 | −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.111 | −0.138 |
Intercept 0.07 + feature contributions = 2.207 (log-odds).
Score = sigmoid(2.207) = 0.901.
| Score | 0.586 |
|---|
| Score | 53 |
|---|
Run 1
The code is generally well-structured and follows clear organizational patterns. The class has a single responsibility and delegates most operations to the forward multiset, which keeps methods concise. Most methods are short and have a clear purpose. The ordering of methods is logical, grouping related functionality together. However, readability is slightly reduced by the unusual `if (!((result == null))) {} else { ... }` pattern in `comparator()` and `elementSet()`, where a simple `if (result == null)` would be clearer. The reverse argument order in `subMultiset()` (passing `toElement` first) is intentional but slightly confusing without documentation. The lazy initialization pattern is consistent, and the use of `@LazyInit` and nullness annotations adds clarity. Overall, it reads naturally for a Guava collection implementation, with reasonable nesting and granularity.
Run 2
The code is generally well-structured and readable, with clear class purpose, logical organization, and concise method implementations. Most methods are flat and follow a natural reading flow. However, several factors reduce readability: the lazy initialization pattern in comparator() and elementSet() uses an awkward if-else structure (empty if block with logic in else) that disrupts natural reading flow; the class deals with non-trivial bidirectional relationships between views (headMultiset/tailMultiset/subMultiset) that require careful reading; and the anonymous inner class EntrySetImpl adds nesting. The file assumes familiarity with Guava collection patterns like ForwardingMultiset, SortedMultiset, and Multisets.EntrySet, making it less accessible to newcomers. Action granularity is mostly good, with one operation per line. Code length is appropriate—methods are short and focused. The abstract methods forwardMultiset() and entryIterator() clearly define the extension contract. Nullability annotations are consistent but add visual noise. Overall, this is professional-grade code with minor style inconsistencies that prevent a higher score.
Run 3
The code is moderately readable as a Guava-style abstract class with clear method names and logical delegation to a forward multiset. However, several issues reduce clarity. The lazy initialization pattern `if (!((result == null))) {} else { ... }` is unnecessarily awkward; a simple null check would be far more readable. The use of `@Nullable`, `@ParametricNullness`, and interleaved annotations adds noise, though this is partly due to nullness checker requirements. Nesting is low overall, but the `EntrySetImpl` inner class and ternary expression in `entrySet()` add minor complexity. Action granularity is mostly one action per line, which helps. Reading flow follows a natural progression, but the odd conditional style breaks comprehension. The class could be improved by simplifying the lazy-init conditionals, reducing annotation clutter via imports or convention, and standardizing lazy initialization with a helper method.
Run 1
Code Structure: Well-organized skeletal implementation with focused overrides, cached views, and a small local entry-set class. Nesting: Mostly flat; the local class adds modest, manageable nesting. Clarity of intent: Descriptive names and documentation clearly convey descending-order delegation, but negated null checks with empty branches obscure straightforward lazy initialization. Code length: Most methods are concise; interface-driven boilerplate is reasonable, though the empty branches are unnecessary. Action granularity: Most lines perform one action, but assignment within return expressions combines caching and returning, particularly in the ternary expression. Reading flow: Consistent formatting and simple forwarding methods support natural reading, while unusual conditionals and inconsistent lazy-initialization styles interrupt it.
Run 2
Code Structure: Well-organized skeletal implementation with focused methods and consistent delegation, although cached fields are interspersed with methods. Nesting: Mostly flat; the local entry-set class adds limited, manageable nesting. Clarity of intent: Documentation, descriptive names, and reversed delegation clearly convey descending behavior. However, negated null checks with redundant parentheses and empty branches obscure straightforward lazy initialization. Code length: Appropriately concise for the interface, with little unnecessary code beyond the awkward conditionals. Action granularity: Most lines perform one clear action, but assignment within return statements and a ternary combines caching and returning. Reading flow: Consistent formatting and short methods support natural reading; inconsistent lazy-initialization styles and empty if branches interrupt it.
Run 3
Code Structure: Well-organized implementation with short methods, consistent overrides, and localized caching. Nesting: Mostly flat; the local entry-set class adds modest, purposeful nesting. Clarity of intent: Descriptive names and documentation make descending-view delegation clear, but negated null checks with redundant parentheses and empty branches obscure simple lazy initialization. Code length: Concise overall, with necessary interface implementations and little duplication beyond delegation. Action granularity: Most lines perform one action, though assignment inside a return and a ternary combines caching with returning values. Reading flow: Consistent formatting and straightforward forwarding methods support natural reading; unusual conditionals and inconsistent caching styles interrupt it.