Sample

JetBrains/i49

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.56
Lines21

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
25.4Δ 0.8
Scalabrino0.7110–1; higher is more readable
56.8Δ 32.2
Dorn0.3130–1; higher is more readable
22.0Δ 2.5
Mi0.5850–1; higher is more readable
69.5Δ 44.9
LLOC15Logical lines; fewer is more readable
43.6Δ 19.1
DeepSeek V4 Pro14.330–20; mean of three runs
38.1Δ 13.6
GPT-6.1 Sol170–20; mean of three runs
46.2Δ 21.6
BTTF0.3130–1; higher is more readable
12.7Δ 11.9
Human0.560–1; original rating
24.6

Views

Source code

public class Main { public static void main(String[] args) { int[] sequence = new int[251]; sequence[0] = 0; for (int i = 1; i <= 250; i++) { sequence[i] = sequence[i - 1] - i; if (sequence[i] <= 0 || contains(sequence, sequence[i], i - 1)) { sequence[i] = sequence[i - 1] + i; } System.out.println(sequence[i]); } } public static boolean contains(int[] sequence, int value, int endIndex) { for (int i = 0; i < endIndex; i++) { if (sequence[i] == value) { return true; } } return false; } }

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.917.139−30.266
Source linesThe number of non-empty source lines.21+8.4
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.836−5.755

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

Score0.711

Feature contributions

FeatureValueContribution
(log-odds)
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.141−0.432
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.79.952+0.279
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.19.593−0.136
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.21−0.061

Intercept 0.07 + feature contributions = -0.786 (log-odds).
Score = sigmoid(-0.786) = 0.313.

Score0.585
Score15
Run 1

The code is logically structured into a main method and a helper 'contains' method, which aids readability. Nesting is minimal, with only one level inside the loop and helper method. The intent—generating a sequence with non-positive or duplicate checks—is fairly clear, though variable names like 'sequence' could be more descriptive. Code length is concise for the algorithm. Action granularity is good: each line handles a single step (assignment, condition, print). Reading flow is natural, moving from initialization to generation to output. Minor deductions: the hardcoded array size and magic number 250 reduce flexibility and clarity. The 'contains' method could use a clearer name like 'containsValueUpTo'. Overall, the code is straightforward and easy to follow.

Run 2

The code is fairly straightforward but has several readability issues. The structure is simple, with a main method and a helper method, but the algorithm's intent is unclear from variable names like 'sequence' and magic numbers like 250 and 251. Nesting is minimal, which is good, but the conditional logic for updating sequence[i] could be clearer. The contains method is named well but accepts parameters that make its purpose slightly ambiguous. Action granularity is mostly one action per line, aiding readability. However, the reading flow suffers because the logic for generating the sequence is not immediately obvious; a comment or more descriptive naming would help. Code length is acceptable, though the hardcoded loop bounds reduce flexibility. Overall, the code is functional and moderately readable but lacks clarity of intent and uses poor variable naming.

Run 3

The code is generally structured logically with a clear main method and a helper method for checking duplicates. Nesting is minimal, and intent is mostly clear: generate a sequence with a specific recurrence rule. However, the array size is hardcoded to 251, which hurts clarity and flexibility. The contains method repeatedly scans earlier values, making the code longer and less efficient than necessary; using a Set would improve both readability and intent. Variable names are decent but not descriptive of the sequence's purpose. Action granularity is fine—one major operation per line in the loop—but the condition in the if statement combines two distinct checks, slightly reducing clarity. Reading flow is natural, moving from initialization to generation to output, and the helper method is easy to follow.

Run 1

Code Structure: The main sequence-generation logic and membership check are cleanly separated. Nesting: Shallow loops and conditionals make the code easy to follow. Clarity of intent: Descriptive names help, but the sequence rule is unexplained, 250 and 251 are magic numbers, and endIndex is ambiguous because the loop treats it as exclusive. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs a single action, although sequence[i] temporarily stores a candidate before possibly being overwritten. Reading flow: Initialization, generation, adjustment, and output follow a natural order; consistent indentation supports scanning.

Run 2

Code Structure: Clear separation between sequence generation and membership checking. Nesting: Shallow loops and conditionals are easy to follow. Clarity of intent: Descriptive variable names make individual operations understandable, but the sequence's purpose is undocumented, and the exclusive endIndex bound is unclear at the call site. Code length: Concise without unnecessary boilerplate beyond the Java entry point. Action granularity: Each statement performs one clear action. Reading flow: Initialization, calculation, validation, and output follow a natural order. Readability would improve with a named constant for 250, a more explicit membership-bound convention, and a brief explanation of the sequence rule.

Run 3

Code Structure: Clearly separates sequence generation from the membership-check helper. Nesting: Shallow loop-and-conditional nesting is easy to follow. Clarity of intent: Descriptive parameter names and straightforward operations help, but the sequence's purpose is undocumented, 250 and 251 are magic numbers, and endIndex's exclusive interpretation is unclear at the call site. Code length: Compact without unnecessary boilerplate beyond Java's required structure. Action granularity: Each statement performs one primary action. Reading flow: Initialization, generation, adjustment, and output follow a natural order; consistent indentation helps, although a blank line between methods would improve separation.