Sample

JetBrains/i19

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.55
Lines28

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
30.5Δ 8.5
Scalabrino0.3920–1; higher is more readable
22.0Δ 0.0
Dorn0.7610–1; higher is more readable
93.2Δ 71.2
Mi0.4450–1; higher is more readable
44.1Δ 22.0
LLOC22Logical lines; fewer is more readable
17.4Δ 4.7
DeepSeek V4 Pro8.670–20; mean of three runs
7.6Δ 14.4
GPT-6.1 Sol160–20; mean of three runs
26.7Δ 4.7
BTTF0.3190–1; higher is more readable
14.4Δ 7.6
Human0.550–1; original rating
22.0

Views

Source code

public class ChristmasTree { public static void main(String[] args) { for (int i = 3; i <= 9; i += 2) { int spaces = i / 2; for (int j = 1; j <= i; j += 2) { // print spaces for (int k = 1; k <= spaces; k++) { System.out.print(" "); } // print asterisks for (int k = 1; k <= j; k++) { System.out.print("*"); } System.out.println(); spaces--; } // print trunk int trunkSpaces = i / 2; for (int j = 1; j <= 2; j++) { for (int k = 1; k <= trunkSpaces; k++) { System.out.print(" "); } System.out.println("*"); } System.out.println(); } } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.

Score0.392

Feature contributions

FeatureValueContribution
(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.

Score0.445
Score22
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.