Sample
Scalabrio41
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 39.2Δ 38.9 |
| Scalabrino | 0.847 | 0–1; higher is more readable | 88.9Δ 10.8 |
| Dorn | 0.712 | 0–1; higher is more readable | 80.4Δ 2.3 |
| Mi | 0.651 | 0–1; higher is more readable | 87.4Δ 9.3 |
| LLOC | 25 | Logical lines; fewer is more readable | 11.8Δ 66.3 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 77.4Δ 0.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 19.6 |
| BTTF | 0.558 | 0–1; higher is more readable | 59.3Δ 18.8 |
| Human | 4.11 | 1–5; original rating | 78.1 |
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. | 1162.053 | −38.348 |
| Source linesThe number of non-empty source lines. | 42 | +16.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.15 | −6.226 |
Intercept 8.87 + feature contributions = -18.903 (log-odds).
Score = sigmoid(-18.903) = 0.
| Score | 0.847 |
|---|
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. | 42 | −0.451 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 77.071 | +0.439 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 33 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 33 | −0.336 |
| 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. | 78.952 | +0.321 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.297 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 40.837 | +0.161 |
Intercept 0.07 + feature contributions = 0.905 (log-odds).
Score = sigmoid(0.905) = 0.712.
| Score | 0.651 |
|---|
| Score | 25 |
|---|
Run 1
The code is generally readable: clear method-level Javadoc, logical structure, flat nesting (two loops at same logical level with only one inner null check), and one primary action per line. Variable names are meaningful. Minor issues: the comment for the negative accumulation reads as slightly confusing ('+', remember value is negative) and could be clearer; initializing minimum/maximum with infinities is idiomatic but not immediately obvious; the final condition `if (minimum <= maximum)` might be replaced with a more explicit check. Overall, it is clean and maintainable.
Run 2
The code is well-structured and readable. It has a clear purpose, good variable naming, and a logical flow. Nesting is moderate (two levels of loops with an if-statement) but acceptable. Action granularity is mostly one operation per line, though some lines combine arithmetic and assignment. The comment about '+' for negative values is helpful. Minor issues: the method is moderately long and the loop variables 'item' and 'series' could be clearer as 'category' and 'seriesIndex'. Overall, the code is maintainable and easy to follow.
Run 3
The code is generally readable: it has a clear method name and Javadoc, logical structure, and a flat control flow with only two levels of nesting. Variable names are descriptive, and action granularity is mostly one action per line. However, there are some minor issues: the comment inside the nested loop is cryptic and unnecessary, the loop variable 'item' could be more clearly named 'category' to match the dataset semantics, and the nested loops create moderate complexity. The algorithm's intent is clear but would benefit from a brief comment explaining the stacked range calculation overall. Length is appropriate and not excessive.
Run 1
Code Structure: Logically organized into validation, initialization, per-category accumulation, and range construction. Nesting: Two loops and nested conditionals create moderate depth, but the blocks remain short and understandable. Clarity of intent: The documentation and descriptive variable names clearly explain the stacked-range calculation; the negative-value comment reinforces the arithmetic. Code length: Mostly concise, though the temporary result variable and repeated retrieval of seriesCount inside the outer loop add minor verbosity. Action granularity: Each statement performs one clear action, with no compressed multi-operation lines. Reading flow: The method follows a natural progression from input validation to accumulation and return. Minor improvements include hoisting seriesCount outside the outer loop and using compound assignments for accumulation.
Run 2
Code Structure: Logically organized into validation, initialization, category/series traversal, and range construction. Nesting: Two loops and nested conditionals create moderate depth, but remain manageable. Clarity of intent: The documentation, descriptive variable names, and separate positive/negative accumulators clearly communicate stacked range calculation. However, the documented null result for datasets without values is not obviously consistent with categories containing only null entries. Code length: Reasonably concise; moving seriesCount outside the outer loop and returning the result directly could reduce minor redundancy. Action granularity: Each statement performs one clear action, with no crowded lines. Reading flow: Natural top-to-bottom progression and consistent formatting make the algorithm easy to follow. The trailing comment about negative addition is slightly awkward but helpful.
Run 3
Code Structure: Logically organized into validation, initialization, per-category accumulation, and range construction. Nesting: Two loops and nested conditionals create moderate depth, but each level has a clear role. Clarity of intent: The documentation and descriptive variable names make the stacked-range calculation understandable; the negative-value comment is slightly redundant. Code length: Mostly concise, although the result variable and repeated series-count lookup could be simplified. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Execution proceeds naturally from setup to accumulation to the final result. Minor distractions include separate positive/negative tests, verbose addition assignments, and an extra blank line before the closing brace.