Sample
int-b9224eb2e413-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.578 | 0–1; higher is more readable |
| Dorn | 0.682 | 0–1; higher is more readable |
| Mi | 0.118 | 0–1; higher is more readable |
| LLOC | 7 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs |
| BTTF | 0.554 | 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. | 1631.95 | −53.854 |
| Source linesThe number of non-empty source lines. | 47 | +18.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.791 | −7.187 |
Intercept 8.87 + feature contributions = -33.371 (log-odds).
Score = sigmoid(-33.371) = 0.
| Score | 0.578 |
|---|
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. | 122 | −1.502 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 121.958 | +1.163 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 44 | +0.785 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 48 | −0.663 |
| 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.069 | +0.268 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 46.837 | +0.245 |
Intercept 0.07 + feature contributions = 0.764 (log-odds).
Score = sigmoid(0.764) = 0.682.
| Score | 0.118 |
|---|
| Score | 7 |
|---|
Run 1
The code is generally readable with clear class naming and logical organization. The structure is straightforward and follows a clean hierarchy. Nesting is minimal and the action granularity is appropriate, with one main action per line. The use of descriptive method names and comments helps clarify intent, though some method signatures are dense. The constructor parameters are well-aligned but could benefit from explanatory comments. Unsupported methods are clearly marked with exceptions. Overall, it's maintainable code with only minor readability improvements needed around parameter clarity and documentation.
Run 2
The code is well-structured and follows clean code principles. The class extends an abstract base class, with constructor injection clearly showing dependencies. Methods are short and focused, with one action per line. The use of UnsupportedOperationException with clear messages indicates the methods are intentionally not implemented for this store type. The delegate method getWriteBatches is concise and readable, using method references for clarity. Nested structures are minimal, and the code reads naturally from constructor to method implementations. The comment on the null parameter adds helpful context. Overall, this is a clear, concise implementation with strong intent.
Run 3
This code has good structure (clear class hierarchy, logical methods) but suffers from several readability issues. The constructor call is deeply nested with 4+ parameters, making it hard to parse intent. Method naming like `getIndexKeyValue` and `getIndexToBaseStoreIterator` adds confusion since they throw `UnsupportedOperationException`, suggesting unclear abstraction boundaries. The use of `Optional.empty()` and `null` parameters (with ambiguous comments) creates uncertainty about state management. Long method signatures (`getWriteBatches` with `Collection<ConsumerRecord<byte[], byte[]>>`) reduce readability. While the code is concise and flat (no deep nesting in logic), the density of type parameters and unclear purpose of some abstractions (like `Long.MAX_VALUE` parameters) creates cognitive overhead. The lack of clarifying comments for non-obvious design decisions (except one brief inline comment) also hinders understanding.
Run 1
Code Structure: The class is logically organized into a constructor and focused overrides, although unsupported inherited operations add some noise. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: Descriptive names, the class comment, and method references communicate the store's purpose, but repeated Long.MAX_VALUE arguments and a null parameter require superclass knowledge. Code length: The implementation is concise, with little unnecessary code. Action granularity: Each statement performs one clear action, and multiline calls separate arguments cleanly. Reading flow: The constructor followed by overrides provides a natural progression; lengthy signatures, uneven alignment, and tightly grouped imports slightly reduce visual readability.
Run 2
Code Structure: The class is logically organized into a constructor and focused overrides, with no tangled logic. Nesting: Methods are flat and contain no nested control flow. Clarity of intent: Descriptive class and method names, the class documentation, and the comment explaining the null argument communicate purpose well. However, positional Long.MAX_VALUE arguments and unsupported inherited operations require superclass knowledge. Code length: The implementation is concise with little unnecessary code. Action granularity: Each method performs one clear action; multiline calls keep arguments readable. Reading flow: The progression from initialization to overrides is natural, though inconsistent continuation indentation and limited import spacing slightly reduce polish.
Run 3
Code Structure: Logically organized as a small subclass with a constructor and focused overrides; imports could be grouped more consistently. Nesting: Very flat, with no nested control flow. Clarity of intent: Descriptive class and method names, a class comment, and an explanation of the null argument clarify its purpose. However, repeated Long.MAX_VALUE values and unsupported overrides require superclass knowledge to fully understand. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action, and multiline calls keep arguments separate. Reading flow: Natural progression from construction to overridden behavior, though uneven parameter indentation and long signatures slightly disrupt scanning.