Sample

JetBrains/i45

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.82
Lines23

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
44.9Δ 19.9
Scalabrino0.6560–1; higher is more readable
50.8Δ 14.0
Dorn0.1320–1; higher is more readable
8.5Δ 56.4
Mi0.3040–1; higher is more readable
24.6Δ 40.3
LLOC15Logical lines; fewer is more readable
43.6Δ 21.2
DeepSeek V4 Pro160–20; mean of three runs
53.4Δ 11.4
GPT-6.1 Sol170–20; mean of three runs
46.2Δ 18.6
BTTF0.570–1; higher is more readable
83.9Δ 19.1
Human0.820–1; original rating
64.8

Views

Source code

public class Main { public static void main(String[] args) { int bottles = 99; String word = "bottles"; while (bottles > 0) { if (bottles == 1) { word = "bottle"; } System.out.println(bottles + " " + word + " of beer on the wall, " + bottles + " " + word + " of beer."); bottles--; if (bottles == 1) { word = "bottle"; } if (bottles == 0) { System.out.println("Take one down and pass it around, no more bottles of beer on the wall."); } else { System.out.println("Take one down and pass it around, " + bottles + " " + word + " of beer on the wall."); } } System.out.println("No more bottles of beer on the wall, no more bottles of beer."); System.out.println("Go to the store and buy some more, 99 bottles of beer on the wall."); } }

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.759.677−25.069
Source linesThe number of non-empty source lines.23+9.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.4.038−6.057

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

Score0.656

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.117.913−1.329
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
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.23−0.107
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.21.714−0.106
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.087+0.094

Intercept 0.07 + feature contributions = -1.884 (log-odds).
Score = sigmoid(-1.884) = 0.132.

Score0.304
Score15
Run 1

The code is generally readable, with clear variable names ('bottles', 'word') and a logical while-loop structure for the 99 Bottles song. Nesting is minimal, with only two if-conditions inside the loop. Action granularity is mostly one statement per line, and reading flow is natural. However, there are minor issues: the pluralization logic is repeated and slightly scattered (the word 'bottle' is updated twice), which slightly harms clarity of intent. The code length is concise but could be slightly reduced by simplifying the singular/plural handling. Overall, it is easy to follow, but small improvements could make the intent clearer.

Run 2

The code is logically structured and relatively flat, with only one nested if inside a while loop. The intent, printing the '99 Bottles of Beer' song, is clear. Action granularity is good, with one main action per line. However, the reading flow is slightly disrupted by duplicated pluralization logic. The word 'bottle' is set twice, and the final verse is hardcoded outside the loop, making the transition slightly abrupt. While concise for the task, minor refactoring could improve clarity.

Run 3

The code is logical and straightforward, implementing the classic '99 Bottles of Beer' song. It uses a single while loop with minimal nesting, maintaining a flat structure. Each action is generally on its own line, and the intent of printing lyrics is clear. The variable 'word' is updated appropriately for singular/plural handling. However, the flow has minor inefficiencies: the singular 'bottle' check is duplicated before and after decrementing, and the final message is hardcoded after the loop, slightly breaking the natural reading flow. The code is concise for its purpose, but could be more elegant with a helper method for the pluralization logic. Overall, it is highly readable, though not exemplary due to repetitive conditionals.

Run 1

Code Structure: Logically organized into initialization, a countdown loop, and closing verses. Nesting: Shallow and manageable, with simple conditionals inside one loop. Clarity of intent: Descriptive variables and explicit output make the beer-song countdown clear, though maintaining singular/plural wording through mutable state adds minor complexity. Code length: Concise overall, but the repeated bottles == 1 check is redundant. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom progression mirrors the song; long string-concatenation lines slightly hinder scanning.

Run 2

Code Structure: A single method logically groups initialization, verse generation, and the closing lines. Nesting: Shallow loop and conditional nesting is easy to follow. Clarity of intent: Descriptive variables and explicit lyrics clearly convey the purpose, although updating the singular word in two places adds redundant state management. Code length: Appropriately concise overall, but the repeated singularization check could be simplified. Action granularity: Each statement performs one clear action; long string-concatenation expressions slightly reduce readability. Reading flow: The countdown and output follow the song naturally, with consistent formatting and straightforward control flow.

Run 3

Code Structure: A single method with a straightforward loop and final output is logically organized. Nesting: Conditionals inside the loop introduce only moderate nesting. Clarity of intent: Descriptive variables and recognizable song lyrics make the purpose clear, although maintaining the singular/plural word as mutable state adds slight complexity. Code length: Generally concise, but the repeated singular-case check is redundant. Action granularity: Each statement performs one clear action on its own line. Reading flow: The sequence naturally follows printing a verse, decrementing the count, and printing the next line; however, long concatenated output statements and the duplicated word update slightly interrupt readability.