Sample
int-b3e0674267a9-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.818 | 0–1; higher is more readable |
| Dorn | 0.541 | 0–1; higher is more readable |
| Mi | 0.26 | 0–1; higher is more readable |
| LLOC | 3 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.695 | 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. | 923.471 | −30.475 |
| Source linesThe number of non-empty source lines. | 31 | +12.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. | 5.188 | −7.782 |
Intercept 8.87 + feature contributions = -16.987 (log-odds).
Score = sigmoid(-16.987) = 0.
| Score | 0.818 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 67.875 | +0.79 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 31 | +0.335 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 31 | −0.291 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.032 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.928 | +0.022 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 29 | +0.01 |
Intercept 0.07 + feature contributions = 0.165 (log-odds).
Score = sigmoid(0.165) = 0.541.
| Score | 0.26 |
|---|
| Score | 3 |
|---|
Run 1
This code is highly readable. It follows a clear, logical structure: package and imports first, then class-level annotations, then the benchmark parameter and method. Nesting is minimal and the code is flat. The intent is immediately clear — benchmarking NetUtil.getIPv6ByName with various IPv6 addresses. The code is concise, with no unnecessary boilerplate. Each annotation is on its own line, and the benchmark method is a single, straightforward action. The reading flow is natural, moving from setup (threads, warmup, measurement) to parameterized inputs to the benchmark logic. The only minor drawback is the long list of @Param values, but it is well-formatted and easy to scan.
Run 2
The code is highly readable and well-structured. It is a concise JMH benchmark class with clear annotations controlling threading, warmup, measurement, and output units. Imports are organized, and the class extends a relevant base class. The @Param annotation cleanly lists IPv6 test cases, making intent obvious. The benchmark method is a single action—calling NetUtil.getIPv6ByName—with no unnecessary nesting or branching. Naming is descriptive, and the overall flow is natural: setup annotations, parameters, then benchmark method. The only minor issue is the absence of a newline between the package declaration and imports, but this does not meaningfully impact readability.
Run 3
The code is highly readable. Structure is clear: imports, class annotations, parameter field, and benchmark method are logically ordered. Nesting is effectively flat—the entire body is a single method with one return statement and no conditionals or loops. Intent is unambiguous from class and method names, and annotations clearly configure the benchmark. The code is concise, with no unnecessary boilerplate beyond required JMH setup. Each line performs a single logical action. Reading flow follows a natural top-down progression: configuration metadata first, then the benchmark action. Minor deduction due to the multi-line @Param array increasing vertical length slightly, but this is standard for readability of test data.
Run 1
Code Structure: Imports, benchmark configuration, test inputs, and the benchmark method are logically organized. Nesting: The code is flat, with no nested control flow. Clarity of intent: Class and method names clearly identify an IPv6 parsing benchmark, and annotations make its configuration explicit; the boolean argument 'true' is the only notably opaque detail. Code length: Concise, with no unnecessary logic or repetition. Action granularity: The method performs one clearly expressed operation, and each input occupies its own line. Reading flow: Configuration naturally leads to parameter data and then execution. A blank line after the package declaration and clearer import grouping would slightly improve presentation.
Run 2
Code Structure: Imports, benchmark configuration, parameter inputs, and the benchmark method are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name, JMH annotations, IPv6 examples, and method name clearly communicate the benchmark's purpose; the literal true argument is not self-explanatory. Code length: Concise, with no unnecessary logic or boilerplate. Action granularity: Each statement performs one clear action, and each test input occupies its own line. Reading flow: Configuration flows naturally into inputs and execution, though a blank line after the package declaration and separation of import groups would improve presentation.
Run 3
Code Structure: Imports, benchmark configuration, input parameters, and the benchmark method are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive class and method names, JMH annotations, and representative IPv6 inputs clearly convey the benchmark's purpose; the unexplained boolean argument slightly reduces clarity. Code length: Concise, with no unnecessary logic or boilerplate. Action granularity: The method performs a single operation in one return statement, and each parameter occupies its own line. Reading flow: Configuration naturally leads to inputs and execution. A blank line after the package declaration and consistent import grouping would improve visual separation.