Sample
JetBrains/b35
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 51.7Δ 7.2 |
| Scalabrino | 0.56 | 0–1; higher is more readable | 39.8Δ 4.7 |
| Dorn | 0.568 | 0–1; higher is more readable | 61.9Δ 17.4 |
| Mi | 0.57 | 0–1; higher is more readable | 66.9Δ 22.5 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.6Δ 19.1 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 53.4Δ 8.9 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 1.7 |
| BTTF | 0.41 | 0–1; higher is more readable | 29.7Δ 14.8 |
| Human | 0.71 | 0–1; original rating | 44.5 |
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. | 618.594 | −20.414 |
| 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.948 | −5.922 |
| Source linesThe number of non-empty source lines. | 14 | +5.6 |
Intercept 8.87 + feature contributions = -11.865 (log-odds).
Score = sigmoid(-11.865) = 0.
| Score | 0.56 |
|---|
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.857 | +1.384 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| 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.153 | −0.543 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 12.855 | −0.23 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 14 | +0.1 |
Intercept 0.07 + feature contributions = 0.275 (log-odds).
Score = sigmoid(0.275) = 0.568.
| Score | 0.57 |
|---|
| Score | 11 |
|---|
Run 1
The code is generally clear and concise, with logical structure and flat nesting. Variable names like 'rows', 'i', 'j', and 'number' are adequate for a small program. The nested loops are straightforward. However, readability is slightly reduced by the terse, algorithmically dense formula 'number = number * (i - j) / (j + 1)' and the non-obvious string format for spacing. Action granularity is mostly one per line, and reading flow is natural. Minor improvements would include comments explaining the Pascal's triangle formula and more descriptive variable names (e.g., 'rowIndex', 'columnIndex').
Run 2
The code is structurally sound and concise, using nested loops to generate Pascal's Triangle efficiently. It has a clear intent, with flat nesting (two loops) and simple action granularity. The formula for calculating the next number is compact but may slightly obscure intent for readers unfamiliar with the combinatoric relation. Formatting is generally clean, though the printf format string is a bit cryptic. Overall, it is highly readable for experienced Java developers.
Run 3
The code is concise and reasonably structured, using nested loops to generate Pascal's Triangle. However, readability suffers because the intent is not explicit — a magic number (20) and a formula combining multiplication and division on one line require domain knowledge. Action granularity is moderate; some lines combine multiple operations. The formatting logic is compact but cryptic. Overall, the code is short and mostly clear but could benefit from variable names like row, col, and an extracted method for coefficient calculation to improve clarity.
Run 1
Code Structure: A single method logically groups row generation, indentation, value printing, and line breaks. Nesting: Two nested loops are appropriate for the triangle and easy to follow. Clarity of intent: The class name clearly identifies the purpose, but generic variable names and the unexplained coefficient formula and spacing arithmetic require some interpretation. Code length: Compact without unnecessary logic. Action granularity: Each statement performs one main action on its own line. Reading flow: Execution proceeds naturally from setup through each row and its values, though inconsistent operator spacing and dense format-string construction slightly reduce readability.
Run 2
Code Structure: Logically organized, with initialization followed by row and element loops. Nesting: Two nested loops are appropriate for generating a triangle and remain easy to follow. Clarity of intent: The class name clearly identifies the purpose, but the coefficient recurrence and spacing formula require some interpretation; more descriptive variable names would help. Code length: Concise without unnecessary code. Action granularity: Each statement performs one main action, although formatting expressions combine several calculations. Reading flow: Execution follows a natural sequence of indentation, number generation, and line breaks. Inconsistent spacing around operators and commas slightly reduces readability.
Run 3
Code Structure: Logically organized around generating and printing each triangle row. Nesting: Two nested loops are appropriate for the task and easy to follow. Clarity of intent: The class name conveys the purpose, but generic variable names and the unexplained coefficient recurrence and spacing arithmetic require some interpretation. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs a distinct action; loop headers conventionally combine initialization, condition, and increment. Reading flow: Initialization, indentation, coefficient output, and newline follow a natural sequence. Inconsistent operator spacing and hard-coded formatting widths slightly reduce readability.