Sample
JetBrains/i20
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 16.9Δ 9.3 |
| Scalabrino | 0.259 | 0–1; higher is more readable | 11.9Δ 4.2 |
| Dorn | 0.49 | 0–1; higher is more readable | 42.4Δ 34.7 |
| Mi | 0.651 | 0–1; higher is more readable | 88.1Δ 80.5 |
| LLOC | 19 | Logical lines; fewer is more readable | 25.4Δ 17.8 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 16.1Δ 8.5 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 26.7Δ 19.1 |
| BTTF | 0.371 | 0–1; higher is more readable | 23.7Δ 16.1 |
| Human | 0.4 | 0–1; original rating | 7.6 |
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. | 1041.224 | −34.36 |
| Source linesThe number of non-empty source lines. | 22 | +8.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. | 3.752 | −5.628 |
Intercept 8.87 + feature contributions = -22.318 (log-odds).
Score = sigmoid(-22.318) = 0.
| Score | 0.259 |
|---|
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. | 51.909 | +1.467 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.188 | −0.88 |
| 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 (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 19.925 | −0.131 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 21 | −0.061 |
Intercept 0.07 + feature contributions = -0.042 (log-odds).
Score = sigmoid(-0.042) = 0.49.
| Score | 0.651 |
|---|
| Score | 19 |
|---|
Run 1
The code is logically organized into two loops to print the top and bottom halves of a diamond, but readability suffers from unclear variable naming, magic numbers, and several complex expressions. The nesting is shallow but the loops contain multiple responsibilities. The ternary operator inside the inner loop obscures the intent of generating symmetric numbers. The repeated logic for both halves increases length and reduces maintainability. Action granularity is acceptable since each line performs one primary operation, but the expressions themselves are not self-explanatory. The reading flow is natural for understanding the general structure but requires close analysis to grasp the exact output pattern. Overall, the code would benefit from well-named variables, helper methods, and clear separation of concerns.
Run 2
The code is logically structured into two symmetric loops for the top and bottom halves of the diamond, and nesting depth is moderate (2–3 levels), which is acceptable. The use of ternary expressions for digit printing makes the intent somewhat clear but reduces readability for beginners; the pattern logic is not immediately obvious. Code length is concise, but some duplication exists because both halves use nearly identical inner loops. Action granularity is mostly one action per line, which helps. Reading flow is natural overall, but the ternary condition `j > i ? i * 2 - j : j` interrupts the flow and requires mental computation. The code would be more readable if the digit calculation were extracted into a helper method or if comments briefly explained the pattern logic.
Run 3
The code is compact and logically structured, with clear top and bottom halves for the diamond. Nesting is limited to two levels, which is reasonable. The intent is mostly clear but variable names like i and j and the ternary expression `j > i ? i * 2 - j : j` make the numeric pattern less immediately obvious. Code length is short, but the duplicated loops for upper and lower halves could be unified for better maintainability. Each loop body is one action per line, improving readability. The reading flow is natural for this type of pattern, though the hardcoded size (9) and lack of explanatory comments slightly reduce clarity. Overall it is readable but could benefit from descriptive constants or a helper method.
Run 1
Code Structure: Logically separates the upper and lower halves of the diamond, though their duplicated rendering logic could be extracted. Nesting: Two loop levels are manageable, with no deeply nested conditionals. Clarity of intent: The class name and symmetry suggest diamond printing, but single-letter variables, repeated hardcoded dimensions, and the ternary arithmetic require interpretation. Code length: Short overall, although a helper method could eliminate repetition. Action granularity: Each statement performs one clear action; the ternary combines number selection with output but remains compact. Reading flow: Consistent indentation and sequential spacing, number printing, and newline operations make the flow natural.
Run 2
Code Structure: The upper and lower diamond halves are logically separated, though their duplicated row-printing logic could be extracted into a helper. Nesting: Two loop levels are manageable, and consistent indentation makes boundaries clear. Clarity of intent: The class name and printing operations convey the purpose, but single-letter variables, hardcoded dimensions, and the ternary arithmetic require some interpretation. Code length: The implementation is compact, although repeated logic adds avoidable length. Action granularity: Each statement performs one clear action; standard loop headers and the ternary expression remain reasonably concise. Reading flow: Execution follows a natural top-to-bottom sequence—spaces, numbers, newline—first expanding and then contracting the diamond.
Run 3
Code Structure: Clearly separates the upper and lower halves of the diamond, but duplicates row-printing logic. Nesting: Two loop levels are manageable, with consistent indentation. Clarity of intent: The class name and printing operations reveal the purpose, though single-letter variables, hard-coded dimensions, and the ternary expression require interpretation. Code length: Compact overall; extracting shared row-printing logic could reduce repetition. Action granularity: Each print operation occupies its own line, and loop headers follow conventional Java style. Reading flow: Naturally progresses from the expanding upper half to the shrinking lower half, with spacing, digits, and line breaks handled consistently.