Sample

JetBrains/i64

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.64
Lines34

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
18.6Δ 14.4
Scalabrino0.6630–1; higher is more readable
51.7Δ 18.6
Dorn0.1420–1; higher is more readable
9.3Δ 23.7
Mi0.7650–1; higher is more readable
99.2Δ 66.1
LLOC25Logical lines; fewer is more readable
8.9Δ 24.2
DeepSeek V4 Pro130–20; mean of three runs
23.3Δ 9.7
GPT-6.1 Sol150–20; mean of three runs
15.3Δ 17.8
BTTF0.470–1; higher is more readable
52.5Δ 19.5
Human0.640–1; original rating
33.1

Views

Source code

public class InventorySequence { public static void main(String[] args) { int[] sequence = new int[1000]; sequence[0] = 0; int index = 1; while (index < 1000) { int current = sequence[index - 1]; int count = 0; for (int i = 0; i < index; i++) { if (sequence[i] == current) { count++; } } sequence[index] = count; index++; if (!inArray(current, sequence, index - 1)) { sequence[index] = 0; index++; } } for (int i = 0; i < 1000; i++) { System.out.println(sequence[i]); } } public static boolean inArray(int value, int[] array, int endIndex) { for (int i = 0; i < endIndex; i++) { if (array[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.1155.354−38.127
Source linesThe number of non-empty source lines.34+13.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.837−5.756

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

Score0.663

Feature contributions

FeatureValueContribution
(log-odds)
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 (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names.74.941+0.491
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.135−0.372
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.34−0.359
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.34−0.167
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.32.816+0.049

Intercept 0.07 + feature contributions = -1.796 (log-odds).
Score = sigmoid(-1.796) = 0.142.

Score0.765
Score25
Run 1

The code structure is mostly logical, with helper methods separated, but the main algorithm is difficult to follow due to unclear variable names like 'current' and 'count'. Nesting is moderate: a while loop, a for loop, and an if-else, which is acceptable but makes the algorithm harder to trace. Intent is ambiguous because the purpose of the sequence is not explained, and the logic inside the while loop is non-obvious. Code length is reasonable but can be improved. Action granularity is okay but some lines, like `if (!inArray(current, sequence, index - 1))`, combine a method call and condition. Reading flow is disrupted by the unusual handling of array growth and the hidden rule that sequence[index] is set twice in some iterations. The code lacks comments or descriptive names that would clarify why it builds the sequence this way.

Run 2

The code has a clear structure with a main method and a helper function, which helps organization. Nesting is moderate: one while loop and one for loop inside, plus a conditional. The intent of generating an inventory sequence is not explicitly stated, making it somewhat ambiguous. Variable names like 'sequence', 'index', 'current', and 'count' are reasonably clear, but the overall algorithm is not obvious. Code length is concise overall, but the main method is long and mixes multiple actions per line (e.g., array assignment and increment in same line). Action granularity is uneven; some steps are combined, others separated. Reading flow is somewhat natural but could be improved with comments or method extraction for counting and appending. The helper method 'inArray' is clear and single-purpose. Overall, the code is readable but not exceptionally so, due to unclear algorithm intent and slightly mixed granularity.

Run 3

The code has a clear overall structure with a main method and a helper method, but the intent is ambiguous. The variable names like 'sequence' and 'current' are too generic, making it hard to understand what the algorithm is trying to achieve. The while loop contains multiple actions and nested logic: counting occurrences, appending to the sequence, and conditionally appending another value. This results in messy action granularity and ambiguous control flow. The inArray check is called after the current value has already been placed, which further obscures the logic. Nesting is moderate — only one level of while, for, and if — but the sequence manipulation is tricky to follow. The code length is reasonable and not overly verbose. Reading flow is disrupted by unclear variable purpose and non-obvious algorithm behavior.

Run 1

Code Structure: Sequence generation, output, and a membership helper are logically organized, though generation could be extracted from main. Nesting: Moderate while/for/if nesting is manageable. Clarity of intent: Names generally communicate their roles, but the sequence rule, extra zero insertion, and exclusive endIndex boundary are unexplained. Repeated 1000 literals obscure the relationship to array capacity. Code length: Compact without substantial verbosity. Action granularity: Each statement performs one clear action. Reading flow: Initialization, generation, and printing follow naturally, but repeated index updates and index - 1 arguments require careful tracking. The conditional extra write also raises a potential array-boundary concern, making the generation logic harder to follow confidently.

Run 2

Code Structure: Generation, output, and membership checking are logically organized, though extracting generation from main would improve separation. Nesting: The while/for/if nesting is moderate and manageable. Clarity of intent: Variable names are reasonable, but the sequence rule, conditional zero insertion, and exclusive endIndex boundary are not explained. Repeated literal 1000 values obscure the shared size constraint. Code length: Compact overall, with little unnecessary code. Action granularity: Statements generally perform one action per line, making updates easy to track. Reading flow: Execution proceeds naturally from initialization to generation to output, but repeated index increments and index - 1 calculations require careful tracing, especially around array boundaries.

Run 3

Code Structure: Generation, output, and membership checking are logically organized, though main combines initialization and sequence construction. Nesting: Moderate while/for/if nesting remains manageable. Clarity of intent: Descriptive variable names help, but the sequence rule, conditional zero insertion, and exclusive endIndex boundary are not explained. Repeated literal 1000 and subtle index updates obscure boundaries. Code length: Compact overall, although counting and membership checks involve separate scans. Action granularity: Each statement performs a single action, with clear assignments and increments. Reading flow: Execution proceeds naturally from initialization through generation to output; the helper is straightforward. However, the extra index increment and write inside the conditional require careful tracking and may exceed array bounds, making the generation logic harder to follow confidently.