Sample
int-7753dd57426c-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.63 | 0–1; higher is more readable |
| Dorn | 0.449 | 0–1; higher is more readable |
| Mi | 0.112 | 0–1; higher is more readable |
| LLOC | 18 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.45 | 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. | 2036.701 | −67.211 |
| 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.816 | −7.224 |
Intercept 8.87 + feature contributions = -30.365 (log-odds).
Score = sigmoid(-30.365) = 0.
| Score | 0.63 |
|---|
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.911 | +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.434 |
Intercept 0.07 + feature contributions = -0.206 (log-odds).
Score = sigmoid(-0.206) = 0.449.
| Score | 0.112 |
|---|
| Score | 18 |
|---|
Run 1
The code is highly readable. It follows a clear, logical structure: class-level Javadoc, factory methods, constructors, serialization methods, and constants. Intents are explicit through descriptive method names and complete Javadoc comments. The class is concise, with no redundant code. Action granularity is well-managed, with one primary action per line in core methods. Nesting is minimal and controlled. Reading flow is natural, moving from public API to internal details. Minor deductions: the blank line inside readObject slightly disrupts flow, and the serialization methods rely on external context for meaning, but overall it exemplifies clean, maintainable code.
Run 2
The code is well-structured, with clear separation of factory methods, constructors, and serialization logic. Nesting is minimal, and intent is evident from descriptive method and parameter names. Javadoc comments explain purpose and behavior. Action granularity is mostly one action per line, though serialization methods mix stream operations with collection manipulation. Reading flow is natural, following a logical progression from public API to internal implementation. Minor issues include inconsistent indentation on @GwtIncompatible annotations and a slightly compressed serialVersionUID declaration, but these do not significantly hinder readability. Overall, the code is concise for a collection implementation and adheres to clean coding conventions.
Run 3
The code is generally well-structured and readable. The class-level Javadoc clearly explains behavior, and factory methods are neatly separated with their own documentation. The three `create` overloads read naturally, showing logical progression from empty to sized to iterable. Nesting is minimal, and most lines express a single action. The main readability issue is the inconsistent indentation of `writeObject` and `readObject`: the annotations at lines 82-83 and 91-92 are over-indented relative to the access modifier, creating visual disorientation. Additionally, the mixed-generation serialization logic places a field definition after methods, which slightly disrupts reading flow. Overall, the code is concise, uses descriptive method names, and follows Guava style conventions closely, but minor formatting inconsistencies prevent a higher score.
Run 1
Code Structure: Factory methods, constructors, and serialization methods are logically grouped. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names and helpful Javadoc clearly explain creation and iteration behavior, although serialization details depend on external helpers. Code length: Implementations are concise; documentation adds useful context rather than unnecessary verbosity. Action granularity: Each executable statement performs a focused action on its own line. Reading flow: Organization is natural and consistent overall, but extra indentation on serialization method declarations, compressed annotations on serialVersionUID, unnecessary parentheses around stream.readInt(), and stray whitespace slightly disrupt presentation.
Run 2
Code Structure: Factory methods, constructors, and serialization hooks are logically grouped. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names and useful Javadoc clearly explain creation options and iteration behavior, though some implementation details depend on inherited methods and helpers. Code length: The implementation is concise; documentation adds useful context rather than unnecessary bulk. Action granularity: Statements generally perform one action per line, although the final line combines annotations and a field declaration. Reading flow: Method ordering and consistent naming make the code easy to follow. Minor formatting issues—overindented serialization method declarations, missing spacing after the package declaration, and redundant parentheses around stream.readInt()—slightly reduce polish and readability.
Run 3
Code Structure: Factories, constructors, and serialization methods are logically grouped with clear responsibilities. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names and useful Javadoc clearly explain behavior, although inherited functionality and serialization helpers require external context. Code length: The implementation is concise; documentation adds useful context rather than unnecessary bulk. Action granularity: Executable statements generally perform one action per line, though the final declaration compresses annotations and a field onto one line. Reading flow: Organization is natural and consistent overall. Minor distractions include misindented serialization method declarations, missing spacing after the package declaration, and redundant parentheses around stream.readInt().