Sample
int-21a0a12cab3b-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.046 | 0–1; higher is more readable |
| Scalabrino | 0.853 | 0–1; higher is more readable |
| Dorn | 0.766 | 0–1; higher is more readable |
| Mi | 0.382 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.687 | 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. | 1135.35 | −37.467 |
| Source linesThe number of non-empty source lines. | 82 | +32.8 |
| 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.828 | −7.241 |
Intercept 8.87 + feature contributions = -3.038 (log-odds).
Score = sigmoid(-3.038) = 0.046.
| Score | 0.853 |
|---|
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. | 83 | −1.902 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 57 | +1.234 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 98.699 | +0.788 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 81.832 | +0.734 |
| 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.88 | −0.565 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.431 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.188 (log-odds).
Score = sigmoid(1.188) = 0.766.
| Score | 0.382 |
|---|
| Score | 15 |
|---|
Run 1
The code is highly readable due to its logical structure and clear intent. The interface declaration is straightforward, with a concise yet informative Javadoc explaining the behavior and contract deviations. Method declarations are flat, with no nesting, and each method is presented on a single line, making the structure easy to scan. The use of @Override and @CanIgnoreReturnValue annotations is consistent, and the brief comments for each method clarify the intended use when return values are ignored. Imports are organized and limited. The code avoids unnecessary length, with only essential methods and documentation. Reading flow is natural, grouping related read methods logically. Overall, this is an exemplary implementation of a well-documented, minimal interface.
Run 2
This code is highly readable due to its clear structure and consistent formatting. The interface declaration is well-documented with a Javadoc comment explaining its purpose, behavior, and warning about misuse. Each method override is placed on a separate line with a concise comment where necessary, enhancing clarity of intent. There is no unnecessary nesting, and the code is appropriately concise for an interface declaration. The annotations (@CanIgnoreReturnValue, @Override) are consistently applied, and comments clarify the purpose of each method. The reading flow is natural, with methods grouped logically by type. Minor deductions are due to the repetitive comments, but they serve a clear purpose in this context.
Run 3
The code is highly readable due to its clean, logical structure and clear intent. It is a simple interface extension with method declarations that are flat—no deep nesting. Each method is concise and one action per line, improving scanning and comprehension. The Javadocs provide useful context about behavior and contract differences, and inline comments clarify why return values should not be ignored. Reading flow is natural, following the original DataInput method order. Minor deductions: the interface's length is somewhat driven by many override declarations, but this is inherent to the design and not unnecessarily verbose.
Run 1
Code Structure: A well-organized interface with consistent method declarations and annotations. Nesting: Flat, with no nested logic. Clarity of intent: The Javadoc clearly explains the interface's purpose, exception behavior, and caller responsibilities; method names are familiar and descriptive, though parameter names are terse. Code length: Appropriate for the API, with some repetitive annotations and comments but no unnecessary implementation detail. Action granularity: Each method declaration occupies its own line, with annotations clearly associated with it. Reading flow: Methods follow a natural progression through input operations, supported by consistent spacing. Minor drawbacks include the lack of separation between the package and imports and slightly repetitive skip-related comments.
Run 2
Code Structure: The interface is logically organized, grouping related read operations in a consistent order. Nesting: There is no nested control flow; all declarations are flat. Clarity of intent: The interface name, standard DataInput method names, and class documentation clearly communicate its purpose and exception behavior. Parameter names such as b and off are terse but conventional. Code length: Concise for an interface that redeclares inherited methods without checked exceptions; repeated annotations are justified. Action granularity: Each method declaration occupies its own line, with annotations clearly separated. Reading flow: Consistent spacing and annotation placement make the methods easy to scan. Minor drawbacks include missing separation between the package and imports and repetitive inline comments, but neither significantly impairs readability.
Run 3
Code Structure: A well-organized interface with consistently formatted declarations and logically ordered read operations. Nesting: Completely flat apart from the interface scope. Clarity of intent: The class documentation clearly explains its purpose, exception behavior, and caller responsibilities; method names follow the familiar DataInput API. Code length: Concise for the API exposed, although repeated annotations and comments add slight visual overhead. Action granularity: Each method declaration occupies its own line, with annotations separated clearly. Reading flow: Consistent spacing and predictable declaration patterns make scanning easy. Minor drawbacks include abbreviated parameter names and the absence of spacing between the package declaration, imports, and import groups.