Sample

JetBrains/i46

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.76
Lines24

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
59.3Δ 4.2
Scalabrino0.4220–1; higher is more readable
25.8Δ 29.2
Dorn0.6510–1; higher is more readable
78.0Δ 22.9
Mi0.6710–1; higher is more readable
92.4Δ 37.3
LLOC15Logical lines; fewer is more readable
43.6Δ 11.4
DeepSeek V4 Pro17.330–20; mean of three runs
78.8Δ 23.7
GPT-6.1 Sol180–20; mean of three runs
77.5Δ 22.5
BTTF0.4850–1; higher is more readable
61.9Δ 6.8
Human0.760–1; original rating
55.1

Views

Source code

public class Main { public static void main(String[] args) { for (int i = 1; i <= 1000; i++) { String output = ""; if (i % 2 == 0) { output += "Foo"; } if (i % 3 == 0) { output += "Fizz"; } if (i % 5 == 0) { output += "Buzz"; } if (i % 7 == 0) { output += "Bar"; } if (output.equals("")) { System.out.println(i); } else { System.out.println(output); } } } }

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.687.888−22.7
Source linesThe number of non-empty source lines.24+9.6
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.528−5.291

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

Score0.422

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.45.958+1.719
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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.142−0.441
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.24−0.13
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.22.894−0.09

Intercept 0.07 + feature contributions = 0.622 (log-odds).
Score = sigmoid(0.622) = 0.651.

Score0.671
Score15
Run 1

The code demonstrates excellent readability. The structure is logical: a single loop with sequential independent condition checks, each appending to a clear output variable. Nesting is minimal — all if statements are at the same level, avoiding deep indentation. The intent is immediately clear: this is a FizzBuzz-style variant printing special words for multiples of 2, 3, 5, and 7. The code is concise, without unnecessary abstraction. Each action is on its own line, and the final check using `output.equals("")` clearly distinguishes between printing the number or the accumulated string. The reading flow follows a natural top-to-bottom progression: initialize loop, build output, print result. One minor possible improvement would be using `output.isEmpty()` instead of `output.equals("")`, but this doesn’t meaningfully impact readability.

Run 2

The code is highly readable due to its straightforward structure and clear intent. It uses separate, flat if-statements rather than nested conditions, which keeps the logic easy to follow. Each condition maps to a specific output token, and the final check for an empty string cleanly decides whether to print the number or the accumulated string. Action granularity is good—each line performs one logical operation. The loop range is explicit. Minor deductions: the use of string concatenation for output building is acceptable at this scale, and a small improvement could be refactoring the logic into a helper method, but overall the code is easy to understand and maintain.

Run 3

The code is clearly structured with a straightforward loop and independent conditional checks, avoiding complex nesting. Intent is obvious: it generates a Foo-Fizz-Buzz-Bar style output for numbers 1–1000. Each action is on its own line, improving readability. The use of string concatenation is simple, though a helper method could reduce repetition. Overall, the code is concise, flat, and easy to follow.

Run 1

Code Structure: Logically organized around a single loop with independent divisibility checks and a final output decision. Nesting: Shallow and consistent; no deeply nested conditional chains. Clarity of intent: The extended FizzBuzz behavior is easy to understand, though named constants could clarify the upper limit and divisors. Code length: Concise, with minor repetition that remains easy to follow. Action granularity: Each statement performs one clear action on its own line. Reading flow: Natural progression from initializing output, through appending matching labels, to printing either the number or accumulated text. Using output.isEmpty() instead of output.equals("") would make the empty-string check slightly more idiomatic.

Run 2

Code Structure: A single loop with logically ordered divisibility checks is well organized. Nesting: Shallow and consistent, with no complicated conditional chains. Clarity of intent: The number-to-label substitution is easy to understand, though the divisors and labels are unexplained literals. Code length: Concise for its purpose; the final printing branch could be simplified slightly. Action granularity: Each statement performs one clear action, and independent checks correctly allow labels to accumulate. Reading flow: Initialization, label construction, and output proceed naturally from top to bottom. Consistent indentation and straightforward control flow make the code highly readable.

Run 3

Code Structure: Logically organized into a loop, independent divisibility checks, and a final output decision. Nesting: Shallow and easy to follow, with no complex nested conditionals. Clarity of intent: The number-to-label substitution behavior is clear, though the range and divisor-label mappings lack contextual explanation. Code length: Concise for its purpose; the final printing branch could be simplified slightly. Action granularity: Each statement performs one clear action, with conventional loop control. Reading flow: Natural top-to-bottom progression from initialization through label accumulation to printing. Consistent formatting supports readability. Using output.isEmpty() instead of output.equals("") would express the empty-string check more directly.