Sample

JetBrains/i21

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.21
Lines37

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
17.8Δ 16.9
Scalabrino0.7030–1; higher is more readable
55.9Δ 55.1
Dorn0.5480–1; higher is more readable
58.5Δ 57.6
Mi0.6280–1; higher is more readable
77.1Δ 76.3
LLOC23Logical lines; fewer is more readable
14.8Δ 14.0
DeepSeek V4 Pro12.330–20; mean of three runs
19.1Δ 18.2
GPT-6.1 Sol160–20; mean of three runs
26.7Δ 25.8
BTTF0.3480–1; higher is more readable
19.5Δ 18.6
Human0.210–1; original rating
0.8

Views

Source code

import java.math.BigInteger; public class JacobiSymbol { public static int jacobiSymbol(int a, int n) { int t = 1; while (a != 0) { while (a % 2 == 0) { a /= 2; int r = n % 8; if (r == 3 || r == 5) { t = -t; } } int temp = a; a = n; n = temp; if (a % 4 == n % 4 && n % 4 == 3) { t = -t; } a %= n; } if (n == 1) { return t; } else { return 0; } } public static void main(String[] args) { for (int i = 0; i < args.length; i += 2) { int a = Integer.parseInt(args[i]); int n = Integer.parseInt(args[i + 1]); System.out.println(jacobiSymbol(a, n)); } } }

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.1211.824−39.99
Source linesThe number of non-empty source lines.37+14.8
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.645−5.468

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

Score0.703

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.51.973+1.464
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.37+0.543
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.145−0.468
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.37−0.428
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.37−0.274
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.35.83+0.091

Intercept 0.07 + feature contributions = 0.193 (log-odds).
Score = sigmoid(0.193) = 0.548.

Score0.628
Score23
Run 1

The code implements the Jacobi symbol algorithm but suffers from readability issues. The structure is logical but lacks helper functions or comments explaining the mathematical steps. Variable names like 'a', 'n', 't' are conventional in number theory but unclear without context. The algorithm uses nested loops and modulus operations with magic numbers (8, 4, 2) that obscure the mathematical logic. The swap operation between 'a' and 'n' uses a temporary variable but could be clearer. The main method's argument parsing is straightforward but lacks input validation. The reading flow is disrupted by the dense mathematical operations packed into single lines. While the code is concise and each line performs one main action, the lack of comments and clear naming makes it difficult to understand the Jacobi symbol calculation process.

Run 2

The code follows a logical mathematical algorithm and has a relatively flat structure, but it suffers from unclear variable naming and ambiguous intent. The parameters 'a' and 'n' and local variables 'r' and 't' are not self-documenting; 't' especially obscures the sign-tracking purpose. The core loop mutates variables heavily (swapping a, n, then using a %= n), which makes the state transitions difficult to follow. Action granularity is mostly one-per-line, but some lines pack multiple concerns (e.g., condition with two checks). The reading flow is hampered by reliance on mathematical knowledge of Jacobi symbols without comments or helper methods to explain steps like the quadratic reciprocity adjustment. Overall, understandable only if the reader already knows the algorithm.

Run 3

The code is compact and implements Jacobi symbol calculation, but it has several readability issues. The algorithm lacks explanatory comments, making the intent and mathematics unclear. Variable names like 'a', 'n', 't', and 'r' are terse and don't convey meaning. The main loop has multiple operations per line, and the deep nesting of while loops reduces clarity. The swapping logic and modulus operations are condensed, which hurts the reading flow. Although the structure is logically organized, the lack of spacing and descriptive identifiers makes it harder to follow for someone unfamiliar with the algorithm.

Run 1

Code Structure: The calculation and command-line entry point are cleanly separated into methods. Nesting: Two nested loops with a conditional create moderate but manageable depth. Clarity of intent: Class and method names identify the purpose, but terse variables and unexplained modular arithmetic obscure the mathematical steps; the unused BigInteger import adds distraction. Code length: The implementation is compact without excessive boilerplate, although the final else is unnecessary after a return. Action granularity: Each statement performs one clear action, including the explicit swap sequence. Reading flow: Consistent indentation and sequential processing make the code easy to follow, but brief comments explaining factor removal and quadratic reciprocity would improve understanding.

Run 2

Code Structure: The calculation and command-line entry point are logically separated into methods. Nesting: Two nested loops and an inner conditional add moderate complexity, but indentation keeps them readable. Clarity of intent: Class and method names clearly identify the purpose, while terse variables and unexplained number-theoretic rules make the algorithm harder to understand without domain knowledge. Code length: The implementation is concise, though the unused BigInteger import and final else are unnecessary. Action granularity: Each statement performs a single action, and the explicit swap is easy to follow. Reading flow: Execution proceeds naturally from factor removal through swapping and reduction to the result; main straightforwardly processes argument pairs. Missing documentation of input assumptions slightly weakens clarity.

Run 3

Code Structure: The calculation and command-line processing are cleanly separated into two methods; the unused BigInteger import adds minor clutter. Nesting: The nested loops and conditionals are moderate and manageable. Clarity of intent: Class and method names clearly identify the purpose, but terse variables and unexplained number-theoretic rules make the algorithm harder to understand without domain knowledge. Code length: The implementation is compact without being compressed, although the final else could be omitted after the return. Action granularity: Each line generally performs one action, and the explicit swap is easy to follow. Reading flow: Consistent indentation and a sequential algorithm support natural reading, though comments explaining sign changes and the expected input constraints would improve comprehension.