Sample
JetBrains/i19
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 30.5Δ 8.5 |
| Scalabrino | 0.392 | 0–1; higher is more readable | 22.0Δ 0.0 |
| Dorn | 0.761 | 0–1; higher is more readable | 93.2Δ 71.2 |
| Mi | 0.445 | 0–1; higher is more readable | 44.1Δ 22.0 |
| LLOC | 22 | Logical lines; fewer is more readable | 17.4Δ 4.7 |
| DeepSeek V4 Pro | 8.67 | 0–20; mean of three runs | 7.6Δ 14.4 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 26.7Δ 4.7 |
| BTTF | 0.319 | 0–1; higher is more readable | 14.4Δ 7.6 |
| Human | 0.55 | 0–1; original rating | 22.0 |
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. | 972.514 | −32.093 |
| 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. | 3.223 | −4.834 |
Intercept 8.87 + feature contributions = -16.857 (log-odds).
Score = sigmoid(-16.857) = 0.
| Score | 0.392 |
|---|
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. | 60 | +1.124 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.115 | −0.18 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 60 | +0.164 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 25 | −0.153 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 25 | +0.128 |
| 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.508 | −0.039 |
Intercept 0.07 + feature contributions = 1.158 (log-odds).
Score = sigmoid(1.158) = 0.761.
| Score | 0.445 |
|---|
| Score | 22 |
|---|
Run 1
The code structure follows a clear top-down logic (outer loop for trees, inner loops for tiers and trunk), but it suffers from poor clarity of intent and repetitive logic. Variable names like i, j, and k are ambiguous, and magic numbers (3, 9, 2) obscure meaning. Action granularity is mostly one action per line, which aids readability, but nesting depth (up to 4 levels) and the presence of multiple nested loops make the reading flow disorganized. The trunk is nested inside the outer loop, which is questionable. The code is concise but not self-documenting; comments are sparse and only partially helpful. Additionally, the spaces calculation (i / 2) for both tiers and trunk is repeated, adding redundancy. The lack of helper methods or named constants results in tangled logic that requires effort to parse.
Run 2
The code is structured into nested loops with comments, but the logic is convoluted and the intent is unclear. Deeply nested loops make it hard to follow. The variable names (i, j, k) are not descriptive. The trunk loop prints only one asterisk per line, which does not match a typical tree shape. Odd loop boundaries and spacing logic add to the confusion. The reading flow is interrupted by arbitrary blank lines and disjoint loop blocks. Overall, the code is not very readable despite being concise.
Run 3
The code is logically organized into sections (tree layers, trunk), and the use of loops keeps it reasonably concise for a simple pattern problem. However, the intent is not immediately clear due to magic numbers like 3, 9, 2, and the use of multiple nested loops for spaces, asterisks, and trunk printing. Nesting reaches three levels, and the 'spaces' variable manipulation is slightly ambiguous. Action granularity is mostly good, but the repetition of printing spaces makes the reading flow feel disjointed. Renaming variables (e.g., startWidth, maxWidth) and extracting helper methods for printing spaces/asterisks would improve readability significantly.
Run 1
Code Structure: Logically separates foliage, trunk, and spacing, though helper methods could improve organization. Nesting: Three loop levels require some mental tracking, but consistent indentation makes them manageable. Clarity of intent: The class name and comments clearly communicate tree printing; generic loop variables and unexplained numeric bounds slightly reduce clarity. Code length: Reasonably concise, with some repeated spacing logic. Action granularity: Each statement performs one clear action, without compressed multi-action lines. Reading flow: Execution naturally progresses from foliage to trunk to separation between trees, making the overall behavior easy to follow.
Run 2
Code Structure: Logically separates foliage, trunk, and spacing, though helper methods could reduce repetition. Nesting: Three nested loops make tracking indices somewhat demanding, but consistent indentation helps. Clarity of intent: The class name and comments clearly convey tree printing; generic loop variables and unexplained numeric bounds weaken clarity. Code length: Compact overall, with minor duplication in space printing. Action granularity: Each statement performs one action, making individual steps easy to follow. Reading flow: Execution naturally proceeds from foliage to trunk to separation between trees, with comments guiding the reader.
Run 3
Code Structure: Logically separates foliage, trunk, and spacing, although helper methods could improve organization. Nesting: Three loop levels require some tracking, but consistent indentation keeps them manageable. Clarity of intent: The class name and comments clearly identify the purpose; generic loop variables and hard-coded bounds make dimensions less explicit. Code length: Compact overall, with some repeated space-printing logic. Action granularity: Each statement performs a single clear action. Reading flow: Execution naturally proceeds from foliage to trunk, then to the next tree, with blank lines separating output.