Sample
int-e25b8bb692da-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.999 | 0–1; higher is more readable |
| Scalabrino | 0.789 | 0–1; higher is more readable |
| Dorn | 0.795 | 0–1; higher is more readable |
| Mi | 0.293 | 0–1; higher is more readable |
| LLOC | 2 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.699 | 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. | 29 | +11.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.672 | −7.008 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 208.893 | −6.893 |
Intercept 8.87 + feature contributions = 6.569 (log-odds).
Score = sigmoid(6.569) = 0.999.
| Score | 0.789 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 117.967 | −1.331 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114.167 | +1.038 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.02 | +0.749 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 13 | −0.287 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.798 | −0.007 |
Intercept 0.07 + feature contributions = 1.354 (log-odds).
Score = sigmoid(1.354) = 0.795.
| Score | 0.293 |
|---|
| Score | 2 |
|---|
Run 1
The code is generally readable with a clear package structure, concise interface definition, and logical organization. Naming of constants and parameters is inconsistent and confusing — for example, method names 'validateAccount' do not reflect the documented purpose of managing priority queue indices, and parameter names like 'entry', 'value', and 'map' are misleading. Javadoc comments provide useful context, but some references are unclear (e.g., 'priorityQueueIndex' methods do not exist in this interface). The interface is short and flat, with one action per line, contributing to good readability. However, the mismatch between method names, parameter names, and actual intent reduces clarity. Overall, the code is structured well but suffers from naming inconsistencies that make the intent harder to grasp than necessary.
Run 2
The code has a clear and logical package/interface structure, with Javadoc explaining purpose. However, naming is confusing: methods named 'validateAccount' do not reflect their actual role of getting/setting priority queue indices. Parameter names like 'entry', 'queue', 'map', and 'i' are inconsistent and ambiguous. The method with one parameter appears to be a getter, while the two-parameter version is a setter, but names and docs do not clearly communicate this. Javadoc mentions 'priorityQueueIndex' methods that do not exist in the interface, causing further confusion. The interface is concise and not deeply nested, but clarity of intent is low due to misleading names and poor parameter naming. Action granularity and reading flow are adequate, but overall readability suffers from semantic mismatch between names and behavior.
Run 3
The code has serious readability issues. The method names `validateAccount` and parameter names like `entry`, `value`, `map` are completely unrelated to the interface's purpose — they suggest accounting, not priority queue indexing. The generic type `DefaultPriorityQueue<?>` appears where a node type might be expected, adding confusion. There is redundancy: two methods with identical names but different signatures, likely intended to be `priorityQueueIndex` getter and setter, yet neither name reflects this. Documentation is verbose but does not clarify intent, and some Javadoc references appear mismatched. Structure is flat, and formatting is standard, but clarity of intent and naming are severely lacking. The code is not convoluted, but the mismatch between semantics and naming makes it hard to understand and unsafe to use without external context.
Run 1
Code Structure: The interface is logically organized into a constant and two method declarations. Nesting: No nested control flow, making it easy to scan. Clarity of intent: The queue-state purpose is documented, but validateAccount misleadingly suggests account validation rather than index access. Generic parameter names entry, value, and map obscure their roles. Javadoc references nonexistent priorityQueueIndex methods, and @param names queue and i do not match the declaration. Code length: Compact, with reasonable documentation length. Action granularity: Each declaration occupies its own line without bundled actions. Reading flow: The constant followed by apparent getter/setter overloads provides a natural progression, but inconsistent naming and stale documentation force readers to infer the actual contract.
Run 2
Code Structure: A small, logically organized interface with a constant and two related method declarations. Nesting: Flat, with no nested control flow. Clarity of intent: The interface description and constant are clear, but validateAccount misleadingly names methods intended to access queue indices. Parameters entry, value, and map obscure their roles. Documentation references nonexistent priorityQueueIndex methods, and @param tags queue and i do not match the actual parameters. Code length: Concise overall, with appropriately sized documentation. Action granularity: Each declaration occupies its own line, with no combined actions. Reading flow: The constant followed by getter-like and setter-like declarations is natural, but inconsistencies between names and documentation interrupt comprehension and undermine confidence in the contract.
Run 3
Code Structure: The interface is logically organized into a constant and two method declarations. Nesting: There is no nested logic, making it easy to scan. Clarity of intent: The interface documentation explains priority-queue bookkeeping, but validateAccount misleadingly suggests account validation rather than index access. Parameters entry, value, and map obscure their roles. Javadoc references nonexistent priorityQueueIndex methods, and @param queue and @param i do not match the actual parameters. Code length: The code is concise, though documentation occupies most of it. Action granularity: Each declaration appears separately, with no combined actions. Reading flow: Formatting and declaration order are natural, but inconsistencies between documentation and signatures interrupt comprehension and undermine confidence in the intended contract.