Sample
int-44646c269b6d-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
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.548 | 0–1; higher is more readable |
| LLOC | 14 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.545 | 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.744 | −7.116 |
Intercept 8.87 + feature contributions = -26.595 (log-odds).
Score = sigmoid(-26.595) = 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.548 |
|---|
| Score | 14 |
|---|
Run 1
The code is well-structured and readable. It has a clear purpose documented in the class Javadoc, flat nesting with only one simple conditional, and concise methods that perform single actions. Method names like `findKey()` and `read()` are somewhat ambiguous compared to standard iterator methods (`hasNext()`, `next()`), which slightly reduces clarity of intent. The `audit()` method appears to be a misleadingly named `close()`, and `updateIndex()` returning `peekNextKey()` is confusing. These naming choices, likely imposed by an interface, detract from otherwise clean code.
Run 2
The code is well-structured with clear separation of concerns and a single responsibility. It uses a flat, minimal nesting structure, making it easy to follow. Intent is obvious from class and method names, and the Javadoc provides useful context. The adapter pattern is implemented concisely—no unnecessary verbosity. Each method performs one logical action, and the read() method cleanly handles null before transforming the value. While the method names (audit, updateIndex, findKey) are atypical and might confuse readers unfamiliar with this internal API, the overall reading flow remains natural and logical. Minor improvements could include more conventional naming, but the code is highly readable overall.
Run 3
The code is generally clean and readable, with good structure, clear class-level documentation, and mostly flat nesting. Methods are concise and follow a consistent, natural flow. However, some method names (audit, updateIndex, findKey) misleadingly suggest actions unrelated to their actual behavior (close, peekNextKey, hasNext), which obscures intent. The read method is straightforward but could be shortened slightly by returning a converted result inline. Overall, it's maintainable but would benefit from clearer naming aligned with standard iterator semantics.
Run 1
Code Structure: The adapter is logically organized, with one wrapped iterator, a constructor, and short delegation methods. Nesting: Almost entirely flat, with only a simple null guard. Clarity of intent: The class documentation clearly explains the compatibility purpose, but method names such as audit, updateIndex, findKey, and read obscure their actual iterator operations (close, peekNextKey, hasNext, and next). The constructor parameter cachedSession is also less precise than innerIterator. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs a single clear action. Reading flow: Documentation, initialization, and delegation follow a natural sequence, although misleading method names interrupt comprehension. These names also appear inconsistent with the implemented KeyValueIterator interface, undermining confidence in the code.
Run 2
Code Structure: A small, logically organized adapter with a single delegate and clearly separated methods. Nesting: Minimal; the only conditional is a straightforward null guard. Clarity of intent: Class documentation explains the compatibility purpose, but method names such as audit, updateIndex, findKey, and read obscure the delegated operations close, peekNextKey, hasNext, and next. These names also appear inconsistent with the implemented KeyValueIterator interface, making the overrides confusing. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear operation. Reading flow: Delegation is easy to follow, and the conversion method proceeds naturally from retrieval to validation to transformation. However, misleading method names and tightly grouped imports reduce readability.
Run 3
Code Structure: The adapter is logically organized around a single wrapped iterator, with small, focused methods. Nesting: Minimal; only one straightforward null check. Clarity of intent: Class documentation clearly explains the conversion purpose, but method names such as audit, updateIndex, findKey, and read obscure their actual close, peekNextKey, hasNext, and next operations. These names also appear inconsistent with the declared iterator interface. Code length: Concise without unnecessary implementation detail. Action granularity: Each statement performs one clear action, and the conversion is easy to identify. Reading flow: Delegation followed by value conversion is natural, although misleading method names interrupt comprehension and imports lack visual separation.