Sample
JetBrains/b45
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 69.5Δ 16.9 |
| Scalabrino | 0.738 | 0–1; higher is more readable | 57.6Δ 28.8 |
| Dorn | 0.183 | 0–1; higher is more readable | 12.7Δ 73.7 |
| Mi | 0.163 | 0–1; higher is more readable | 12.7Δ 73.7 |
| LLOC | 7 | Logical lines; fewer is more readable | 85.2Δ 1.3 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 56.8Δ 29.7 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 8.9 |
| BTTF | 0.543 | 0–1; higher is more readable | 77.1Δ 9.3 |
| Human | 0.94 | 0–1; original rating | 86.4 |
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. | 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.
| Score | 0.738 |
|---|
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. | 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.
| Score | 0.163 |
|---|
| Score | 7 |
|---|
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.