Sample

JetBrains/b19

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.48
Lines20

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
34.7Δ 18.6
Scalabrino0.5110–1; higher is more readable
34.7Δ 18.6
Dorn0.6960–1; higher is more readable
83.9Δ 67.8
Mi0.5470–1; higher is more readable
62.7Δ 46.6
LLOC17Logical lines; fewer is more readable
34.3Δ 18.2
DeepSeek V4 Pro100–20; mean of three runs
8.9Δ 7.2
GPT-6.1 Sol14.670–20; mean of three runs
13.6Δ 2.5
BTTF0.0880–1; higher is more readable
0.8Δ 15.3
Human0.480–1; original rating
16.1

Views

Source code

public class ChristmasTree { public static void main(String[] args) { for (int i = 3; i <= 9; i++) { for (int j = 1; j <= i; j++) { for (int k = i; k >= j; k--) { System.out.print(" "); } for (int l = 1; l <= j * 2 - 1; l++) { System.out.print("*"); } System.out.println(); } for (int m = i; m >= 1; m--) { 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.814.255−26.87
Source linesThe number of non-empty source lines.20+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.392−5.088

Intercept 8.87 + feature contributions = -15.088 (log-odds).
Score = sigmoid(-15.088) = 0.

Score0.511

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.57+1.251
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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.144−0.459
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.18.759−0.148
Indentation frequencyHow rapidly indentation changes from line to line.20−0.045
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.20−0.038

Intercept 0.07 + feature contributions = 0.828 (log-odds).
Score = sigmoid(0.828) = 0.696.

Score0.547
Score17
Run 1

The code's structure is repetitive and hard to interpret at a glance. It uses three nested loops for spacing and star printing, making the logic tangled and the intent unclear. Variable names like 'i', 'j', 'k', 'l', and 'm' are non-descriptive, lowering readability. The action granularity is acceptable, but the reading flow is disrupted by deeply nested loops and repeated printing patterns. The overall design is unnecessarily long for the task, and there's no separation of concerns or helper methods to clarify the steps of drawing a tree. Code length is moderate, but the lack of structure and clarity hurts maintainability.

Run 2

The code is highly unreadable due to several issues. It has deeply nested loops (3 levels) with poorly named variables (i, j, k, l, m), making it difficult to understand the tree-drawing logic. The structure is tangled, with the trunk printing embedded mid-loop. Action granularity is poor, as multiple operations are condensed into single lines. The code lacks any comments or method extraction to clarify intent. While concise, it sacrifices clarity for brevity. The reading flow is disorganized, jumping between spaces, stars, newlines, and trunk logic without clear separation. Variable names fail to convey purpose (e.g., 'k' for space count, 'l' for star count). The nested for loops make it hard to trace the geometry of the Christmas tree shape being drawn.

Run 3

The code has a clear purpose: drawing a Christmas tree pattern. It uses nested loops logically to control rows, spaces, and stars. The structure is straightforward and the action granularity is mostly one statement per line, aiding readability. However, variable names like 'i', 'j', 'k', 'l', and 'm' are non-descriptive and reduce clarity of intent. The nesting level goes up to 4 levels, which is moderately deep but manageable for this simple algorithm. The trunk drawing is minimal and could be clearer. Overall, the code is concise and functional, but naming and slightly deep nesting prevent full readability.

Run 1

Code Structure: Logically organized into loops that print tree rows, a trunk, and a separator, but all logic resides in main. Nesting: Three nested loops increase the effort required to follow execution. Clarity of intent: The class name and printed characters suggest Christmas trees, but single-letter variables and unexplained bounds obscure dimensions and repetition. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action, and output operations are separated appropriately. Reading flow: Consistent indentation and sequential printing provide a natural flow, though readers must mentally track loop bounds to understand the resulting shapes.

Run 2

Code Structure: Logically organized into printing tree rows, a trunk, and a separator, though helper methods could distinguish these tasks. Nesting: Three nested loops make the spacing and row relationships moderately demanding to follow. Clarity of intent: The class name and printed characters suggest Christmas trees, but single-letter variables and unexplained bounds obscure dimensions and the purpose of printing multiple trees. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action. Reading flow: Consistent indentation and sequential printing provide a natural flow, although descriptive names and brief comments would make the loop calculations easier to understand.

Run 3

Code Structure: Logically organized into loops that print foliage, a trunk, and separation between trees. Nesting: Three nested loops make the output pattern harder to follow, though the nesting is appropriate for the task. Clarity of intent: The class name and printed characters suggest Christmas trees, but single-letter variables and unexplained bounds obscure dimensions and repetition. Code length: Concise, with no substantial unnecessary code. Action granularity: Each output operation occupies its own line, making individual steps easy to identify. Reading flow: Execution proceeds naturally from foliage to trunk to the next tree, but descriptive variable names and brief comments would make the pattern calculations easier to understand.