Sample
int-805ad6eb1044-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.64 | 0–1; higher is more readable |
| Dorn | 0.572 | 0–1; higher is more readable |
| Mi | 0.046 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.473 | 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.873 | −7.309 |
Intercept 8.87 + feature contributions = -57.247 (log-odds).
Score = sigmoid(-57.247) = 0.
| Score | 0.64 |
|---|
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 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 87 | −2.044 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 75 | +1.857 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 150.977 | +1.631 |
| 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.065 | +0.313 |
Intercept 0.07 + feature contributions = 0.288 (log-odds).
Score = sigmoid(0.288) = 0.572.
| Score | 0.046 |
|---|
| Score | 29 |
|---|
Run 1
The code is generally readable and well-organized. The class has a clear single purpose, with a logical static initializer for default overrides and a focused constructor. The `properties` method follows a clear precedence chain (defaults -> global -> per-topic) and includes an explanatory comment. Nesting is minimal, with only one level in the `equals` method and a try-catch. Naming is descriptive, and action granularity is good — most lines perform one logical step. However, the long static initializer in the class body slightly interrupts reading flow, and the `retentionMs` property lacks an explanatory comment at its declaration, which would clarify its role. The equals/hashCode/toString methods are standard but verbose, adding length without adding much readability benefit. Overall, the code is maintainable and straightforward for a Kafka internals developer.
Run 2
The code is well-structured and readable. It has a clear class-level constant initialization, a sensible constructor, and a focused override method for properties. Nesting is minimal, with only a single if-statement and a try-catch. Intent is clear: the class configures windowed changelog topics with retention logic. The properties method is concise and follows a logical override sequence (defaults → global → per-topic). Action granularity is generally one operation per line. Reading flow is natural, with comments explaining non-obvious behavior like retention calculation and the override hierarchy. Minor deductions: the static initialization block slightly interrupts flow, and the equality/toString methods add length but are standard boilerplate. Overall, it is highly readable.
Run 3
The code is generally readable with clear separation of concerns, a logical static initialization block, and straightforward method implementations. The `properties` method effectively communicates the precedence rules via comments and sequential `putAll` calls. However, some minor readability issues exist: the method name `properties` doesn't clearly convey it returns a full merged config, the variable `swallow` is ambiguous (though commonly used for intentionally ignored exceptions), and the long line in the static block exceeds typical readability width. The class structure is flat, with low nesting and clear intent, but some lines could be broken for better readability. Overall, it's well-structured and maintainable, though not perfectly polished.
Run 1
Code Structure: Well-organized class with defaults initialization, constructor, configuration logic, and standard object methods clearly separated. Nesting: Mostly flat; only the retention calculation nests a try/catch inside an if, which remains easy to follow. Clarity of intent: Descriptive names, Javadoc, and the configuration-precedence comment explain the purpose and behavior. Overflow handling is explicit, though the catch variable name 'swallow' is less informative. Code length: Appropriately concise overall, with some conventional boilerplate and lengthy declarations. Action granularity: Statements generally perform one action per line; chained string concatenations and equality checks remain readable. Reading flow: Configuration assembly follows a natural sequence from defaults to overrides to retention adjustment. Minor drawbacks include long lines, sparse spacing around imports, and reliance on inherited fields and constants for context.
Run 2
Code Structure: Logically organized into default initialization, construction, property assembly, and standard object methods. Nesting: Shallow overall; the try/catch inside a single conditional remains easy to follow. Clarity of intent: Descriptive identifiers and documentation explain configuration precedence and retention calculation, though the exception variable 'swallow' is less informative and overflow handling could use a brief comment. Code length: Appropriately concise, with conventional equals, hashCode, and toString boilerplate. Action granularity: Statements generally perform one action per line; a few long expressions reduce scanability slightly. Reading flow: Natural progression and clear spacing make the class easy to navigate, although long signatures and the cleanup-policy assignment would benefit from wrapping.
Run 3
Code Structure: Logically organized into defaults, construction, property configuration, and standard object methods. Nesting: Shallow overall; the retention conditional contains a straightforward try/catch. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention adjustment, though the exception name 'swallow' does not clarify overflow handling. Code length: Appropriately concise, with some verbose constants and routine boilerplate. Action granularity: Each statement performs a distinct action, making state changes easy to follow. Reading flow: Natural progression and useful spacing support readability; a few long declarations and expressions would benefit from wrapping. Overall, the code is highly readable with minor presentation and naming issues.