Sample

JetBrains/i3

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.59
Lines16

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
56.8Δ 27.1
Scalabrino0.8420–1; higher is more readable
81.4Δ 51.7
Dorn0.3790–1; higher is more readable
28.0Δ 1.7
Mi0.4360–1; higher is more readable
42.4Δ 12.7
LLOC10Logical lines; fewer is more readable
72.9Δ 43.2
DeepSeek V4 Pro100–20; mean of three runs
8.9Δ 20.8
GPT-6.1 Sol160–20; mean of three runs
26.7Δ 3.0
BTTF0.3650–1; higher is more readable
22.9Δ 6.8
Human0.590–1; original rating
29.7

Views

Source code

public class LeylandNumbers { public static void main(String[] args) { long max = 100000000000L; for (long x = 2; x * x < max; x++) { for (long y = 2; y <= Math.pow(max, 1.0 / (x - 1)); y++) { long n = (long) (Math.pow(x, y) + Math.pow(y, x)); if (n >= max) { break; } System.out.println(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.618.594−20.414
Source linesThe number of non-empty source lines.16+6.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.592−5.388

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

Score0.842

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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+0.531
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.16+0.47
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.141−0.429
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.14.933−0.201
Indentation frequencyHow rapidly indentation changes from line to line.16−0.184
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.16+0.054

Intercept 0.07 + feature contributions = -0.494 (log-odds).
Score = sigmoid(-0.494) = 0.379.

Score0.436
Score10
Run 1

The code is short and readable at a glance, but it lacks structure and clarity. Variables 'x' and 'y' are generic, the condition in the outer loop (x * x < max) is not self-explanatory, and the inner loop bound using Math.pow is unclear and potentially lossy. The action granularity is acceptable, and nesting depth is minimal, but the algorithm's intent is obscured. There is no handling of duplicates — Leyland numbers may repeat — and the use of floating-point operations for integer calculation introduces precision issues. The code compiles and is concise, but not robust or self-documenting.

Run 2

The code is short and logically structured, but its intent is ambiguous due to poor naming and unclear boundary logic. The nesting is acceptable, with two loops and one conditional. However, the variable names (max, x, y, n) do not convey meaning, and the use of Math.pow for integer arithmetic is misleading and inefficient. The loop condition y <= Math.pow(max, 1.0 / (x - 1)) is non-obvious and hard to understand without domain knowledge. Action granularity is reasonable, with one main operation per line. Reading flow is disrupted by the unclear stopping condition and lack of comments or explanation. Overall, the code is concise but sacrifices clarity.

Run 3

The code is short and reasonably structured, with two clear loops and a simple output. However, readability suffers due to unclear intent: the class name and variable names (x, y, max, n) are generic and do not explain that Leyland numbers are being generated. The loop conditions and the Math.pow bound calculation are nontrivial and require domain knowledge to understand; there is no comment explaining the mathematical logic. Nesting is shallow, and action granularity is mostly one action per line. Reading flow is moderate, as the outer loop condition (x * x < max) is a rough heuristic, while the inner loop bound based on Math.pow is hard to parse. Overall, the code is concise but not self-explanatory, making it moderately difficult to read without prior context.

Run 1

Code Structure: The class and main method organize the calculation logically, though a separate generation method could improve separation of concerns. Nesting: Two loops and one conditional create moderate, manageable nesting. Clarity of intent: The class name identifies the purpose, but the mathematical loop bounds and exponent calculation lack explanation; max and n could have more descriptive names. Code length: Compact without unnecessary statements. Action granularity: Each statement performs a distinct action, with conventional loop controls. Reading flow: Initialization, iteration, calculation, limit checking, and output follow a natural sequence, although understanding the bounds requires mathematical inference.

Run 2

Code Structure: A single, logically organized method computes and prints Leyland numbers. Nesting: Two nested loops and an if statement create moderate nesting, but the short body remains easy to follow. Clarity of intent: The class name and formula communicate the purpose, though the unexplained loop bounds and abbreviated variables require mathematical interpretation. Code length: Compact without unnecessary statements. Action granularity: Each statement performs a distinct action, with calculation, limit checking, and output separated. Reading flow: Consistent indentation and a natural compute-check-print sequence support readability. Named constants and brief explanations of the bounds would improve clarity.

Run 3

Code Structure: A single main method logically groups initialization, iteration, calculation, filtering, and output. Nesting: Two loops and an if statement create moderate, manageable nesting. Clarity of intent: The class name and formula suggest Leyland number generation, but terse variable names, an unexplained maximum, and especially the mathematical inner-loop bound require interpretation. Code length: Compact without obvious redundancy or unnecessary boilerplate. Action granularity: Statements generally perform one action per line, although the calculation combines exponentiation, addition, and casting. Reading flow: Consistent indentation and a straightforward calculate-check-print sequence make execution easy to follow; named constants or a brief explanation of the bounds would improve readability.