Sample

JetBrains/i58

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.58
Lines19

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
48.3Δ 21.2
Scalabrino0.8830–1; higher is more readable
89.0Δ 61.9
Dorn0.4290–1; higher is more readable
33.1Δ 5.9
Mi0.5350–1; higher is more readable
60.2Δ 33.1
LLOC13Logical lines; fewer is more readable
52.1Δ 25.0
DeepSeek V4 Pro170–20; mean of three runs
69.9Δ 42.8
GPT-6.1 Sol170–20; mean of three runs
46.2Δ 19.1
BTTF0.3070–1; higher is more readable
11.0Δ 16.1
Human0.580–1; original rating
27.1

Views

Source code

public class CatalanNumbers { public static void main(String[] args) { for (int n = 0; n <= 99; n++) { long result = binomial(2*n, n)/(n+1); System.out.println(result); } } private static long binomial(int n, int k) { if (k > n-k) { k = n-k; } long b = 1; for (int i = 1, m = n; i <= k; i++, m--) { b = b*m/i; } return b; } }

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.707.016−23.332
Source linesThe number of non-empty source lines.19+7.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.562−5.343

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

Score0.883

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.54+1.378
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.14−0.416
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.19+0.364
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.17.818−0.161
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.19−0.015

Intercept 0.07 + feature contributions = -0.287 (log-odds).
Score = sigmoid(-0.287) = 0.429.

Score0.535
Score13
Run 1

The code is well-structured with clear separation of concerns between the main loop and the binomial calculation. Nesting is minimal, with only one if-statement and two loops, keeping the reading flow natural. Intent is evident: compute and print Catalan numbers. The binomial method is concise and uses a symmetry optimization. Action granularity is mostly one action per line, although the loop header packs multiple variables into one line, slightly reducing readability. Variable names are short but conventional for mathematical code. Overall, the code is easy to follow and maintain.

Run 2

The code is clear and well-structured, with a simple main loop and a helper method for the binomial coefficient. Nesting is minimal — no deep indentation. Intent is evident: compute Catalan numbers for n=0..99. The method uses a standard optimization (symmetry and iterative multiplication/division) making it concise, though the division inside the loop may obscure exact-integer reasoning slightly. Each line performs one logical action, and reading flow is natural top-to-bottom. Minor readability improvement could include a comment explaining the binomial optimization, but overall the code is highly readable.

Run 3

The code is well-structured, with a clear separation between the main logic and the binomial coefficient helper method. It is concise and avoids unnecessary complexity. Nesting is minimal, with only a simple if-statement and a for-loop. The intent is clear: compute Catalan numbers for n=0 to 99. Action granularity is appropriate—most lines perform a single logical step, though the for-loop header packs initialization, condition, and multiple updates. The reading flow is natural: main loop, calculation, print, then helper method. One minor issue is integer overflow: 'long' will overflow for larger n, but this doesn't affect readability. The short variable names (n, k, b, i, m) are conventional in this mathematical context. Overall, highly readable.

Run 1

Code Structure: Well organized into a main method and a focused binomial helper. Nesting: Shallow loops and a single conditional make control flow easy to follow. Clarity of intent: The class name and formula clearly indicate Catalan number generation, though terse variables such as b and m and the unexplained upper bound of 99 reduce clarity. Code length: Compact without unnecessary repetition. Action granularity: Most lines perform one action, but the loop initializes and updates two variables, slightly increasing cognitive load. Reading flow: Execution proceeds naturally from calculation to output, and the helper is straightforward; consistent spacing around arithmetic operators would improve readability.

Run 2

Code Structure: The main method and separate binomial helper provide clear, logical organization. Nesting: Control flow is shallow and easy to follow. Clarity of intent: The class name and Catalan formula communicate the purpose, but terse variables such as b and m, the unexplained limit of 99, and absent comments reduce clarity. Code length: The implementation is concise without unnecessary repetition. Action granularity: Most lines perform one action, although the loop initializes and updates multiple variables. Reading flow: Execution proceeds naturally from iteration to calculation to output; inconsistent operator spacing slightly impedes scanning. The long arithmetic also overflows for larger inputs, a correctness concern rather than primarily a readability issue.

Run 3

Code Structure: Clean separation between generating Catalan numbers and calculating binomial coefficients. Nesting: Shallow loops and a simple conditional make control flow easy to follow. Clarity of intent: The class and method names communicate purpose, but terse variables and the unexplained symmetry optimization require mathematical familiarity. Code length: Concise without unnecessary scaffolding. Action granularity: Most lines perform one action, although the loop updates two variables and arithmetic expressions combine several operations. Reading flow: Natural top-to-bottom organization, slightly weakened by inconsistent operator spacing. A named upper limit and brief explanation of the formula would improve readability. The long type also overflows well before the loop finishes, an undocumented limitation.