Sample
int-20a6951504ce-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.782 | 0–1; higher is more readable |
| Dorn | 0.223 | 0–1; higher is more readable |
| Mi | 0.317 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.655 | 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. | 1323.931 | −43.69 |
| Source linesThe number of non-empty source lines. | 46 | +18.4 |
| 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.798 | −7.197 |
Intercept 8.87 + feature contributions = -23.617 (log-odds).
Score = sigmoid(-23.617) = 0.
| Score | 0.782 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 46 | +0.854 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 46 | −0.635 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 44 | −0.522 |
| 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. | 97 | −0.443 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 45.816 | +0.231 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.097 | +0.002 |
Intercept 0.07 + feature contributions = -1.247 (log-odds).
Score = sigmoid(-1.247) = 0.223.
| Score | 0.317 |
|---|
| Score | 15 |
|---|
Run 1
The code is concise and well-structured, following a typical JMH benchmark pattern. The class hierarchy, annotations, and field declarations are logically organized. Nesting is minimal, and the reading flow is natural, moving from setup to teardown to benchmark methods. Each benchmark method performs a single action, maintaining good granularity. However, the method names 'clear', 'findItem', 'validateSession', etc. do not clearly reflect their purpose; names like 'setup' and 'teardown' are conventional, and benchmark names should describe the operation being measured (e.g., 'unsafeSetLongGetLong'). This reduces clarity of intent. Overall, readability is high but slightly hindered by misleading names.
Run 2
The code is generally readable with clear structure and intent. It follows a standard benchmark class layout with setup, teardown, and benchmark methods. Nesting is minimal (none beyond class/method level), and actions are concise—one operation per line in benchmark methods. However, readability is reduced by misleading method names: `clear()` for setup, `findItem()` for teardown, and benchmark methods named `validateSession`, `validateMessage`, etc., which do not reflect what they actually do (benchmarking buffer operations). This creates ambiguity about purpose. The code is concise overall, though slightly repetitive (two pairs of nearly identical benchmark methods). Reading flow is logical but the naming inconsistencies interrupt natural comprehension. The class is straightforward, but the mismatch between names and functionality is a notable readability flaw.
Run 3
The code is generally readable but suffers from misleading naming. The structure is logical and flat, with straightforward imports and class setup. Clarity of intent is weakened since method names like 'validateSession' or 'findItem' do not reflect their actual operations (e.g., setting/getting longs or releasing buffers). Action granularity is good—one significant action per line. Reading flow is natural, moving from setup to teardown to benchmarks. However, the naming inconsistencies and slightly verbose imports reduce the score.
Run 1
Code Structure: Fields, setup, teardown, and benchmark methods are logically organized and clearly separated. Nesting: The code is flat, with no nested control flow. Clarity of intent: JMH annotations reveal the benchmarking purpose, but misleading names such as clear, findItem, and validateSession obscure allocation, release, and buffer operations. Code length: Methods are concise, with little unnecessary code. Action granularity: Most lines perform one action, although two benchmarks chain a write and read in a single expression. Reading flow: Consistent formatting and paired buffer benchmarks make the code easy to follow, but inaccurate method names interrupt comprehension. More descriptive names and a named constant for the repeated buffer capacity would improve readability.
Run 2
Code Structure: Fields, setup, teardown, and benchmark methods are logically organized and clearly separated by annotations. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Buffer operations are straightforward, but misleading names such as clear, findItem, and validateSession obscure allocation, cleanup, and benchmarking purposes. Code length: The class is concise, with little unnecessary code, although repeated literals lack descriptive constants. Action granularity: Most lines perform one action; chained write-and-read operations combine two actions but remain easy to follow. Reading flow: The lifecycle-to-benchmark progression is natural, though inaccurate method names and minimal import spacing reduce readability.
Run 3
1. Code Structure: Fields, setup, teardown, and benchmark methods are logically organized, with annotations clearly identifying roles. 2. Nesting: No nested control flow; all methods are flat and easy to scan. 3. Clarity of intent: Buffer operations are straightforward, but names such as clear, findItem, and validateSession misleadingly suggest unrelated actions rather than allocation, release, or read/write benchmarking. Literal values lack explanatory names. 4. Code length: Compact, with minimal boilerplate and no unnecessarily long methods. 5. Action granularity: Most lines perform one action, although chained write/read calls combine two operations in a single expression. 6. Reading flow: The lifecycle-to-benchmarks sequence is natural, and parallel benchmark implementations support comparison. Misleading method names and tightly grouped imports weaken otherwise strong readability.