Sample
int-3ea4421a63c9-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.636 | 0–1; higher is more readable |
| Dorn | 0.764 | 0–1; higher is more readable |
| Mi | 0.648 | 0–1; higher is more readable |
| LLOC | 14 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.58 | 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. | 1453.013 | −47.949 |
| 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.76 | −7.141 |
Intercept 8.87 + feature contributions = -26.62 (log-odds).
Score = sigmoid(-26.62) = 0.
| Score | 0.636 |
|---|
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. | 50 | −0.734 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 91.9 | +0.678 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 39 | +0.612 |
| 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.796 | +0.272 |
| 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. | 91.96 | −0.23 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.108 |
Intercept 0.07 + feature contributions = 1.174 (log-odds).
Score = sigmoid(1.174) = 0.764.
| Score | 0.648 |
|---|
| Score | 14 |
|---|
Run 1
The code has reasonable structure and basic delegation, but it contains obvious typos ('clo', 'has', 'nex') which would break compilation and severely hurt readability. These likely indicate a corrupted snippet. Nesting is minimal, but method names are unclear because of truncation. The single conditional and null check in 'nex' is straightforward, but the intent of the adapter is not strongly expressed in the logic itself—only in the class comment. The class is concise, but the corrupted method signatures and variable names ('key2') make it ambiguous and disorganized. Without the typos it would be more readable, but as written it fails basic clarity and flow.
Run 2
The code is generally readable but suffers from naming inconsistencies that harm clarity. The class structure is logical and flat, with minimal nesting and one action per line. However, method names 'clo()', 'has()', 'nex()', and 'peek()' appear to be typos or truncated variants of standard interface methods (close, hasNext, next, peekNextKey). This significantly undercuts clarity of intent and makes the reading flow feel disjointed, particularly since the return type of 'peek()' is 'Windowed<Bytes>' while delegating to 'peekNextKey()'. The variable name 'key2' is also poorly chosen, suggesting a leftover or unclear intent, despite it actually representing the next key-value entry. The Javadoc is helpful, but the adapter logic itself is minimal enough that the naming issues dominate the readability assessment. Concise length and flat structure are positives, but consistent, meaningful names are critical for maintainability.
Run 3
The code has a clear purpose and a simple adapter pattern, but several issues hurt readability. The method names are truncated—'clo', 'has', 'nex'—making the intent unclear and diverging from standard conventions ('close', 'hasNext', 'next'). The class Javadoc is helpful, but the import order and formatting could be improved. Nesting is flat and each method performs one action, which is good. However, variable names like 'key2' are confusing. Overall, the structure is logical but stripped-down naming and inconsistent style reduce clarity.
Run 1
Code Structure: The adapter is logically organized, with a single delegate field and small methods. Nesting: Minimal nesting and an early null return keep control flow simple. Clarity of intent: The class name and documentation clearly explain the compatibility conversion, but abbreviated method names (clo, peek, has, nex) and the variable key2 obscure meaning. These method names also appear inconsistent with the implemented interface, making the @Override annotations confusing. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action. Reading flow: Delegation methods followed by the conversion method provide a natural progression, although cramped import formatting and unclear identifiers interrupt readability.
Run 2
Code Structure: The adapter is logically organized, with a single wrapped iterator and small delegation methods. Nesting: Minimal nesting makes execution easy to follow. Clarity of intent: The class name and documentation clearly explain the compatibility conversion, but truncated method names (clo, peek, has, nex) and the vague variable key2 reduce clarity. These method names also do not match the expected KeyValueIterator interface methods, making the @Override annotations misleading. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action. Reading flow: Constructor, delegation methods, and conversion logic follow a natural progression; missing spacing around imports slightly reduces visual separation.
Run 3
Code Structure: The adapter is logically organized around a single wrapped iterator, with small delegation methods. Nesting: Minimal nesting and an early null return keep control flow simple. Clarity of intent: Class documentation clearly explains the compatibility purpose, but abbreviated method names (clo, peek, has, nex) and the vague variable key2 reduce clarity. The abbreviated methods also do not match the expected KeyValueIterator methods despite @Override annotations, creating confusion about interface compliance. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action. Reading flow: Constructor, delegation methods, and conversion logic follow a natural sequence, although missing spacing between package and imports slightly weakens presentation.