Sample
int-f60780c8f63e-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.441 | 0–1; higher is more readable |
| Dorn | 0.378 | 0–1; higher is more readable |
| Mi | 0.465 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.352 | 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. | 3062.417 | −101.06 |
| Source linesThe number of non-empty source lines. | 82 | +32.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.477 | −6.715 |
Intercept 8.87 + feature contributions = -66.105 (log-odds).
Score = sigmoid(-66.105) = 0.
| Score | 0.441 |
|---|
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. | 83 | −1.902 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 75 | +1.857 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 75 | −1.3 |
| 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.976 | −1.078 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 111.976 | +1.002 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 81.858 | +0.734 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.117 |
Intercept 0.07 + feature contributions = -0.499 (log-odds).
Score = sigmoid(-0.499) = 0.378.
| Score | 0.465 |
|---|
| Score | 29 |
|---|
Run 1
The code has major structural issues that severely impact readability. A stray block of unrelated code (runningTotal loop) appears inside the partitionResult method, completely breaking logical flow and intent. The overall class structure is reasonable, but this leftover code is confusing and misleading. Nesting is moderate: the lambda in partitionResult has three levels of conditional logic, making it harder to follow. The all() method mixes exception handling with stream processing, and the loop iterates over values to find errors even after building a partitionsFailed list, leading to redundant logic. Variable names are clear, and the Javadoc helps, but the accidental code block and mixed responsibilities lower clarity. Action granularity is acceptable, but reading flow is disrupted by the stray code. Code length is moderate but could be streamlined.
Run 2
The code has some redeeming qualities like clear method names and Javadoc comments, but contains a critical flaw: a stray, completely unrelated code block (a loop calculating a running total) inserted inside the partitionResult method. This severely breaks reading flow and clarity of intent. The structure is mostly logical but the all() method has unnecessary nested streams and loops that could be simplified. Nesting depth is moderate but could be flatter. Code length is reasonable but not concise in the all() method. Action granularity is mostly one action per line, but some lambda bodies pack multiple statements. The error handling logic in all() iterates values instead of using the already-collected partitionsFailed list, creating redundancy. Overall, the accidental code block and redundant error handling make this harder to read than necessary.
Run 3
The code has a clear class structure with documentation, but readability is compromised by several issues. A stray block containing an unrelated loop is accidentally inserted inside the 'partitionResult' method, which is confusing and breaks the logical flow. The method lacks a null check for the input partition. The code uses deep nesting in the 'whenComplete' callback (if-else-if-else with nested if), which could be flattened. Multiple actions are performed in single lines, such as chained exception construction, making the logic harder to follow. The 'all' method also has a loop that checks exceptions but terminates after throwing the first one, which may be ambiguous. The stream operations are concise but the overall flow is disrupted by the accidental code. Overall, the structure is mostly intact but requires cleanup and better action granularity.
Run 1
Code Structure: The class logically separates per-partition and aggregate results, but an unrelated summation block disrupts organization. Nesting: Callbacks, conditionals, and a loop introduce moderate nesting, especially in all(). Clarity of intent: Method names, types, and documentation clearly communicate asynchronous error handling; the unused runningTotal calculation is confusing. Code length: Mostly compact, but the dead calculation and duplicated exception-message construction add unnecessary length. Action granularity: Statements generally perform one action per line, and the stream pipeline is split into readable steps. Reading flow: The main logic progresses naturally, but the poorly indented extraneous block and nested error branches interrupt flow.
Run 2
Code Structure: The class is logically organized around partition-specific and aggregate results, but an unrelated summation block disrupts cohesion. Nesting: Callback conditionals and the loop in all() introduce moderate nesting, with some deeply nested error handling. Clarity of intent: Descriptive names and Javadoc clarify the main purpose, while the unused runningTotal calculation is confusing. Code length: Mostly concise, though the summation block and duplicated exception-message construction add unnecessary code. Action granularity: Statements generally perform one action per line; the stream pipeline is clearly split into steps. Reading flow: The constructor and public methods follow a natural order, but inconsistent indentation in the summation block interrupts flow, and nested asynchronous error handling requires careful reading.
Run 3
Code Structure: The class logically separates per-partition and aggregate results, but an unrelated summation block disrupts cohesion. Nesting: Callback conditionals and nested error-message handling introduce moderate depth. Clarity of intent: Descriptive method names, types, and documentation explain the asynchronous API; the unused runningTotal calculation has no apparent purpose. Code length: Mostly compact, but the summation block and duplicated exception construction add unnecessary length. Action granularity: Statements generally perform one action per line, and the stream pipeline is clearly separated into steps. Reading flow: Constructor-to-method organization is natural, but inconsistent indentation around the inserted block interrupts scanning, and nested branches make error handling harder to follow.