Sample
int-a6746d90bc88-I05
Rewrite eligible decimal integer literals in hexadecimal notation
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 | 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 overall. It follows clear organizational patterns: static initialization is separated, fields are declared near the top, and methods are logically ordered. Nesting is minimal—only one level deep in the `properties` method and `equals` method. Intent is generally clear from method names and comments, particularly the explanation of override precedence and retention calculation. The code is reasonably concise, though the `properties` method could be slightly shorter. Action granularity is good: each map operation and assignment occupies its own line. Reading flow is mostly natural, with the static block and constructor flowing into method implementations. Minor deductions: the `equals` method uses field references directly instead of getters (inconsistent access style), and the arithmetic exception handling, while documented, adds slight complexity. The class could benefit from a brief class-level Javadoc explaining its role in Kafka Streams internals. Overall, this is solid production code with clear intent and maintainable structure.
Run 3
The code is well-structured and readable overall. It has a logical class organization, minimal nesting, and clear intent through descriptive naming and documentation. Methods are concise with one action per line in most cases, and the reading flow is natural. The static initialization block is clear, and the `properties` method follows a predictable override precedence with an explanatory comment. Minor deductions: the `properties` method combines multiple operations (map construction, layering, conditional retention logic) and includes a try-catch that slightly disrupts flow; the equals/hashCode/toString methods add boilerplate but are standard. Overall, it is maintainable and easy to follow.
Run 1
Code Structure: Well-organized class with distinct initialization, configuration, and standard object methods. Nesting: Shallow overall; the conditional containing try/catch is straightforward. Clarity of intent: Descriptive names and documentation clearly explain configuration precedence, retention adjustment, and overflow handling, though inherited fields require superclass context. Code length: Appropriately concise, with some routine boilerplate in equals, hashCode, and toString. Action granularity: Each statement performs one clear action; fluent or compound operations do not obscure behavior. Reading flow: Natural progression from defaults and construction to behavior and object methods. Minor readability drawbacks include long declaration and configuration lines, the vague parameter name 'o', and the unconventional exception variable name 'swallow'.
Run 2
Code Structure: Clearly separates default initialization, construction, property resolution, and standard object methods. Nesting: Mostly flat, with only a shallow conditional and try/catch for retention overflow. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention handling; the exception variable 'swallow' is less informative. Code length: Appropriately concise, although standard equality and string-formatting boilerplate adds length. Action granularity: Statements generally perform one action per line; a few long expressions, particularly cleanup-policy initialization, could be wrapped for easier scanning. Reading flow: Methods follow a natural order, and property overrides are applied sequentially. Minor distractions include excessive blank lines between related putAll calls and Objects.equals for a primitive long where direct comparison would be clearer.
Run 3
Code Structure: Well-organized class with separate initialization, configuration, equality, hashing, and string representation responsibilities. Nesting: Mostly flat; the conditional containing try/catch adds only modest depth. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention handling, although the overflow fallback could benefit from an explicit comment. Code length: Concise overall, with conventional boilerplate and a few overly long declarations and expressions. Action granularity: Each statement generally performs one clear action, making configuration updates easy to follow. Reading flow: Methods follow a natural sequence, and guard clauses simplify equals. Minor weaknesses include inconsistent import grouping, excessive blank lines between related putAll calls, and Objects.equals for a primitive long where direct comparison would be clearer.