Sample

int-0a99e64b7b61-I06

Invert eligible conditions and exchange their branches

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

The code is highly readable. It has a clear, logical structure with a single class definition, standard package/import ordering, and proper Javadoc on both the class and its methods. Nesting is flat—just one field and two simple methods. Intent is explicit: the class name and method names clearly convey the purpose of managing an options object for altering client quotas. The code is concise, with no unnecessary boilerplate. Action granularity is appropriate: each method contains one logical action (return the field or assign the field and return this). Reading flow is natural, following the standard JavaBean/Builder pattern. The only minor deduction is the redundant 'this' references, which some style guides discourage, but they do not harm clarity.

Run 3

This code is highly readable. It follows a clear and logical structure: package declaration, imports, class-level Javadoc, class declaration, a single field, and two well-documented methods. Nesting is minimal and appropriate. The intent of each method is unambiguous, with descriptive names like 'validateOnly' and clear Javadoc explaining both getter and setter behavior. The code is concise without being cryptic—each method performs exactly one task. Action granularity is excellent, with a single statement per line. The reading flow is natural, moving from field declaration to getter to setter, and the fluent return pattern (returning 'this') is a common and expected convention in such API classes. Minor points: no validation logic exists to justify the 'validateOnly' flag beyond storage, but this is acceptable for a simple options class. Overall, the code sets a strong example of clean, maintainable Java.

Run 1

1. Code Structure: Logically organized into a single options class with a field, getter, and fluent setter. 2. Nesting: Minimal nesting and no conditional branches make it easy to follow. 3. Clarity of intent: Descriptive class and method names, supported by Javadoc, clearly explain validation-only behavior; 'configs' is slightly less precise than 'quotas'. 4. Code length: Compact and appropriate for its purpose, with no unnecessary complexity. 5. Action granularity: Each statement performs one action on its own line. 6. Reading flow: Natural progression from class documentation to state and accessor methods; spacing between the package declaration and imports would slightly improve presentation.

Run 2

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 class and method names, supported by Javadoc, clearly communicate validation-only behavior; 'configs' is slightly less precise than 'client quotas.' Code length: Concise, with no unnecessary logic or excessive documentation. 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 visual separation.

Run 3

Code Structure: A logically organized options class with a single field, getter, and fluent setter. Nesting: No nested control flow, making it easy to scan. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior, though referring to 'configs' rather than quotas slightly reduces precision. Code length: Short and focused, with no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: The field-to-getter-to-setter sequence is natural; a blank line after the package declaration would improve visual separation.