Sample
int-50032eb97bc4-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.998 | 0–1; higher is more readable |
| Scalabrino | 0.932 | 0–1; higher is more readable |
| Dorn | 0.706 | 0–1; higher is more readable |
| Mi | 0.335 | 0–1; higher is more readable |
| LLOC | 3 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.609 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 57 | +22.8 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 560.253 | −18.488 |
| 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.764 | −7.146 |
Intercept 8.87 + feature contributions = 6.036 (log-odds).
Score = sigmoid(6.036) = 0.998.
| Score | 0.932 |
|---|
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. | 57 | −0.982 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.621 | +0.754 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.029 | +0.656 |
| 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.948 | −0.568 |
| 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. | 56.881 | +0.385 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 26 | +0.162 |
Intercept 0.07 + feature contributions = 0.876 (log-odds).
Score = sigmoid(0.876) = 0.706.
| Score | 0.335 |
|---|
| Score | 3 |
|---|
Run 1
The code is well-structured as an interface with clear Javadoc, but readability is significantly harmed by misleading method names: 'load', 'send', and 'choose' do not reflect their actual behavior as 'peek', 'next', and 'remove'. This obscures intent and forces readers to rely on documentation. Structure and flat nesting are good, and action granularity is fine. However, the odd naming, redundant/inconsistent nullness annotations, and verbose Javadoc for simple methods reduce clarity and reading flow. Concise but confusing.
Run 2
The code is highly readable: it has a clear, logical interface structure with well-organized Javadoc. Nesting is minimal (none), and intent is unambiguous through descriptive method names and documentation. Action granularity is appropriate, with one annotation or declaration per line improving scanability. Reading flow is natural, following standard Java conventions. However, the method names ('load', 'send', 'choose') appear to be placeholders or obfuscated names that contradict the documentation (which refers to 'peek', 'next', 'remove'), slightly reducing clarity of intent. Otherwise, the code is concise and well-structured.
Run 3
The code is heavily obfuscated: 'load', 'send', and 'choose' replace 'peek', 'next', and 'remove', making the intent completely unclear relative to the documented PeekingIterator contract. Structure and indentation are fine, and nesting is absent, but clarity of intent is severely damaged by misleading naming. Action granularity is appropriate, but the reading flow is unnatural because the method names contradict their Javadoc and inherited semantics. The class is also suspiciously minimal for an interface with such misleading vocabulary, suggesting deliberate or accidental corruption. While formatting and brevity are acceptable, the core purpose is ambiguous and confusing, making the code hard to read and maintain in practice.
Run 1
Code Structure: The interface is logically organized, with imports, type documentation, and individually documented methods. Nesting: Flat declarations make scanning easy. Clarity of intent: Significantly weakened by method names load(), send(), and choose(), which conflict with documentation describing peek(), next(), and remove(). The @Override annotations on send() and choose() also contradict Iterator's method contracts. Code length: Reasonably concise, though extensive documentation becomes distracting because it describes different methods. Action granularity: Each declaration and annotation occupies its own line; there are no bundled actions. Reading flow: Conventional Java layout provides a natural sequence, but repeatedly reconciling names, documentation, and inheritance interrupts comprehension.
Run 2
Code Structure: The interface is logically organized, with imports, class documentation, and individually documented methods. Nesting: There is no deep nesting, making the declarations easy to scan. Clarity of intent: Significantly weakened by method names load(), send(), and choose(), which conflict with documentation describing peek(), next(), and remove(). The @Override annotations on send() and choose() are also inconsistent with Iterator's methods, making the intended contract confusing. Code length: The interface is concise, although documentation occupies most of the snippet. Action granularity: Each declaration and annotation is on its own line; there are no bundled operations. Reading flow: Formatting and method ordering are natural, but repeated references to undeclared methods interrupt comprehension and undermine otherwise clear documentation.
Run 3
Code Structure: The interface is logically organized with grouped imports and separately documented methods. Nesting: There is no deep nesting, making the layout easy to scan. Clarity of intent: Significantly weakened by method names load(), send(), and choose(), which conflict with documentation describing peek(), next(), and remove(). The @Override annotations on send() and choose() also contradict Iterator's API, creating confusion. Code length: Declarations are concise, though extensive documentation becomes distracting because it describes different methods. Action granularity: Each declaration and annotation occupies its own line, supporting readability. Reading flow: Formatting and method separation are consistent, but mismatches between names, documentation links, and inherited contracts repeatedly interrupt comprehension.