Sample
JetBrains/i35
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 52.5Δ 2.5 |
| Scalabrino | 0.559 | 0–1; higher is more readable | 39.0Δ 16.1 |
| Dorn | 0.446 | 0–1; higher is more readable | 34.7Δ 20.3 |
| Mi | 0.562 | 0–1; higher is more readable | 65.3Δ 10.2 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.6Δ 8.5 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 49.6Δ 5.5 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 34.3Δ 20.8 |
| BTTF | 0.42 | 0–1; higher is more readable | 31.4Δ 23.7 |
| Human | 0.76 | 0–1; original rating | 55.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. | 624.02 | −20.593 |
| Source linesThe number of non-empty source lines. | 15 | +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.962 | −5.944 |
Intercept 8.87 + feature contributions = -11.666 (log-odds).
Score = sigmoid(-11.666) = 0.
| Score | 0.559 |
|---|
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. | 53.933 | +1.381 |
| 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.151 | −0.526 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 15 | +0.505 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 13.836 | −0.216 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 15 | +0.077 |
Intercept 0.07 + feature contributions = -0.216 (log-odds).
Score = sigmoid(-0.216) = 0.446.
| Score | 0.562 |
|---|
| Score | 11 |
|---|
Run 1
The code is compact and logically organized, using a well-known binomial coefficient formula to generate Pascal's Triangle. It has only two levels of nesting, making it relatively flat. The intent is clear despite minimal comments, as variable names like 'rows', 'i', 'j', and 'number' are standard. The code length is concise, achieving the task in a few lines without extra boilerplate. Action granularity is mostly one action per line, except for the multiplication/division update, which is still readable. Reading flow is natural: setup, row loop, formatting, column loop, newline. Minor readability improvements could include a comment explaining the formula and spacing adjustments for clarity.
Run 2
The code is concise and follows a clear, standard algorithm for generating Pascal's Triangle. It uses two nested loops with a straightforward formula for binomial coefficients, and each iteration performs one logical action (print spacing, print number, update number). Formatting is mostly consistent, and the use of `System.out.format` keeps alignment clean. However, readability is slightly reduced by the compact loop declarations on single lines ('for(int i...){'), the lack of explanatory comments, and the absence of variable names like `row` and `col` instead of `i` and `j`. The magic value 'rows = 20' could be extracted as a named constant. The indentation is uneven in places (e.g., method opening brace alignment), which slightly disrupts natural reading flow. Overall, the code is readable for a developer familiar with combinatorial logic, but small improvements in naming, formatting, and comments would enhance clarity.
Run 3
The code is relatively concise and uses a clever formula to generate Pascal's Triangle. However, readability suffers due to inconsistent formatting, lack of explanatory comments for the nontrivial math, and slightly unclear action granularity in the formatting loop. The code structure is simple but could benefit from a dedicated method. Nesting is shallow, which is good, but the intent of the number-update line is ambiguous without context. Overall, it's understandable for an experienced programmer but not immediately obvious to a novice.
Run 1
Code Structure: The class and main method logically organize triangle generation and output. Nesting: Two nested loops are appropriate for the task and remain easy to follow. Clarity of intent: The class name identifies the purpose, but generic variables and the unexplained coefficient formula and spacing constants require interpretation. Code length: The implementation is concise without unnecessary code. Action granularity: Each statement performs a focused action, although formatting expressions combine several calculations. Reading flow: Execution follows a natural row-by-row sequence, but inconsistent indentation and tightly packed operators reduce readability.
Run 2
Code Structure: The class and main method logically organize triangle generation and output. Nesting: Two nested loops are appropriate for rows and columns, with manageable depth. Clarity of intent: The class name communicates the purpose, but generic variable names and the unexplained coefficient formula and spacing arithmetic require interpretation. Code length: The implementation is concise without unnecessary code. Action granularity: Each statement performs a single primary action, making execution easy to follow. Reading flow: Initialization, indentation, number printing, coefficient updates, and line breaks follow a natural sequence. Inconsistent indentation and tight operator spacing slightly reduce readability.
Run 3
Code Structure: Logically organized into row iteration, indentation, value generation, and line termination. Nesting: Two nested loops are appropriate for Pascal's triangle and remain easy to follow. Clarity of intent: The class name establishes the purpose, but generic variable names and the unexplained coefficient recurrence and spacing formula require interpretation. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs a distinct action on its own line. Reading flow: Execution follows a natural top-to-bottom printing sequence, although inconsistent indentation and tight operator spacing slightly reduce readability.