Sample
int-618b36560567-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.35 | 0–1; higher is more readable |
| Scalabrino | 0.881 | 0–1; higher is more readable |
| Dorn | 0.5 | 0–1; higher is more readable |
| Mi | 0.662 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 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. | 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.571 | −6.857 |
Intercept 8.87 + feature contributions = -0.618 (log-odds).
Score = sigmoid(-0.618) = 0.35.
| Score | 0.881 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.234 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| 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 |
Intercept 0.07 + feature contributions = -0.001 (log-odds).
Score = sigmoid(-0.001) = 0.5.
| Score | 0.662 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It follows a clear, logical structure: package declaration, imports, class annotation, field declaration, getter, and setter. The class extends a base options class, making its purpose evident. Nesting is minimal, with only a single class and no conditional blocks. The intent is clear—managing a boolean 'validateOnly' option in a fluent API style. Code length is concise with no unnecessary verbosity. Each method performs a single action: returning the field value or setting it and returning 'this' for chaining. Reading flow is natural, progressing from field declaration to accessor methods. Minor issues include redundant blank lines and a slight vertical expansion, but these do not detract meaningfully from clarity. The code is idiomatic for Kafka admin client options and self-documenting in style.
Run 2
The code is a small, straightforward Kafka admin options class. It has a clear single responsibility, minimal fields, two simple methods, and follows a common builder-style pattern. Import ordering and package declaration are acceptable. However, there are multiple blank lines between methods and before/after the field declaration, which disrupts reading flow and adds unnecessary length. The class lacks Javadoc for the methods and class, which would improve clarity of intent for public API. Method and field naming are clear and consistent with Kafka conventions. Nesting is non-existent, action granularity is good, and the logic is flat and easy to follow. The overall structure is logical but slightly marred by formatting inconsistencies and lack of documentation.
Run 3
The code is highly readable. It is well-structured as a simple options class with clear naming conventions and a fluent setter style. Nesting is minimal, and intent is obvious: configure 'validateOnly' for an admin operation. Code length is concise, with no unnecessary code. Action granularity is appropriate—one action per line. The reading flow is natural, from class declaration to field, getter, and setter. Minor deductions for excessive blank lines and missing Javadoc, which would slightly improve clarity.
Run 1
Code Structure: The class is logically organized around a single option, with a field, getter, and fluent setter. Nesting: There is no unnecessary nesting. Clarity of intent: Class and method names clearly communicate their purpose; the fluent return type is explicit. Code length: The implementation is concise, although excessive blank lines and an unused Collection import add clutter. Action granularity: Each statement performs one action on its own line. Reading flow: The field-to-getter-to-setter order is natural and easy to follow, but inconsistent whitespace slightly interrupts the flow.
Run 2
Code Structure: The class is logically organized around a single option, with its field, getter, and fluent setter grouped clearly. Nesting: Methods are flat, with no conditional or loop nesting. Clarity of intent: Consistent naming makes the validation-only flag and its accessors easy to understand, though its operational meaning is not documented. Code length: The implementation is concise, but excessive blank lines and an unused Collection import add clutter. Action granularity: Each statement performs one action, and the setter separates assignment from returning the instance. Reading flow: The field-to-getter-to-setter progression is natural; inconsistent spacing slightly interrupts an otherwise straightforward reading experience.
Run 3
Code Structure: A logically organized options class with one field, a getter, and a fluent setter; the unused Collection import and excessive blank lines add clutter. Nesting: Flat methods with no nested control flow. Clarity of intent: The class and validateOnly names clearly convey configuration intent, though the flag's effect is not documented. Code length: Concise implementation, with unnecessary whitespace. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from field declaration to getter and setter, slightly disrupted by large blank gaps.