Sample
int-54d235789937-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.773 | 0–1; higher is more readable |
| Dorn | 0.226 | 0–1; higher is more readable |
| Mi | 0.311 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.66 | 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.769 | −7.153 |
Intercept 8.87 + feature contributions = -23.573 (log-odds).
Score = sigmoid(-23.573) = 0.
| Score | 0.773 |
|---|
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.827 | +0.231 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.018 |
Intercept 0.07 + feature contributions = -1.232 (log-odds).
Score = sigmoid(-1.232) = 0.226.
| Score | 0.311 |
|---|
| Score | 15 |
|---|
Run 1
The code is highly readable. Structure is clear: class declaration, fields, setup/teardown, and benchmark methods are logically organized. Nesting is minimal—no deep blocks or conditional complexity. Intent is obvious from method names like setGetLongUnsafeByteBuf, and the benchmark comparison between unsafe and standard byte buffers is easy to grasp. Code length is appropriately concise for the task. Each method performs one action, and the fluent calls (e.g., unsafeBuffer.setLong(0, 1).getLong(0)) are readable despite combining two operations. Reading flow is natural: setup, benchmarks, teardown. Minor deductions: field setup details are slightly repetitive (two buffer initializations), and the teardown only releases one buffer, which could confuse if the other buffer required cleanup. Overall, this is clean, focused benchmark code.
Run 2
The code is well-structured and highly readable. It follows a clear logical organization with setup, teardown, and benchmark methods separated by annotations. Nesting is minimal—only one level for the class and method bodies. Intent is evident: benchmarking direct byte buffer operations. The code is concise, with no unnecessary verbosity. Each benchmark method performs a single action, maintaining solid action granularity. Reading flow is natural, progressing from imports through class declaration to setup, benchmarks, and teardown. Minor deductions could stem from the slightly verbose package and import section, but overall the code is exceptionally clear and maintainable.
Run 3
The code is well-structured with clear separation of concerns: setup/teardown, benchmark methods, and imports. Nesting is minimal, with only one class-level scope. Intent is clear — benchmarking unsafe vs standard byte buffer operations. The methods are concise and focused, each performing a single action per line. Reading flow is logical, grouping related functionality. Minor detractors include slightly verbose naming (e.g., `UnsafeByteBufBenchmark`, `setGetLongUnsafeByteBuf`) and repetitive method names, which reduce readability marginally. Overall, it is highly readable and maintainable.
Run 1
Code Structure: Clearly separates buffer fields, setup, teardown, and individual benchmarks. Nesting: Flat methods with no nested control flow. Clarity of intent: Descriptive method names and JMH annotations make the comparison between buffer implementations obvious; literal values 64, 0, and 1 lack explanatory names. Code length: Compact, with little unnecessary code. Action granularity: Most lines perform one action, though the set/get benchmarks chain writes and reads on a single line. Reading flow: Natural progression from initialization to cleanup and benchmark methods, with parallel implementations aiding comparison. Import grouping and spacing could be slightly cleaner.
Run 2
Code Structure: Clearly separates buffer fields, setup, teardown, and benchmark methods. Nesting: Flat methods with no nested control flow make scanning easy. Clarity of intent: JMH annotations and descriptive method names clearly communicate the comparison between buffer implementations; unexplained literals slightly reduce clarity. Code length: Concise, with little unnecessary code. Action granularity: Most lines perform one action, though the set/get benchmarks chain a write and read on one line; this remains easy to understand. Reading flow: The lifecycle methods precede logically paired benchmarks, creating a natural progression. Import grouping and spacing could be improved slightly.
Run 3
Code Structure: Setup, teardown, and benchmark methods are logically separated, with parallel methods making comparisons easy. Nesting: The code is flat, with no nested control flow. Clarity of intent: JMH annotations and descriptive method names clearly communicate the benchmark purpose; repeated numeric literals lack explanatory names. Code length: Short and focused, with little unnecessary code. Action granularity: Most lines perform one action, although the set/get benchmarks chain a write and read on a single line; this remains easy to understand. Reading flow: Initialization precedes cleanup and benchmark operations in a natural order. Import grouping and spacing could be improved slightly.