Sample

JetBrains/b45

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.94
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
69.5Δ 16.9
Scalabrino0.7380–1; higher is more readable
57.6Δ 28.8
Dorn0.1830–1; higher is more readable
12.7Δ 73.7
Mi0.1630–1; higher is more readable
12.7Δ 73.7
LLOC7Logical lines; fewer is more readable
85.2Δ 1.3
DeepSeek V4 Pro16.330–20; mean of three runs
56.8Δ 29.7
GPT-6.1 Sol180–20; mean of three runs
77.5Δ 8.9
BTTF0.5430–1; higher is more readable
77.1Δ 9.3
Human0.940–1; original rating
86.4

Views

Source code

public class BeerSong { public static void main(String[] args) { for(int i=99;i>0;i--){ System.out.println(i+ " bottles of beer on the wall, "+i+" bottles of beer."); System.out.println("Take one down and pass it around, "+(i-1)+" bottles of beer on the wall.\n"); } 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.429.104−14.16
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.29−6.435
Source linesThe number of non-empty source lines.10+4

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

Score0.738

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.111.6−1.062
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
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.8.673−0.289
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.10+0.191
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.086+0.102

Intercept 0.07 + feature contributions = -1.493 (log-odds).
Score = sigmoid(-1.493) = 0.183.

Score0.163
Score7
Run 1

The code is logically structured, with a clear main method and a simple for loop controlling the verses. Nesting is minimal, with only one level inside the loop. The intent is straightforward—printing the '99 Bottles of Beer' song—though the final verse handling (no bottles and buying more) is outside the loop, which slightly interrupts the natural flow. The code is concise, but it could be improved by extracting the repeated 'bottles of beer on the wall' phrasing into a constant or helper method for better readability and maintainability. Action granularity is good, with each output statement on its own line. Reading flow is mostly natural, but the abrupt transition from the loop to the final two lines feels slightly disconnected from the loop's pattern.

Run 2

The code is simple and clear in intent, iterating through 99 to 1 with a natural reading flow. It uses minimal nesting and keeps actions on separate lines where appropriate. Structure is logical, with the loop handling the repeated verses and the final lines printed after. Minor readability issues include odd spacing, a missing space after 'for', and a grammatical inaccuracy when the count reaches 1 (i.e., '1 bottles'), but these are cosmetic. Overall, concise and easy to follow.

Run 3

The code is straightforward and easy to follow. It has a clear, linear structure, and the for-loop keeps the logic concise without unnecessary repetition. Nesting is minimal, with only one loop. The intent is obvious: print the '99 Bottles of Beer' song lyrics. Action granularity is good, with one logical action per line. However, readability suffers slightly from the lack of blank lines or method extraction to separate the loop from the final verse, and the string concatenation is dense. Also, the grammar is incorrect when i=1 ('1 bottles'), which is a logic issue but also slightly muddies clarity. Overall, the code is compact and readable for its purpose, but could be improved with minor formatting and grammar handling.

Run 1

Code Structure: A single main method clearly organizes the countdown loop and closing verses. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: The BeerSong class name and printed lyrics clearly communicate the purpose, although a descriptive variable name could improve clarity. Code length: Concise, with no unnecessary logic or repetition beyond the required output. Action granularity: Each print statement occupies its own line; the loop header conventionally combines initialization, condition, and decrement. Reading flow: Execution follows the song naturally from 99 bottles to the closing verse. Inconsistent indentation and tight spacing around operators slightly reduce readability.

Run 2

Code Structure: A straightforward class and main method organize the countdown loop and final verse logically. Nesting: Shallow nesting makes the code easy to follow. Clarity of intent: The BeerSong name and printed lyrics clearly communicate the purpose, although a more descriptive loop variable could help. Code length: Concise, with no unnecessary abstraction or repetition beyond the required output. Action granularity: Each print statement occupies its own line; the loop header conventionally combines initialization, condition, and decrement. Reading flow: The countdown followed by the closing verse reads naturally. Inconsistent indentation, tight operator spacing, and long string-concatenation lines slightly reduce readability.

Run 3

Code Structure: Logically organized into a single main method, with repeated verses in a loop and the final verse afterward. Nesting: Shallow, with only one loop inside the method. Clarity of intent: The BeerSong class name and printed lyrics make the purpose obvious, though a descriptive counter name would improve clarity. Code length: Concise, with no unnecessary logic. Action granularity: Each print operation occupies its own line; the loop header conventionally combines initialization, condition, and decrement. Reading flow: Natural and sequential, although inconsistent indentation and cramped spacing around operators slightly reduce readability.