Sample

int-5d3981601a3b-I10

Remove about 40% of line-break groups while retaining structure

Matched original source

Lines19

Scores

MethodScoreScale
Posnett0.0180–1; higher is more readable
Scalabrino0.9420–1; higher is more readable
Dorn0.7450–1; higher is more readable
Mi0.5450–1; higher is more readable
LLOC6Logical lines; fewer is more readable
DeepSeek V4 Pro3.670–20; mean of three runs
GPT-6.1 Sol140–20; mean of three runs
BTTF0.8650–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.19+7.6
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.683−7.025

Intercept 8.87 + feature contributions = -3.986 (log-odds).
Score = sigmoid(-3.986) = 0.018.

Score0.942

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.047+0.485
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.70.3+0.33
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.20+0.328
Indentation frequencyHow rapidly indentation changes from line to line.13−0.287
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.18.633−0.149
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.9−0.1

Intercept 0.07 + feature contributions = 1.074 (log-odds).
Score = sigmoid(1.074) = 0.745.

Score0.545
Score6
Run 1

The code is highly unreadable due to severe formatting issues that violate several criteria. The structure is tangled with methods, Javadoc comments, and fields compressed onto single lines, creating multiple actions per line and breaking the natural reading flow. For example, the field declaration 'private boolean validateOnly = false;' shares a line with the start of a Javadoc comment and method, and the closing braces of methods are followed immediately by comments on the same line. Nesting is not a major issue as the class is flat, but the clarity of intent is obscured because the compressed layout makes scanning difficult. While the code is technically concise, it is unnecessarily compressed, sacrificing readability for brevity. The action granularity is poor, as multiple logical actions (field declaration, comment, method signature) are packed together. The reading flow is severely disorganized, requiring the reader to mentally separate tangled elements. Overall, the code is difficult to parse and maintain despite its simple functionality.

Run 2

The code structure is severely compromised by poor formatting and layout. The class definition begins reasonably with package, import, and Javadoc, but the method declarations and inline comments are mashed together without proper line breaks. Nesting is minimal, which is a positive, but clarity of intent is undermined by comments being placed on the same line as code and methods ending abruptly. Code length is concise but at the cost of readability. Action granularity is violated: multiple actions (Javadoc, method signature, return, field declaration) appear on single lines. Reading flow is completely disorganized, forcing the reader to mentally parse dense, non-standard formatting. While the underlying logic is simple, the physical presentation makes the code nearly unreadable and difficult to maintain.

Run 3

The code is syntactically valid but poorly formatted. The major issue is readability: multiple declarations and doc comments are crammed onto single lines or merged awkwardly. This breaks all conventional Java style guides and makes the code difficult to scan. The class structure is simple, and the logic is trivial, but the layout defeats clarity. The field declaration is followed by a method comment on the same line, and the method itself begins on that same line. The javadoc for the setter is placed directly before the method signature with no line break. This hurts action granularity and reading flow, forcing the reader to parse dense lines. While the class intent is understandable, the presentation is more typical of minified code than maintainable source.

Run 1

Code Structure: The class logically groups a single option field with its getter and fluent setter, but cramped formatting obscures these boundaries. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior. Code length: Concise and appropriate for a simple options class. Action granularity: Method statements generally remain separate, but multiple imports share a line, and comments and braces are crowded onto adjacent declarations or statements. Reading flow: The field-to-getter-to-setter sequence is natural, but inconsistent line breaks and inline closing braces interrupt scanning. Conventional formatting would substantially improve readability.

Run 2

Code Structure: The class logically groups a single option with its getter and fluent setter, but cramped formatting weakens visual separation. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior, though 'configs' is less precise than 'client quotas.' Code length: Appropriately short, with no unnecessary logic. Action granularity: Method bodies contain simple individual actions, but multiple imports share a line, and declarations, comments, and braces are crowded together. Reading flow: The getter-to-setter progression is natural, but inconsistent line breaks and comments attached to preceding statements interrupt scanning.

Run 3

Code Structure: The class logically groups a single option with its getter and fluent setter, but inconsistent formatting weakens organization. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive names and Javadoc clearly explain validation-only behavior, though referring to configs rather than quotas is slightly imprecise. Code length: The implementation is concise without unnecessary logic. Action granularity: Imports share a line, and declarations, statements, braces, and comments are crowded together rather than consistently separated. Reading flow: The sequence is natural, but comments attached to preceding code and irregular brace placement interrupt scanning.