Sample
int-f0653583b290-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.543 | 0–1; higher is more readable |
| Dorn | 0.346 | 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 | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs |
| BTTF | 0.422 | 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. | 3268.789 | −107.87 |
| 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.88 | −7.321 |
Intercept 8.87 + feature contributions = -64.721 (log-odds).
Score = sigmoid(-64.721) = 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.86 | +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.914 | −0.524 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.113 |
Intercept 0.07 + feature contributions = -0.636 (log-odds).
Score = sigmoid(-0.636) = 0.346.
| Score | 0.381 |
|---|
| Score | 32 |
|---|
Run 1
The code is generally well-structured, following standard Java/GWT conventions with clear class hierarchy and focused method responsibilities. The main readability issue is in the descendingMultiset() method where the if-else construct is backwards and awkward: 'if (!((result == null))) {} else { ...; return ...; }' makes the flow confusing and non-idiomatic. Additionally, the method mixes lazy initialization, assignment, and return into the else branch, combining multiple actions. Other methods are concise and clear, with good delegation patterns and straightforward type casting. The TODO comment is helpful but adds length. Overall, the code is readable at the class level but has a single method that significantly hurts clarity due to unnatural branching and multiple operations per line.
Run 2
The code is well-structured and follows clear organizational patterns. It has a logical class hierarchy, methods are concise with single responsibilities, and nesting is minimal. Naming is descriptive, and the delegation pattern is clear. One section (descendingMultiset) has an unusual if-else construct that disrupts reading flow and could be more straightforward. Overall, the code is highly readable for experienced Java developers, though the odd conditional slightly reduces clarity.
Run 3
The code is generally well-structured and readable. It has clear naming conventions, logical organization, and flat nesting for most methods. The class hierarchy and overrides are straightforward. However, readability is affected by the `descendingMultiset()` method which contains an awkward inverted if-else condition (`if (!((result == null))) {} else {...}`) that disrupts natural reading flow. Additionally, the TODO comment about retain cycles introduces some complexity. The code is concise and each method has a single responsibility, but the `descendingMultiset` logic could be clearer. Overall, this is readable production code with minor stylistic issues.
Run 1
Code Structure: Well-organized wrapper class with small, focused overrides; the cached field appears mid-class but near its use. Nesting: Shallow throughout, although descendingMultiset() uses an awkward empty if branch and else. Clarity of intent: Class documentation, descriptive names, delegation, and explicit unsupported operations clearly express an unmodifiable sorted multiset. The negated, over-parenthesized null check obscures otherwise simple lazy initialization. Code length: Appropriately concise; repetitive forwarding methods are justified by the interface. Action granularity: Mostly one action per line, but return descendingMultiset = result combines caching and returning. Reading flow: Consistent formatting and related method groupings support easy scanning. The empty branch, inverted condition, and combined assignment/return interrupt the otherwise natural flow.
Run 2
Code Structure: Well-organized wrapper class with small, focused overrides and clear delegation. Nesting: Shallow throughout, though descendingMultiset() uses an awkward empty if branch and else block. Clarity of intent: Descriptive names and documentation establish the unmodifiable-wrapper purpose; the negated, redundantly parenthesized null check obscures straightforward lazy initialization. Code length: Mostly concise, with necessary interface implementations; the empty branch adds needless syntax. Action granularity: Most lines perform one action, but returning an assignment combines caching and returning in one statement. Reading flow: Consistent formatting and predictable delegation make most methods easy to scan, while the unusual conditional interrupts the flow. Dense annotation placement and the detailed platform-specific TODO add minor visual complexity.
Run 3
Code Structure: Well-organized wrapper class with small, focused methods and consistent delegation. Nesting: Minimal nesting, although descendingMultiset() unnecessarily uses an empty if branch followed by else. Clarity of intent: Descriptive names, overrides, and documentation clearly convey an unmodifiable sorted multiset; the negated, redundantly parenthesized null check obscures straightforward lazy initialization. Code length: Generally concise, with necessary interface implementations and useful compatibility documentation. Action granularity: Most lines perform one action, but return descendingMultiset = result combines assignment and return. Reading flow: Consistent formatting and method patterns support easy scanning, though the awkward conditional, mid-class cache field, and compressed annotations slightly interrupt the flow.