Sample
int-2d44b7052c74-I11
Split eligible integer literals into pairs of short-named intermediate variables
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.67 | 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
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 highly readable. It has clear, logical structure with well-organized static factory methods first, followed by private constructors and serialization methods. Nesting is minimal, with no deep indentation or complex conditional blocks. Intent is explicit through descriptive method names, detailed Javadoc, and clear parameter names. Code length is appropriate—concise while maintaining necessary documentation. Action granularity is mostly one action per line, though some lines combine multiple actions (e.g., Iterables.addAll). Reading flow is natural: create methods flow logically, and serialization methods follow standard patterns. Minor issues include slightly inconsistent indentation before writeObject/readObject and the overloaded create(int) method lacking a more descriptive name or parameter clarification beyond Javadoc.
Run 3
The code is highly readable, well-structured, and follows clear conventions. It has a logical organization with class-level Javadoc, factory methods grouped together, and serialization methods separated. Nesting is minimal and flat. Intent is clear through descriptive method and variable names. The code is concise without being overly verbose. Action granularity is appropriate, with one logical action per line. Reading flow is natural, moving from public API to private implementation details. Minor deductions: the annotations and method signatures on the writeObject/readObject methods have slightly awkward indentation, and the serialVersionUID line could be on its own line for consistency, but these are very minor formatting issues.
Run 1
Code Structure: Factory methods, constructors, and serialization helpers 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 ordering behavior and creation options, although inherited functionality and utility calls require external context. Code length: The implementation is concise; documentation adds length but provides relevant information. Action granularity: Each executable statement performs one distinct action, making methods easy to follow. Reading flow: Organization and consistent method patterns support natural reading, but the extra indentation on serialization method declarations and the compressed annotations and serialVersionUID declaration introduce minor formatting inconsistencies.
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 thorough Javadoc clearly explain iteration behavior and creation options; inherited implementation 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 one clear action; the final line compresses annotations and a field declaration. Reading flow: Organization and consistent method patterns make the class easy to follow, but missing spacing after the package declaration, over-indented serialization method declarations, and compressed final annotations slightly disrupt visual consistency.
Run 3
Code Structure: Logically groups factory methods, constructors, and serialization helpers. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and useful Javadoc explain iteration order, creation options, and serialization; inherited behavior and external helpers require some context. Code length: Methods are concise, and documentation is relevant rather than excessive. Action granularity: Each executable statement performs one clear action, although the final field declaration compresses annotations and modifiers onto one line. Reading flow: Consistent method ordering and straightforward statements make the class easy to follow. Minor formatting issues—extra indentation on serialization method declarations, compressed field annotations, and no spacing between package and import sections—slightly reduce polish.