Sample
JetBrains/i51
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.013 | 0–1; higher is more readable | 89.0Δ 27.5 |
| Scalabrino | 0.803 | 0–1; higher is more readable | 74.6Δ 13.1 |
| Dorn | 0.813 | 0–1; higher is more readable | 99.2Δ 37.7 |
| Mi | 0.597 | 0–1; higher is more readable | 72.9Δ 11.4 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.6Δ 2.1 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 62.3Δ 0.8 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 63.1Δ 1.7 |
| BTTF | 0.605 | 0–1; higher is more readable | 89.0Δ 27.5 |
| Human | 0.8 | 0–1; original rating | 61.4 |
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. | 471.465 | −15.558 |
| Source linesThe number of non-empty source lines. | 17 | +6.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. | 2.967 | −4.45 |
Intercept 8.87 + feature contributions = -4.338 (log-odds).
Score = sigmoid(-4.338) = 0.013.
| Score | 0.803 |
|---|
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. | 48 | +1.632 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 15.612 | −0.192 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 17 | −0.149 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.109 | −0.118 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 17 | +0.031 |
Intercept 0.07 + feature contributions = 1.471 (log-odds).
Score = sigmoid(1.471) = 0.813.
| Score | 0.597 |
|---|
| Score | 11 |
|---|
Run 1
The code is very readable. Structure is logical: a main method with simple loops. Nesting level is low (only one level deep). Intent of performing the Collatz conjecture for numbers 1 to 1000 is clear. Length is concise and appropriate. Each action is on its own line, aiding clarity. Reading flow is natural, top-down. Minor deduction because the variable 'count' could be named 'steps' for clearer intent, and a comment indicating the Collatz conjecture would help beginners.
Run 2
The code is well-structured and highly readable. It uses a single class with a clear entry point, and the logic is organized into a simple outer loop and inner while loop. Nesting depth is only two levels, which is acceptable and does not hinder comprehension. The intent – to compute and print the Collatz stopping time for numbers 1 through 1000 – is straightforward and matches the class name. The code is concise, with no redundant operations or excessive length. Each line performs one discrete action, except the for-loop header which cleanly bundles initialization, condition, and increment. The reading flow follows the natural order: loop through numbers, apply the Collatz rule until reaching 1, count steps, and output the result. Minor deductions could be made for the generic variable name `n`/`count` and lack of explanatory comments, but the code is self-explanatory enough for most readers.
Run 3
The code is straightforward and easy to follow. The structure is logical: an outer loop iterates from 1 to 1000, an inner while loop applies the Collatz rules, and a counter tracks steps. Nesting is only two levels deep (for, while, if), which is acceptable. Intent is fairly clear—compute the number of steps for each starting value—though variable names like 'n' and 'count' could be more descriptive. Code length is concise and avoids unnecessary verbosity. Action granularity is mostly one action per line, but the line 'n = n * 3 + 1;' could be simplified or clarified. Reading flow is natural, with sequential logic and minimal branching. Overall, it's readable but could be improved with a comment explaining the Collatz conjecture and slightly more descriptive variable names.
Run 1
Code Structure: Logically organized, with initialization, sequence calculation, and output clearly separated. Nesting: The for/while/if nesting is moderate but natural for the algorithm and consistently indented. Clarity of intent: The class name and arithmetic clearly indicate the Collatz conjecture, though more descriptive variable names and labeled output would improve understanding. Code length: Concise without unnecessary code. Action granularity: Each statement performs a single clear action. Reading flow: Execution proceeds naturally from each starting value through its sequence to printing its step count.
Run 2
Code Structure: Logically organized into initialization, sequence processing, and output. Nesting: The for/while/if nesting is moderate but appropriate to the algorithm. Clarity of intent: The class name and recognizable Collatz rules convey purpose, though more descriptive variable names and labeled output would help. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one clear action; the loop header follows standard Java conventions. Reading flow: Execution proceeds naturally from each starting value through its sequence to printing the step count.
Run 3
Code Structure: Logically organized as a loop over starting values, sequence calculation, and output. Nesting: Moderate nesting through for, while, and if/else blocks, but each block is short and easy to follow. Clarity of intent: The class name identifies the Collatz algorithm, and count clearly tracks iterations; i and n are conventional but less descriptive, and printing counts without starting values limits output clarity. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs a single clear action. Reading flow: Natural top-to-bottom progression with consistent indentation and familiar control structures. A named upper-bound constant and a helper method for counting steps could improve readability slightly.