Sample

int-9776b372c9e2-SRC

Unmodified source class

Lines27

Scores

MethodScoreScale
Posnett0.3260–1; higher is more readable
Scalabrino0.9490–1; higher is more readable
Dorn0.7290–1; higher is more readable
Mi0.8070–1; higher is more readable
LLOC6Logical lines; fewer is more readable
DeepSeek V4 Pro18.670–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.8920–1; higher is more readable

Views

Source code

package org.apache.kafka.clients.admin; import org.apache.kafka.common.annotation.InterfaceAudience; import java.util.Collection; /** * Options for {@link Admin#alterClientQuotas(Collection, AlterClientQuotasOptions)}. */ @InterfaceAudience.Public public class AlterClientQuotasOptions extends AbstractOptions<AlterClientQuotasOptions> { private boolean validateOnly = false; /** * Returns whether the request should be validated without altering the configs. */ public boolean validateOnly() { return this.validateOnly; } /** * Sets whether the request should be validated without altering the configs. */ public AlterClientQuotasOptions validateOnly(boolean validateOnly) { this.validateOnly = validateOnly; return this; } }

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.406.997−13.431
Source linesThe number of non-empty source lines.27+10.8
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.645−6.967

Intercept 8.87 + feature contributions = -0.728 (log-odds).
Score = sigmoid(-0.728) = 0.326.

Score0.949

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.046+0.496
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.58.071+0.133
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.88.964−0.103
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.28+0.045
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.26.678−0.037
Indentation frequencyHow rapidly indentation changes from line to line.21−0.011

Intercept 0.07 + feature contributions = 0.991 (log-odds).
Score = sigmoid(0.991) = 0.729.

Score0.807
Score6
Run 1

The code is highly readable. It has a clear, logical structure with a single class extending a base options class. There is no nesting, and each method performs exactly one action. Intent is clear from the descriptive method and class names, and the Javadoc comments concisely explain purpose. The code is appropriately concise without unnecessary verbosity. Reading flow is natural, following a conventional getter/setter (fluent) pattern. Minor deduction because the class is minimal and the logic is simple, so it doesn't demonstrate complex structure, but for what it does, it is excellent.

Run 2

The code is highly readable. It follows standard Java conventions with a clear class structure, package declaration, imports, and Javadoc comments. The class extends AbstractOptions, and the validateOnly field, getter, and setter are logically organized. Nesting is minimal, with no deeply nested blocks. The intent is clear: this class provides options for altering client quotas, specifically a flag to validate without applying changes. The code is concise, with no unnecessary length or redundancy. Each action is on its own line, improving granularity. The reading flow is natural, moving from class declaration to field, then methods, with clear documentation. Minor deduction for lack of explicit access modifier on the boolean field, but this is a style choice. Overall, excellent readability.

Run 3

The code is highly readable. It follows a clear structure: package declaration, imports, Javadoc, class declaration, a single field, and two simple methods. Nesting is minimal since the class has no conditional logic or nested blocks. Intent is explicit through descriptive naming and clear Javadoc on public API methods. Code length is concise, with no unnecessary boilerplate. Each method performs a single action—returning or setting a value—and returns `this` for method chaining, which is straightforward. The reading flow is natural, moving from imports to class level then from getter to setter. Minor deductions: imports could be organized in a conventional grouping order, and the Javadoc wording for `validateOnly(boolean)` is slightly terse, but neither meaningfully hurts readability.

Run 1

Code Structure: A logically organized options class with one field, a getter, and a fluent setter. Nesting: Flat methods with no conditional or loop nesting. Clarity of intent: Descriptive names and Javadoc make validation-only behavior clear, though 'configs' is less precise than 'client quotas.' Code length: Concise, with no unnecessary logic; explicit initialization to false is slightly redundant. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from class documentation to state, getter, and setter; spacing between the package declaration and imports would slightly improve presentation.

Run 2

Code Structure: A logically organized options class with one field and clearly separated accessor and fluent setter. Nesting: Flat, with no control-flow nesting. Clarity of intent: Descriptive names and Javadoc explain validation-only behavior, although 'configs' is less precise than 'client quotas.' Code length: Concise, with no unnecessary logic; explicit initialization to false is slightly redundant. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from class documentation to state, getter, and setter; a blank line after the package declaration would slightly improve formatting.

Run 3

Code Structure: A logically organized options class with one field, a getter, and a fluent setter. Nesting: Flat methods with no conditional or loop nesting. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior, though 'configs' is less precise than 'client quotas.' Code length: Concise, with only a slightly redundant explicit false initialization. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from class documentation to state and accessors; import grouping and spacing could be polished.