Sample
int-063d566ade1a-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.61 | 0–1; higher is more readable |
| Dorn | 0.729 | 0–1; higher is more readable |
| Mi | 0.549 | 0–1; higher is more readable |
| LLOC | 14 | 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.613 | 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. | 1421.457 | −46.908 |
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| 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.754 | −7.131 |
Intercept 8.87 + feature contributions = -25.57 (log-odds).
Score = sigmoid(-25.57) = 0.
| Score | 0.61 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 99.92 | +0.808 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 39 | +0.612 |
| 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.9 | −0.566 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.822 | +0.273 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.131 |
Intercept 0.07 + feature contributions = 0.991 (log-odds).
Score = sigmoid(0.991) = 0.729.
| Score | 0.549 |
|---|
| Score | 14 |
|---|
Run 1
The code is highly readable with clear structure and intent. The class serves a single purpose as a backward-compatibility adapter, and the Javadoc explains its role well. Nesting is minimal, code length is appropriate, and each method performs one action. The only minor issue is the null check in next(), which could be considered a slight defensive redundancy depending on the iterator contract, but it doesn't significantly impact readability.
Run 2
The code is highly readable due to its clear structure and delegation pattern. Each method performs a single, well-defined action, maintaining flat nesting and concise logic. The class and method names clearly communicate intent, and the Javadoc explains the adapter’s purpose. The `next()` method introduces a minimal null check without adding unnecessary complexity. Imports are specific, and the overall flow is natural and easy to follow.
Run 3
The code is highly readable. It has a clear, single-purpose class with a concise Javadoc explaining its backward-compatibility role. The structure is logical, following a standard adapter pattern. Nesting is minimal, with only one level inside the `next()` method. Intent is obvious from the class and method naming. The code is concise without being overly compact. Action granularity is appropriate, with one operation per line. The reading flow is natural, progressing from field declaration to constructor and then method implementations. The null check and conversion logic are straightforward. Minor deductions could be for the somewhat verbose generic type declarations, which are necessary but add visual noise.
Run 1
Code Structure: A focused adapter class cleanly separates construction, delegation, and value conversion. Nesting: Methods are flat, with only a single null-check branch in next(). Clarity of intent: Descriptive names and class documentation clearly explain the backward-compatibility purpose and header conversion. Code length: The implementation is concise; delegation methods contain no unnecessary logic. Action granularity: Each statement performs a distinct action, and the final expression combines closely related conversion and result construction naturally. Reading flow: Fields, constructor, and overridden methods follow a conventional order, making the class easy to scan. Minor formatting improvements, such as blank lines around the package declaration and static import group, would improve visual organization.
Run 2
Code Structure: A well-organized iterator adapter with a single responsibility and clearly separated methods. Nesting: Minimal; the only conditional is a straightforward null guard. Clarity of intent: Descriptive names and class documentation explain the compatibility purpose and value conversion. Code length: Concise, with only necessary delegation and transformation logic. Action granularity: Each statement performs one clear action; the final return naturally combines conversion with pair construction. Reading flow: Documentation, field, constructor, and iterator methods follow a logical progression. Minor formatting improvements, such as spacing between the package declaration and imports and separating the static import, would make the opening easier to scan.
Run 3
Code Structure: A well-organized adapter with a single responsibility and clearly separated iterator methods. Nesting: Minimal; the only conditional is a straightforward null guard. Clarity of intent: Descriptive class and field names, explanatory Javadoc, and explicit delegation make the purpose clear. Code length: Concise, with only necessary interface implementations and conversion logic. Action granularity: Each statement performs one clear action; the final return naturally combines conversion and pair construction. Reading flow: Documentation, field, constructor, and methods follow a conventional order, with the transformation isolated in next(). Minor formatting improvements, such as blank lines around the package and import groups, would improve readability further.