Sample
int-77234e1573b7-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.575 | 0–1; higher is more readable |
| Dorn | 0.128 | 0–1; higher is more readable |
| Mi | 0.031 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.46 | 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. | 2824.481 | −93.208 |
| Source linesThe number of non-empty source lines. | 86 | +34.4 |
| 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.897 | −7.346 |
Intercept 8.87 + feature contributions = -57.284 (log-odds).
Score = sigmoid(-57.284) = 0.
| Score | 0.575 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 150.931 | −2.728 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 86 | +2.238 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 87 | −2.044 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 85.862 | +0.79 |
| 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.08 | +0.166 |
Intercept 0.07 + feature contributions = -1.915 (log-odds).
Score = sigmoid(-1.915) = 0.128.
| Score | 0.031 |
|---|
| Score | 29 |
|---|
Run 1
The code is well-structured and readable, with clear class and method organization. The static initializer for default overrides is clean and properly immutable. The `properties` method has a natural flow: load defaults, apply user configs, compute retention. Nesting is shallow, and intent is mostly clear — although the blank comment blocks create minor noise and the `swallow` variable name is unusual. Most lines contain one action, aiding readability. Some repetition exists in equals/hashCode/toString, but this is idiomatic for Kafka internals. Overall, it is concise, maintainable code with only minor stylistic blemishes.
Run 2
The code is generally well-structured with clear class and method separation. The static block logic for default overrides is reasonable. The properties method has a clear sequence of actions but could be improved with helper methods to reduce cognitive load. Nesting is minimal. The intent of retention handling is clear, though the exception variable name 'swallow' is unconventional. The equals, hashCode, and toString implementations are standard but lengthy. Overall, readable but not exceptional.
Run 3
The code is well-structured with clear separation of concerns and logical organization. The static initialization block for default overrides is sensible, and the properties() method follows a clean merge pattern (defaults -> provided defaults -> specific configs). Nesting is minimal - only one try/catch block and simple conditionals. Method names and variable names are descriptive, making intent clear. The code is appropriately concise without being terse. Each line generally performs one logical action, though some map operations could be slightly more compact. Reading flow is natural: constructor, properties logic, then standard equals/hashCode/toString overrides. Minor deductions: the empty lines with whitespace after the constructor are unusual, and the try/catch for ArithmeticException could be simplified with Math.max or a helper method. Overall, this is maintainable and readable code that would be easy for developers to understand and modify.
Run 1
Code Structure: Logically organized into default initialization, construction, property assembly, and standard object methods. Nesting: Shallow overall; the conditional containing try/catch remains easy to follow. Clarity of intent: Descriptive names make configuration precedence and retention handling understandable, although inherited fields and overflow behavior lack explanatory context. Code length: Implementation is reasonably concise, but excessive blank lines add unnecessary visual length. Action granularity: Statements generally perform one action each; long configuration expressions slightly reduce scanability. Reading flow: Property merging and early-return equality checks follow a natural sequence. Inconsistent whitespace, long lines, and the vague exception name 'swallow' modestly detract from otherwise strong readability.
Run 2
Code Structure: Logical organization separates default configuration, construction, property resolution, and standard object methods. Nesting: Shallow overall, with only a try/catch inside a conditional. Clarity of intent: Descriptive names make configuration precedence and retention calculation understandable, though the overflow fallback lacks an explanatory comment. Code length: Functionality is concise, but excessive blank lines unnecessarily stretch the listing. Action granularity: Statements generally perform one action per line; long expressions in initialization and equality checks are slightly harder to scan. Reading flow: Methods follow a natural sequence, and early returns simplify equality checks, but inconsistent whitespace and several long lines interrupt otherwise smooth reading.
Run 3
Code Structure: Logically organized into default initialization, construction, configuration assembly, and standard object methods. Nesting: Shallow overall, with only a try/catch inside a conditional. Clarity of intent: Descriptive class, method, and variable names make configuration precedence and retention handling understandable, though the overflow fallback lacks an explanatory comment. Code length: Appropriately concise, but excessive blank lines add visual clutter, and some expressions are long. Action granularity: Statements generally perform one action per line; chained equality checks remain readable. Reading flow: Configuration assembly follows a natural sequence, and early returns simplify equals. Inconsistent whitespace, long lines, and the vague parameter name 'o' slightly reduce readability.