Sample
JetBrains/i58
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 48.3Δ 21.2 |
| Scalabrino | 0.883 | 0–1; higher is more readable | 89.0Δ 61.9 |
| Dorn | 0.429 | 0–1; higher is more readable | 33.1Δ 5.9 |
| Mi | 0.535 | 0–1; higher is more readable | 60.2Δ 33.1 |
| LLOC | 13 | Logical lines; fewer is more readable | 52.1Δ 25.0 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 69.9Δ 42.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 19.1 |
| BTTF | 0.307 | 0–1; higher is more readable | 11.0Δ 16.1 |
| Human | 0.58 | 0–1; original rating | 27.1 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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.
| Score | 0.883 |
|---|
Feature contributions
| Feature | Value | Contribution (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.
| Score | 0.535 |
|---|
| Score | 13 |
|---|
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.