Sample

int-67cd974ca9f6-I11

Split eligible integer literals into pairs of short-named intermediate variables

Matched original source

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 well-structured and highly readable. It follows a clear class definition pattern with a single private field, a getter-like method, and a fluent setter. The nesting is flat, with no conditional or loop structures. Intent is explicit through descriptive method names and Javadoc comments. The code is concise, containing only essential logic without redundancy. Each method performs one clear action. The reading flow is natural, moving from field declaration to accessor to mutator. Minor deductions relate to the lack of null checks or validation (though not required for a boolean) and the absence of additional documentation for edge cases, but overall this is exemplary, idiomatic Java code.

Run 2

This is a highly readable class. The structure is logical and follows standard Java conventions, with a package declaration, imports, and a clear class definition. Nesting is non-existent; the class is completely flat. Intent is crystal clear from the class name, method names, and Javadoc comments, which succinctly explain the purpose of the API and its `validateOnly` flag. The code is concise, containing no unnecessary boilerplate. Each action, such as the return statement and the assignment in the setter, occupies its own line, promoting clarity. The reading flow is natural—the Javadoc is at the top, fields are declared, and the getter precedes the setter, aligning with common expectations.

Run 3

The code is highly readable and follows clean coding principles. It has a clear structure with a single class, one field, and two well-named methods. Nesting is minimal. Intent is explicit through descriptive method and parameter names, plus Javadoc comments. Code length is concise with no redundancy. Each statement performs one action, and the fluent setter (returning 'this') follows standard Kafka Admin API conventions, aiding natural reading flow.

Run 1

Code Structure: Logically organized into a field, getter, and fluent setter. Nesting: Flat, with no nested control flow. Clarity of intent: The class name, method names, and Javadoc clearly convey the validation-only option, although 'configs' is less precise than 'client quotas.' Code length: Concise, with minimal boilerplate and no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from the class purpose to stored state and access methods; a blank line after the package declaration would slightly improve formatting.

Run 2

Code Structure: A logically organized options class with one field and adjacent getter and fluent setter. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior; referring to 'configs' rather than client quotas is slightly imprecise. Code length: Concise, with no unnecessary logic; explicit initialization to false is mildly redundant. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from class documentation to state, getter, and setter. Minor import-spacing and ordering improvements would make the presentation more polished.

Run 3

Code Structure: A logically organized options class with one field, a getter, and a fluent setter. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior, though 'configs' is less precise than 'client quotas.' Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from declaration to state and accessors; minor spacing improvements around the package and imports would improve presentation.