Sample
int-79342aa99518-SRC
Unmodified source class
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 | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 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
The code is highly readable. It follows a clear, conventional structure with package, imports, Javadocs, factory methods, constructors, and serialization logic arranged logically. Javadocs are thorough and explain intent well. Methods are concise and focused, with most lines performing one action. Nesting is minimal; only method signatures and a few annotations create indentation depth. The use of descriptive names like 'distinctElements' and 'inferDistinctElements' enhances clarity. Minor readability drawbacks include slightly awkward indentation before 'writeObject' and 'readObject' annotations, and the serialized form documentation is brief. Overall the code is well organized, easy to follow, and maintains a natural reading flow.
Run 2
The code is highly readable with clear structure and intent. It follows a logical organization: class documentation, static factory methods, constructors, serialization methods, and a serialization field. Nesting is minimal with no deep conditional blocks. Each action is on its own line, and methods are concise, delegating complex logic to helper utilities. The Javadoc is thorough, and method names clearly express their purpose. Minor stylistic issues, such as inconsistent indentation on annotations for writeObject/readObject and slightly long type signatures, prevent a perfect score, but these do not significantly impair readability. Overall, the code reads naturally and is maintainable.
Run 3
The code is highly readable with clear class-level documentation explaining iteration order guarantees. The structure is logical: factory methods are grouped together, constructors are private and minimal, and serialization methods are separate. Nesting is flat, with no complex control flow. Each method has a single clear purpose, and actions are concise—one statement per line in most cases. The Javadoc is informative without being excessive. Minor issues: the @GwtIncompatible/@J2ktIncompatible annotations are placed on separate lines from method signatures, which slightly disrupts visual flow, and serialVersionUID placement at the end feels slightly inconsistent with conventional ordering. The use of static factory methods and delegation to helper utilities (Multisets.inferDistinctElements, Iterables.addAll) enhances clarity by abstracting complex logic. Overall, this is well-structured, idiomatic Guava code that clearly communicates intent with minimal ambiguity.
Run 1
Code Structure: Factory methods, constructors, and serialization hooks are logically grouped with clear responsibilities. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names and useful Javadocs explain creation options and iteration semantics; inherited behavior and serialization helpers require some external context. Code length: The implementation is concise, and documentation adds useful context rather than unnecessary complexity. Action granularity: Each executable statement performs a focused action on its own line, although the final annotations and field declaration are compressed together. Reading flow: The progression from public factories to private implementation details is natural. Minor formatting inconsistencies, particularly over-indented serialization method declarations and the crowded serialVersionUID declaration, slightly reduce readability.
Run 2
Code Structure: Factory methods, constructors, and serialization hooks are logically grouped. Nesting: Methods are flat, with no deeply nested control flow. Clarity of intent: Descriptive names and useful Javadoc clearly explain creation options and iteration behavior; inherited implementation and serialization helpers require some external context. Code length: The implementation is concise, and documentation adds relevant detail rather than unnecessary verbosity. Action granularity: Statements generally perform one action per line; the final line compresses annotations and a field declaration. Reading flow: Consistent method ordering and short bodies make the code easy to follow, but extra indentation on serialization method declarations, crowded final annotations, and missing spacing after the package declaration slightly disrupt visual consistency.
Run 3
Code Structure: Clearly organized into factory methods, constructors, and serialization helpers. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and useful documentation explain iteration order, factory behavior, and serialization; inherited helpers require some external context. Code length: Concise implementation, with documentation adding useful context rather than unnecessary complexity. Action granularity: Statements generally perform one action per line, although the final field declaration combines annotations and modifiers. Reading flow: Logical method ordering and consistent spacing make the class easy to follow. Minor formatting issues—over-indented serialization method declarations, compressed final annotations, and no separation between the package and imports—slightly reduce polish.