Sample
Scalabrio157
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 69.3Δ 66.1 |
| Scalabrino | 0.37 | 0–1; higher is more readable | 31.2Δ 27.9 |
| Dorn | 0.337 | 0–1; higher is more readable | 39.2Δ 35.9 |
| Mi | 0.203 | 0–1; higher is more readable | 48.7Δ 45.5 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.1Δ 59.8 |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs | 7.8Δ 4.5 |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs | 1.5Δ 1.8 |
| BTTF | 0.558 | 0–1; higher is more readable | 58.8Δ 55.5 |
| Human | 2.56 | 1–5; original rating | 3.3 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 686.038 | −22.639 |
| Source linesThe number of non-empty source lines. | 28 | +11.2 |
| 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.369 | −6.553 |
Intercept 8.87 + feature contributions = -9.122 (log-odds).
Score = sigmoid(-9.122) = 0.
| Score | 0.37 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 77 | +0.404 |
| 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.102 | −0.049 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 28 | +0.045 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 26.692 | −0.037 |
Intercept 0.07 + feature contributions = -0.676 (log-odds).
Score = sigmoid(-0.676) = 0.337.
| Score | 0.203 |
|---|
| Score | 11 |
|---|
Run 1
The code is difficult to read due to deeply nested conditional statements (up to four levels), inconsistent indentation, and poor use of whitespace. The intent—mapping an aggregation kind to a selection command—is obscured by the tangled if-else structure and repeated long method chains. Action granularity is mixed, with multiple operations per line in some places and awkward line breaks in others. While the logic itself is simple, the implementation is unnecessarily verbose and disorganized. A flatter structure using early returns or a mapping (e.g., switch or HashMap) would significantly improve clarity and maintainability.
Run 2
The code is difficult to read due to inconsistent indentation, with tabs and spaces mixed across lines, disrupting visual flow. Deep nesting (up to four levels) combined with chained if-else conditions makes it hard to follow the decision path. The repeated chain `Model.getAggregationKind().getX()` adds verbosity and obscures intent. Multiple actions are packed across lines, and the long method calls with line breaks split arguments awkwardly, hurting reading flow. The logic itself is simple—mapping a kind to a command—but the structure and formatting obscure this, requiring effort to trace the branches. Refactoring into a switch/expression or extracting helper methods, plus consistent indentation, would substantially improve readability.
Run 3
The code has several readability issues. The structure is tangled with mixed indentation (spaces vs tabs) and inconsistent formatting. Nesting is unnecessarily deep — a four-level nested if-else chain could be flattened. The intent is somewhat clear (setting aggregation kind based on target), but the repeated `Model.getAggregationKind()` calls obscure the logic. Code length is excessive for what could be a simple lookup or switch statement. Multiple actions per line (method calls with chained static accesses) reduce clarity. The reading flow is disorganized due to uneven indentation and line breaks. A cleaner approach using early returns, consistent indentation, and extracting the aggregation kind into a variable would significantly improve readability.
Run 1
Code Structure: The aggregation-to-command mapping is logically organized, but nested else blocks obscure a simple conditional chain. Nesting: Up to four conditional levels make the method harder to scan; an early return and else-if chain would flatten it. Clarity of intent: API and command names clearly indicate aggregation selection, though buildModel is broad and kind is somewhat vague. Code length: The method is short overall, but excessive wrapping, repeated expressions, and a stray blank line add unnecessary bulk. Action granularity: Each statement performs one main action, which supports readability. Reading flow: Mixed indentation and awkward line breaks disrupt an otherwise understandable progression. Calling getTarget twice also introduces avoidable repetition.
Run 2
Code Structure: The aggregation-to-command mapping is logically organized, but nested else blocks obscure a simple selection sequence. Nesting: Several levels of conditionals make the code harder to scan; an early return and else-if chain would flatten it. Clarity of intent: Descriptive method and constant names clearly convey the purpose, including the fallback to NONE_COMMAND. Code length: The method is relatively short, but excessive line wrapping and repeated facade calls add visual clutter. Action granularity: Each statement performs one main action, which supports readability. Reading flow: Mixed indentation, awkward wrapping, and an unnecessary blank line disrupt an otherwise understandable progression.
Run 3
Code Structure: The aggregation-to-command mapping is logically organized, but nested else blocks obscure a straightforward selection. Nesting: Multiple levels of if/else nesting make the method harder to scan; an early return and else-if chain would flatten it. Clarity of intent: Descriptive API and command names communicate the purpose, although generic names such as target and kind provide limited context. Code length: The method is unnecessarily expanded by excessive line wrapping and repeated fallback selection. Action granularity: Each statement performs one primary action, which supports readability. Reading flow: Mixed indentation, awkward line breaks, and a stray blank line disrupt an otherwise predictable flow. The repeated getTarget() call also adds minor redundancy.