Sample

int-72b521bbeb5a-SRC

Unmodified source class

Lines31

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.8180–1; higher is more readable
Dorn0.5410–1; higher is more readable
Mi0.260–1; higher is more readable
LLOC3Logical lines; fewer is more readable
DeepSeek V4 Pro180–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.6950–1; higher is more readable

Views

Source code

package io.netty.util; import io.netty.microbench.util.AbstractMicrobenchmark; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Param; import org.openjdk.jmh.annotations.Threads; import org.openjdk.jmh.annotations.Warmup; import java.util.concurrent.TimeUnit; @Threads(1) @Warmup(iterations = 3) @Measurement(iterations = 3) @OutputTimeUnit(TimeUnit.MICROSECONDS) public class GetIpV6ByNameBenchmark extends AbstractMicrobenchmark { @Param({ "::", "::1234:2345", "1234:2345::3456:7890", "fe80::bdad:7a67:6fcd:fa89", "fe80:bdad:7a67:6fcd::fa89", "1234:2345:3456:4567:5678:6789:0:7890" }) private String ip; @Benchmark public byte[] getIPv6ByName() { return NetUtil.getIPv6ByName(ip, true); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.

Score0.818

Feature contributions

FeatureValueContribution
(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.

Score0.26
Score3
Run 1

The code is highly readable. It has a clear, single-purpose structure: a JMH benchmark class with package, imports, annotations, parameters, and one benchmark method. There is no nesting beyond the class level, and the benchmark method contains exactly one action—calling the utility method. Annotations and import ordering follow conventional Java style, making the reading flow natural. The use of `@Param` with inline literals is concise but slightly reduces readability compared to a separate constants list; however, it is acceptable for benchmark configurations. Overall, the code is short, unambiguous, and organized with clear intent.

Run 2

The code is highly readable due to its simple structure and clear intent. It is a JMH benchmark class with flat nesting and a single benchmark method. Annotations are logically grouped at the top, and the parameterized test data is clearly separated. Each action—method invocation and return—is concise and single-purpose. The code length is minimal, with no unnecessary clutter or comments. The reading flow is natural, moving from setup to benchmark method. Minor deductions could be made for the lack of explanatory comments or package import line formatting, but overall the code is very clean and easy to understand.

Run 3

The code is highly readable. It has a clear logical structure with imports, annotations, class declaration, field, and method arranged sensibly. Nesting is essentially flat. Intent is unambiguous: a JMH benchmark measuring NetUtil.getIPv6ByName for various IPv6 strings. Code length is minimal and appropriate. Action granularity is good, with one meaningful operation per line, though annotations are denser. Reading flow is natural, moving from setup to execution. Minor deductions: the parameter list could be slightly more compact, and no whitespace between field and method is a trivial style nit. Overall, it is concise, self-explanatory, and well-organized.

Run 1

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 and standard JMH annotations clearly communicate an IPv6 parsing benchmark; however, the meaning of the boolean argument true is not immediately apparent. Code length: Concise, with no unnecessary logic or boilerplate. Action granularity: Each annotation and statement serves a single purpose, and each test input occupies its own line. Reading flow: The progression from configuration to inputs to execution is natural. Minor formatting improvements, such as separating the package declaration from imports, would improve readability.

Run 2

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 one clear operation in a single return statement. Reading flow: Configuration naturally leads into test inputs and execution, though blank lines separating the package and import groups would improve visual organization.

Run 3

Code Structure: Imports, benchmark configuration, input parameters, and the benchmark method are logically organized. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name, annotations, IPv6 examples, and method name clearly identify the benchmark's purpose; the unexplained boolean argument slightly reduces clarity. Code length: Concise, with no unnecessary implementation or boilerplate. Action granularity: Each declaration and the single method action are clearly separated. Reading flow: Natural top-to-bottom progression from configuration to inputs to execution; a blank line after the package declaration and clearer import grouping would improve presentation.