Sample

JetBrains/b46

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.85
Lines24

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
60.2Δ 10.2
Scalabrino0.4220–1; higher is more readable
25.8Δ 44.5
Dorn0.6470–1; higher is more readable
76.3Δ 5.9
Mi0.6780–1; higher is more readable
94.1Δ 23.7
LLOC15Logical lines; fewer is more readable
43.6Δ 26.7
DeepSeek V4 Pro16.670–20; mean of three runs
62.3Δ 8.1
GPT-6.1 Sol180–20; mean of three runs
77.5Δ 7.2
BTTF0.4510–1; higher is more readable
44.9Δ 25.4
Human0.850–1; original rating
70.3

Views

Source code

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.682.429−22.52
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.503−5.255

Intercept 8.87 + feature contributions = -9.305 (log-odds).
Score = sigmoid(-9.305) = 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.144−0.459
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.851−0.09

Intercept 0.07 + feature contributions = 0.604 (log-odds).
Score = sigmoid(0.604) = 0.647.

Score0.678
Score15
Run 1

The code is well-structured with clear separation of concerns. Each divisibility check is a flat, independent if-statement, avoiding deep nesting. Variable names like 'output' clearly indicate intent. The logic flows naturally from checking conditions to printing the result. While the code is somewhat verbose for the problem it solves, the repetition actually aids readability by making the pattern obvious. Each line performs a single action, and the if-else at the end handles the two distinct output cases clearly. Minor improvements could include extracting the divisibility checks or using a StringBuilder, but overall the code is very readable and maintainable.

Run 2

The code is well-structured and readable. It uses a flat, linear control flow with no nested conditionals beyond the main loop. The intent is clear: generate a modified FizzBuzz-style output for numbers 1–1000. Each conditional check is independent and easy to follow. Action granularity is generally good—each `if` performs a single append, and printing is separated into a clear if/else. The only minor drawbacks are the verbose empty-string check (`output.equals("")`) and some repetition in the conditional blocks, which could be simplified with a helper method or array of divisors. Overall, the code is concise, predictable, and easy to scan.

Run 3

The code is well-structured, using a simple, single-level loop with separate, flat if statements for each divisor. Each condition performs one clear, logical action—appending a word to the output string—and the final conditional handles printing concisely. Intent is obvious: a FizzBuzz variant. Nesting is minimal, and the flow follows a natural sequence: build output, then decide what to print. Code length is reasonable, though the empty string check (output.equals("")) could be slightly optimized to output.isEmpty(), and the repeated System.out.println could be simplified to a single print after determining the final result. Overall, it's clean, readable, and maintainable, but minor refinements could improve elegance.

Run 1

Code Structure: A single loop with independent divisibility checks is logically organized. Nesting: Shallow, consistent nesting makes the control flow easy to follow. Clarity of intent: The code clearly prints concatenated labels for matching divisors, otherwise the number; named constants could better explain the range and divisor-label mappings. Code length: Concise for its purpose, though the repeated checks introduce minor duplication. Action granularity: Each statement performs one clear action. Reading flow: Initialization, label construction, and output appear in a natural sequence. Using output.isEmpty() rather than output.equals("") would express the empty-string check more directly.

Run 2

Code Structure: Logically organized into a single loop with sequential divisibility checks and a final output decision. Nesting: Shallow and consistent; conditionals sit directly inside the loop. Clarity of intent: The number-to-label mapping is easy to understand, though the loop bound and label choices lack explanatory context. Code length: Concise for its purpose, with minor repetition that remains easy to follow. Action granularity: Each assignment, check, and print occupies its own line; the conventional for-loop header is clear. Reading flow: Natural progression from initializing the output to appending matching labels and printing either the result or the number. Using output.isEmpty() instead of output.equals("") would slightly improve idiomatic readability.

Run 3

Code Structure: Logically organized around a loop, divisibility checks, and output selection. Nesting: Shallow and consistent, with no deeply nested conditionals. Clarity of intent: The independent checks clearly build a combined label for each number, although the significance of the labels and upper limit is unexplained. Code length: Concise; the repeated checks are straightforward rather than unnecessarily verbose. Action granularity: Each statement performs one clear action, with conventional loop syntax. Reading flow: Natural top-to-bottom progression from initialization through label construction to printing. Minor improvements include using output.isEmpty() instead of output.equals("") and naming the upper limit if it has domain significance.