Sample
int-64d46fd83cdd-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.886 | 0–1; higher is more readable |
| Scalabrino | 0.959 | 0–1; higher is more readable |
| Dorn | 0.85 | 0–1; higher is more readable |
| Mi | 0.77 | 0–1; higher is more readable |
| LLOC | 3 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.575 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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.692 | −7.038 |
| Source linesThe number of non-empty source lines. | 16 | +6.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 187.296 | −6.181 |
Intercept 8.87 + feature contributions = 2.051 (log-odds).
Score = sigmoid(2.051) = 0.886.
| Score | 0.959 |
|---|
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. | 65.882 | +0.875 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 17 | +0.434 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 12 | −0.322 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 66 | +0.26 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.075 | +0.211 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 15.821 | −0.189 |
Intercept 0.07 + feature contributions = 1.737 (log-odds).
Score = sigmoid(1.737) = 0.85.
| Score | 0.77 |
|---|
| Score | 3 |
|---|
Run 1
The code is concise and well-structured. The package declaration, import, and annotations are clear. The interface has a clear purpose, supported by the Javadoc. The method names, however, are somewhat ambiguous: 'sort(long age)' and 'add()' do not clearly convey their intended function, and 'saveState()' seems out of place for an interface that 'concurrently add longs'. This reduces the clarity of intent. The code is otherwise flat, readable, and natural in flow.
Run 2
The code is highly readable due to its clean structure, minimal nesting, and clear intent. It defines a simple interface with three abstract methods, each on its own line, promoting one action per line. The package and import statements are logically placed, and the Javadoc provides a concise purpose. The reading flow is natural, moving from package declaration to import, then interface documentation and method declarations. Minor deductions: the method names ('saveState', 'sort', 'add') are slightly ambiguous without additional context—'sort(long age)' especially could benefit from a parameter name like 'timestamp' for clarity. The interface name 'LongAddable' suggests addition functionality, but the method names don't fully align with that concept, which slightly obscures intent. Overall, the code is concise (only 14 lines), well-organized, and easy to scan.
Run 3
The code is highly readable due to its clean structure, minimal nesting, and clear intent. The interface is concise, with one method declaration per line, and the package, import, and annotation are logically organized. The Javadoc succinctly explains the purpose. Minor ambiguity exists in method names like 'sort(long age)' and 'add()' without return context, but overall the code is straightforward and maintainable.
Run 1
Code Structure: The package, import, documentation, annotation, and interface are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The documentation describes concurrent addition, but saveState(), sort(long age), and add() do not clearly match that purpose; their names and signatures leave behavior ambiguous. Code length: The interface is concise with no unnecessary implementation detail. Action granularity: Each method declaration occupies its own line. Reading flow: The top-to-bottom layout is natural, although a blank line between the package and import would improve separation. Overall, the presentation is readable, but the inconsistent API semantics significantly weaken understanding.
Run 2
Code Structure: The package, import, documentation, annotation, and interface are logically organized. Nesting: There is no unnecessary nesting. Clarity of intent: The main weakness is the mismatch between the documentation about concurrently adding longs and methods named saveState, sort, and add; sort(long age) is particularly ambiguous, and add() returning a long without an argument is unexplained. Code length: The interface is concise, with no redundant implementation. Action granularity: Each method declaration occupies its own line. Reading flow: The layout is natural and easy to scan, though a blank line after the package declaration would improve separation. Overall, the formatting is highly readable, but the inconsistent naming and documentation obscure the interface's purpose.
Run 3
Code Structure: The package, import, documentation, annotation, and interface are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The main weakness is the mismatch between the documented purpose of concurrently adding longs and methods named saveState(), sort(long age), and add(); their roles and relationships are unclear. Code length: Very concise, with no unnecessary implementation detail. Action granularity: Each method declaration occupies its own line. Reading flow: Conventional Java ordering and spacing between methods support natural reading, though a blank line after the package declaration would improve visual separation.