Sample
int-0026a4ff3a70-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.629 | 0–1; higher is more readable |
| Dorn | 0.45 | 0–1; higher is more readable |
| Mi | 0.112 | 0–1; higher is more readable |
| LLOC | 19 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs |
| BTTF | 0.467 | 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. | 2055.329 | −67.826 |
| Source linesThe number of non-empty source lines. | 88 | +35.2 |
| 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.81 | −7.216 |
Intercept 8.87 + feature contributions = -30.972 (log-odds).
Score = sigmoid(-30.972) = 0.
| Score | 0.629 |
|---|
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. | 89 | −2.115 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 60 | +1.338 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 60 | −0.956 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 87.891 | +0.819 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97.742 | +0.773 |
| 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. | 99.966 | −0.569 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.052 | +0.44 |
Intercept 0.07 + feature contributions = -0.2 (log-odds).
Score = sigmoid(-0.2) = 0.45.
| Score | 0.112 |
|---|
| Score | 19 |
|---|
Run 1
This code demonstrates excellent readability. The structure is logical, with clear separation of factory methods, constructors, and serialization logic. Javadoc documentation is thorough and helpful, particularly for public APIs. Nesting is minimal and flat. Intent is highly clear—each method has a descriptive name and purpose. Code length is appropriate; there's no unnecessary verbosity. Action granularity is good, with one operation per line in most cases. Reading flow is natural and follows a sensible order: class declaration, factory methods, constructors, then serialization. The only minor issues are the odd indentation on the @GwtIncompatible annotations for writeObject and readObject, and the slightly compressed format of the serialVersionUID declaration. These are cosmetic and don't significantly impact readability.
Run 2
The code is well-structured with clear separation of concerns: class-level Javadoc, factory methods, constructors, and serialization logic. Imports are organized. Nesting is minimal — only one level in the `create(Iterable)` method, and none elsewhere. Intent is clear: create a `Multiset` with predictable iteration order. Action granularity is good, with one logical action per line. Reading flow is natural, with static factories first, then constructors, then serialization. Minor issues: the `@GwtIncompatible @J2ktIncompatible` annotations on `writeObject` and `readObject` are oddly indented, breaking visual consistency; the `serialVersionUID` line is compressed, mixing three annotations and a field on one line. The long Javadoc URL is verbose but acceptable. Overall, highly readable with only cosmetic formatting inconsistencies.
Run 3
The code is well-structured, with a logical organization into factory methods, constructors, and serialization logic. Nesting is minimal, with only a few indentation levels in the method signatures. Intent is clear: the class defines a LinkedHashMultiset with predictable iteration order, and each method has a focused responsibility. Length is appropriate, with concise factory methods and serialization delegation to helper utilities. However, the code loses points for readability issues in the serialization methods: the indentation of writeObject and readObject is inconsistent, with the method annotations and visibility modifier indented at an unusual level, disrupting the natural reading flow. Additionally, the serialVersionUID declaration is compressed onto one line, violating the 'one action per line' principle. Despite these minor formatting inconsistencies, the overall structure follows Guava's standard conventions, making it understandable for developers familiar with the library.
Run 1
Code Structure: Logically organized into factory methods, constructors, and serialization hooks, with responsibilities cleanly delegated to helpers. Nesting: Flat methods with no nested control flow make scanning easy. Clarity of intent: Descriptive names and thorough Javadoc clearly explain creation options and iteration behavior; inherited implementation details require some external context. Code length: Methods are concise, and documentation is useful rather than excessive. Action granularity: Each executable statement performs a distinct action on its own line, although the final field declaration compresses annotations and declaration together. Reading flow: Consistent ordering and straightforward statement sequences provide a natural flow. Minor indentation inconsistencies in the serialization method declarations and compressed final annotations slightly reduce polish.
Run 2
Code Structure: Logically groups factory methods, constructors, and serialization hooks, with responsibilities cleanly separated. Nesting: Very shallow; methods contain straightforward statements without nested control flow. Clarity of intent: Descriptive names and useful Javadoc clearly explain creation options and iteration behavior, though inherited helpers require some external context. Code length: Concise implementation; documentation adds meaningful context rather than unnecessary verbosity. Action granularity: Executable statements generally perform one action per line; the final line compresses annotations and a field declaration. Reading flow: Natural progression from public creation methods to private implementation details. Minor formatting inconsistencies, particularly over-indented serialization method declarations, compressed field annotations, and missing spacing after the package declaration, slightly reduce readability.
Run 3
Code Structure: Well organized into factory methods, private constructors, and serialization helpers. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names and useful Javadoc clearly explain behavior, parameters, and iteration order; inherited implementation and helper calls require some external context. Code length: Concise implementation with documentation proportional to its public API. Action granularity: Statements generally perform one action per line, although the final field declaration crowds annotations and modifiers together. Reading flow: The progression from creation to initialization to serialization is natural. Minor formatting issues, including inconsistent indentation of serialization method declarations and missing separation after the package declaration, prevent a near-perfect score.