Sample
int-4d6d7fbcdfa6-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.307 | 0–1; higher is more readable |
| Scalabrino | 0.968 | 0–1; higher is more readable |
| Dorn | 0.727 | 0–1; higher is more readable |
| Mi | 0.818 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.84 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 410.343 | −13.541 |
| 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.628 | −6.941 |
Intercept 8.87 + feature contributions = -0.813 (log-odds).
Score = sigmoid(-0.813) = 0.307.
| Score | 0.968 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.047 | +0.486 |
| 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. | 89 | −0.104 |
| 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.622 | −0.038 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 21 | −0.011 |
Intercept 0.07 + feature contributions = 0.979 (log-odds).
Score = sigmoid(0.979) = 0.727.
| Score | 0.818 |
|---|
| Score | 6 |
|---|
Run 1
This is an exceptionally clean and readable implementation. The class follows a logical structure with clear separation of fields, getter, and setter methods. It has minimal nesting with only a single level using simple boolean returns. The intent is immediately clear from the descriptive method names and comprehensive Javadoc comments. Code length is concise and appropriate - no unnecessary boilerplate. Action granularity is excellent, with each method performing exactly one operation per line. The reading flow is natural, progressing from field declaration through getter to setter, matching common Kafka patterns. The fluent API design (returning 'this') follows established conventions. Minor deductions only for the slightly redundant 'validate' method name (could be 'isValidateOnly' for clarity) and the field setter using 'this.validateOnly = validate' which could be slightly confusing.
Run 2
The code is highly readable. It follows a clear, logical structure with a package declaration, import, class definition, and well-documented methods. Nesting is completely flat, making the control flow obvious. Intent is explicit through descriptive method names and Javadoc comments. The code is concise, avoiding unnecessary boilerplate or repetition. Each line performs a single action, enhancing comprehension. Reading flow is natural, progressing from class declaration to field, getter, and fluent setter. Minor deductions: the 'validateOnly' and 'validate()' naming could be slightly confusing without context, and the import formatting differs slightly from typical conventions.
Run 3
The code is highly readable. It follows a clear, logical structure with standard class organization: imports, Javadoc, field, then methods. Nesting is flat, with no conditional or loop complexity. Intent is explicit through descriptive method names ('validate') and meaningful Javadoc comments. The code is concise without being sparse, containing only what is necessary for its purpose. Each method performs a single action, adhering to clean code principles. Reading flow is natural: a reader can quickly understand the class purpose, the field it manages, and the getter/setter-like method pair. Minor deductions come from the slightly ambiguous 'validate' method name (a boolean getter named 'validate' could be mistaken for an action method) and the absence of an explicit 'isValidate' prefix convention, but overall this is excellent, idiomatic Java code.
Run 1
Code Structure: Logically organized as a small options class with a field, getter, and fluent setter. Nesting: Flat, with no conditional or loop nesting. Clarity of intent: Class naming and Javadoc clearly explain validation-only behavior, although validate() could sound like an action rather than a getter. Code length: Concise, with no unnecessary logic; explicitly initializing the boolean to false is slightly redundant but readable. Action granularity: Each statement performs one action, and assignment and return are on separate lines. Reading flow: Natural progression from state to accessor to mutator. Minor import-spacing and naming improvements could make it even clearer.
Run 2
Code Structure: A well-organized options class with one field and clearly separated getter and fluent setter. Nesting: Methods are flat, with no conditional or loop nesting. Clarity of intent: Class documentation and method comments explain validation-only behavior, although validate() could be mistaken for an action rather than a boolean getter; validateOnly() would be clearer. Code length: Concise, with no unnecessary logic. Action granularity: Each statement occupies its own line and performs one action. Reading flow: Natural progression from class documentation to state, getter, and setter. Minor formatting improvements, such as a blank line after the package declaration, would improve visual separation.
Run 3
Code Structure: A small, logically organized options class with a field followed by its getter and fluent setter. Nesting: No nested control flow; methods are flat and easy to scan. Clarity of intent: The class name, validateOnly field, and Javadoc make the purpose clear, though validate() could sound like an action rather than a getter, and 'configs' is less precise than 'quotas.' Code length: Concise, with no unnecessary implementation complexity. Action granularity: Each statement occupies its own line, clearly separating assignment and return. Reading flow: Natural top-to-bottom progression with consistent formatting; separating the package declaration from imports would slightly improve readability.