Sample

JetBrains/b52

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.94
Lines14

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0040–1; higher is more readable
79.7Δ 8.1
Scalabrino0.8210–1; higher is more readable
78.8Δ 8.9
Dorn0.5060–1; higher is more readable
47.5Δ 40.3
Mi0.6380–1; higher is more readable
79.7Δ 8.1
LLOC9Logical lines; fewer is more readable
79.2Δ 8.5
DeepSeek V4 Pro17.330–20; mean of three runs
78.8Δ 8.9
GPT-6.1 Sol180–20; mean of three runs
77.5Δ 10.2
BTTF0.4140–1; higher is more readable
30.5Δ 57.2
Human0.940–1; original rating
87.7

Views

Source code

class Fibonacci { public static void main(String[] args) { int n = 31, t1 = 0, t2 = 1; System.out.print("First " + n + " terms: "); for (int i = 1; i <= n; ++i) { System.out.print(t1 + " "); int sum = t1 + t2; t1 = t2; t2 = sum; } } }

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.437.594−14.441
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.744−5.615
Source linesThe number of non-empty source lines.14+5.6

Intercept 8.87 + feature contributions = -5.586 (log-odds).
Score = sigmoid(-5.586) = 0.004.

Score0.821

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.52+1.463
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
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.14+0.541
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.139−0.412
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.12.774−0.231
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.14+0.1

Intercept 0.07 + feature contributions = 0.023 (log-odds).
Score = sigmoid(0.023) = 0.506.

Score0.638
Score9
Run 1

The code is straightforward and logically structured for a simple Fibonacci sequence generator. It uses minimal nesting (a single for-loop), clear variable naming (n, t1, t2), and concise logic. Each line within the loop performs one clear action: printing the current term, computing the sum, and updating variables. The reading flow is natural: initialize, print header, iterate, print term, update. However, it loses points because the initial variable declaration combines three unrelated assignments on one line, slightly reducing clarity. The hardcoded `n = 31` also limits reusability and could be improved with user input. Overall, very readable for a small program.

Run 2

The code is well-structured and clear. Variables are initialized on one line, which is acceptable given their close relation. The loop is flat, with no unnecessary nesting. Each action is logically separated: printing the current term, computing the next, and updating values. The intent—printing the first 31 Fibonacci numbers—is obvious. The only minor issue is the absence of a class-level access modifier and the slightly condensed variable declaration, which slightly affects readability for a beginner but not significantly.

Run 3

The code is highly readable. It follows a logical structure with a clear class, main method, and iterative loop. Nesting is minimal, with only a simple for-loop. The intent is obvious from the variable names (n, t1, t2, sum) and the output message. The code is concise and avoids unnecessary length. Each action is performed on a separate line, improving clarity. The reading flow is natural: initialize, print header, loop, print term, update values. Minor deductions: the input value is hardcoded and no comments explain the algorithm, but these are not significant enough to reduce the score much.

Run 1

Code Structure: The class, main method, and loop are logically organized. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: The class name and output message clearly indicate Fibonacci generation, though t1 and t2 could have more descriptive names. Code length: Concise with no unnecessary logic. Action granularity: Most lines perform one action, but the combined declaration of n, t1, and t2 slightly reduces readability. Reading flow: Initialization, iteration, output, and state updates follow a natural sequence; minor indentation inconsistency is the main formatting weakness.

Run 2

Code Structure: Logically organized, with initialization, output labeling, and Fibonacci generation clearly separated. Nesting: Minimal, with only one loop inside main. Clarity of intent: The class name and output message make the purpose clear, though t1 and t2 are less descriptive than current and next. Code length: Concise, without unnecessary statements. Action granularity: Most lines perform one action, but the combined declaration of n, t1, and t2 slightly reduces scanability. Reading flow: Natural progression from setup to output and sequence updates; minor indentation inconsistencies do not significantly hinder readability.

Run 3

Code Structure: Logically organized into initialization, output, and sequence generation. Nesting: Minimal, with a single loop inside main. Clarity of intent: The Fibonacci class name and output text make the purpose clear, though t1 and t2 are less descriptive than names such as current and next. Code length: Concise without unnecessary statements. Action granularity: Most lines perform one action, but the initial declaration combines three variables. Reading flow: Natural top-to-bottom progression, with blank lines separating steps; slightly inconsistent indentation is a minor distraction.