Sample
int-51cd92747ff8-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.433 | 0–1; higher is more readable |
| Dorn | 0.748 | 0–1; higher is more readable |
| Mi | 0.427 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.449 | 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. | 2923.347 | −96.47 |
| Source linesThe number of non-empty source lines. | 75 | +30 |
| 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.454 | −6.681 |
Intercept 8.87 + feature contributions = -64.281 (log-odds).
Score = sigmoid(-64.281) = 0.
| Score | 0.433 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 76 | −1.655 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 68 | +1.615 |
| 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. | 111.987 | −1.078 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 111.961 | +1.002 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 74.92 | +0.637 |
| 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.087 | +0.101 |
Intercept 0.07 + feature contributions = 1.09 (log-odds).
Score = sigmoid(1.09) = 0.748.
| Score | 0.427 |
|---|
| Score | 25 |
|---|
Run 1
The code is generally readable but has several readability issues. The class structure is clear and well-commented, but the boolean logic in the `partitionResult` method is convoluted - conditions like `if (!((throwable != null)))` are hard to understand and could be simplified to `if (throwable == null)`. The nesting is problematic, with multiple levels of if-else blocks that make the code difficult to follow. The `all()` method shows intent but has unnecessary empty branches (`if (...) {} else {...}`) that should be inverted. Variable naming in stream operations is clear but `topicPartitions` is misleading - it's actually a map. The code length is reasonable but could be more concise with cleaner conditionals. The action granularity is mostly good with one operation per line in streams and method calls. Reading flow is disrupted by the awkward boolean expressions and unnecessary else branches, making it feel disorganized.
Run 2
The code has some readable aspects—clear class name, import grouping, reasonable method lengths, and JavaDoc comments that explain intent. However, several issues significantly hurt readability. The conditionals in both methods are unnecessarily convoluted, with negated logic like `if (!((throwable != null)))` making the code harder to parse. The `all()` method mixes filtering and iteration in a way that obscures the actual logic: it collects failed partitions, then iterates over all values but only acts on non-null exceptions, throwing inside a loop. The nesting is inconsistent (deep in `partitionResult`, flatter in `all()`), and the double negation pattern is a major red flag for clarity. While the structure is logically organized and each action mostly occupies its own line, the unclear conditional patterns, awkward error-handling flow, and unnecessary complexity drag the score down.
Run 3
The code has reasonable structure and concise length but suffers from inconsistent nesting style, inverted conditions, and unnatural flow. The partitionResult method uses deeply nested if-else blocks with negated conditions, making the logic harder to follow. The all() method streams partitions failed, then uses an awkward for-loop with an empty if branch and inverted null checks. Action granularity is mixed: some lines are clear, but compound conditions reduce readability. Reading flow is disrupted by non-idiomatic patterns like `if (!((throwable != null)))` instead of `if (throwable == null)`. While the overall intent is understandable, these style issues make it unnecessarily hard to scan and maintain.
Run 1
Code Structure: The class is logically organized into a constructor and two focused result methods, with useful documentation. Nesting: Callback logic contains several nested conditionals, and compressed brace placement makes their boundaries harder to follow. Clarity of intent: Names and API documentation explain the purpose, but double-negated checks such as !((exception != null)) and an empty conditional branch unnecessarily obscure straightforward logic. Code length: Overall length is reasonable, though redundant parentheses and repeated error-message construction add noise. Action granularity: Most statements perform one action per line, but multiple conditionals and braces share lines in partitionResult, reducing readability. Reading flow: The constructor-to-method progression and stream pipeline are natural, while inverted conditions, awkward formatting, and the empty branch interrupt local flow.
Run 2
Code Structure: The class is logically organized around a stored future and two focused result methods. Nesting: Nested callbacks and conditionals make error handling harder to follow, especially with compressed braces. Clarity of intent: Descriptive names and Javadocs explain the purpose, but redundant negations such as !((throwable != null)) and an empty if branch obscure straightforward null checks. Code length: Generally compact, though duplicated exception-message construction and unnecessary parentheses add noise. Action granularity: Most statements occupy separate lines, but multiple conditionals and closing braces share lines, reducing readability. Reading flow: The constructor and method sequence are natural, and the stream pipeline is readable; inconsistent formatting and inverted conditional logic interrupt that flow.
Run 3
Code Structure: The class is logically organized around a stored future and two focused result methods. Nesting: Nested conditionals inside callbacks increase complexity, especially in partitionResult. Clarity of intent: Method names, types, and documentation explain the purpose, but double-negated conditions and an empty if branch obscure straightforward error handling. Code length: Overall length is reasonable, although duplicated exception construction and message handling add avoidable verbosity. Action granularity: Most statements perform one action per line, but multiple conditional openings and closing braces on the same line make branch boundaries harder to recognize. Reading flow: The constructor and stream pipeline read naturally, while inconsistent formatting, inverted conditions, and compressed braces interrupt the flow. Conventional null checks, consistent indentation, and simpler branching would substantially improve readability.