Sample
int-4745f5b50ff7-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.61 | 0–1; higher is more readable |
| Dorn | 0.438 | 0–1; higher is more readable |
| Mi | 0.447 | 0–1; higher is more readable |
| LLOC | 19 | 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.612 | 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. | 2237.639 | −73.842 |
| Source linesThe number of non-empty source lines. | 90 | +36 |
| 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.98 | −7.47 |
Intercept 8.87 + feature contributions = -36.442 (log-odds).
Score = sigmoid(-36.442) = 0.
| Score | 0.61 |
|---|
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. | 91 | −2.186 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 70 | +1.684 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 70 | −1.185 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 89.85 | +0.846 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97.912 | +0.775 |
| 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.956 | −0.526 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.069 | +0.274 |
Intercept 0.07 + feature contributions = -0.248 (log-odds).
Score = sigmoid(-0.248) = 0.438.
| Score | 0.447 |
|---|
| Score | 19 |
|---|
Run 1
The code is highly readable due to its clear structure, minimal nesting, and strong documentation. Each class and method has a well-defined purpose, with inherited methods documented via inline comments explaining complexity trade-offs (e.g., O(log N) optimizations). Naming is descriptive and follows Java conventions. The file is concise without sacrificing clarity; complex logic is isolated and justified. Comments address subtle concerns like comparator consistency and GWT compatibility, enhancing understanding without clutter. Most methods are one to three lines, keeping a natural reading flow. Slight deductions for the slightly awkward formatting of the last method’s annotation and rare reliance on comments to explain non-obvious invariant decisions, but overall this is exemplary readable code.
Run 2
The code is well-structured with clear class hierarchy, moderate nesting, and purposeful overrides. The class has a single responsibility and methods are concise with good action granularity—each line performs one logical operation. Comments explain non-obvious decisions, like O(log N) optimizations and comparator inconsistency handling. However, the reading flow is disrupted by excessive interleaved annotations (GwtIncompatible, J2ktIncompatible, SuppressWarnings) that break visual scanning, especially on the final method where annotations consume more lines than the actual logic. The indentation of the writeReplace method is inconsistent, slightly hurting readability. The class size is appropriate, but the density of annotations and comments creates some cognitive overhead. Overall, the code is maintainable and readable for experienced Guava developers, but could be more accessible with cleaner annotation placement and fewer caveats.
Run 3
The code is highly readable with a clear, logical structure and minimal nesting. Class purpose is well-documented, and each method implements a single, focused action. Method names and comments effectively communicate intent, especially explaining performance optimizations like O(log N) indexOf. Annotations are appropriately placed and don't obscure logic. Slight deductions for: a minor indentation issue on the writeReplace() method, and a few verbose comments (TODO and explanatory blocks) that add some clutter, though they provide useful context. Overall, the code maintains a natural reading flow and follows consistent conventions.
Run 1
Code Structure: Logically organized into small overrides with clear delegation and related lookup methods grouped together. Nesting: Nearly flat, with no nested control flow; the conditional expression is straightforward. Clarity of intent: Descriptive names and comments explain lookup complexity, comparator inconsistencies, and platform restrictions, although understanding some details requires familiarity with the superclass and library internals. Code length: Implementation is concise, but lengthy TODO comments and numerous annotations slightly interrupt readability. Action granularity: Statements generally perform one action per line; chained calls remain simple and readable. Reading flow: Methods follow a natural progression from delegation and comparison to lookup, sublists, iteration, and serialization. Minor formatting issues, especially the extra indentation of writeReplace(), and the abbreviated 'ISS' comment reduce polish.
Run 2
Code Structure: Logically organized into small, focused overrides with consistent delegation. Nesting: Essentially flat, with no nested control flow. Clarity of intent: Descriptive names and comments explain performance choices and comparator-equality edge cases; framework-specific annotations, abbreviations, and an internal bug reference require background knowledge. Code length: Methods are concise, although lengthy TODO comments add some clutter. Action granularity: Statements generally perform one action per line; the conditional return remains easy to understand. Reading flow: Method grouping and consistent formatting support natural reading, but annotations interleaved with comments slightly interrupt it, and writeReplace has inconsistent indentation.
Run 3
Code Structure: Logically organized into small, focused overrides, with delegation keeping responsibilities clear. Nesting: Nearly flat throughout; the conditional expression in indexOf is simple to follow. Clarity of intent: Descriptive method names and comments explain performance goals and comparator-versus-equals behavior, though library-specific abbreviations and optimizer references require context. Code length: Implementation is concise, but lengthy TODO comments and compatibility annotations add visual overhead. Action granularity: Statements generally perform one action per line; chained calls and the bitwise characteristics expression remain readable. Reading flow: Methods progress naturally from delegation and lookup to sublists, iteration, and serialization. Minor distractions include inconsistent indentation on writeReplace and dense annotation/comment blocks.