Sample
JetBrains/i47
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.023 | 0–1; higher is more readable | 94.1Δ 4.7 |
| Scalabrino | 0.796 | 0–1; higher is more readable | 71.2Δ 27.5 |
| Dorn | 0.627 | 0–1; higher is more readable | 74.6Δ 24.2 |
| Mi | 0.487 | 0–1; higher is more readable | 48.3Δ 50.4 |
| LLOC | 4 | Logical lines; fewer is more readable | 92.8Δ 5.9 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 78.8Δ 19.9 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 21.2 |
| BTTF | 0.699 | 0–1; higher is more readable | 99.2Δ 0.4 |
| Human | 1 | 0–1; original rating | 98.7 |
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. | 285 | −9.405 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.531 | −6.796 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = -3.731 (log-odds).
Score = sigmoid(-3.731) = 0.023.
| Score | 0.796 |
|---|
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. | 61 | +1.082 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 9 | +0.718 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 7.839 | −0.3 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 9 | +0.214 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.1 | −0.033 |
Intercept 0.07 + feature contributions = 0.52 (log-odds).
Score = sigmoid(0.52) = 0.627.
| Score | 0.487 |
|---|
| Score | 4 |
|---|
Run 1
The code is concise, well-structured, and easy to read. It clearly shows intent—print pi to 1000 decimal places. Nesting is flat, and actions are separated logically. However, it lacks comments explaining the limitation: `Math.PI` is a double, so the output is not actually accurate to 1000 places beyond the ~15 significant digits of double precision. Raising the scale only pads zeros. A brief note or using a constant for the scale would improve clarity. Still, overall readability is strong.
Run 2
The code is clean, concise, and clear. It has a simple structure with a single class and method, minimal nesting, and one action per line. The intent to print Pi to 1000 decimal places is immediately obvious, and the reading flow is top-down and natural. The main issue is that Math.PI is a double with limited precision, so the code does not actually achieve its stated goal of 1000 accurate decimal places. Despite this functional flaw, readability is excellent.
Run 3
The code is concise, well-structured, and clear in intent. It uses standard Java libraries, follows a logical top-to-bottom flow, and avoids unnecessary nesting or complexity. Each statement performs a single action, maintaining good granularity and readability. Minor deductions: hardcoded scale value could be a named constant, and BigDecimal.ROUND_HALF_UP is deprecated in newer Java versions.
Run 1
Code Structure: Well organized, with a single class and a short main method. Nesting: Minimal, limited to the required class and method blocks. Clarity of intent: The class name and variable clearly communicate the goal of printing pi to 1,000 decimal places, but scaling Math.PI does not provide 1,000 accurate digits, making the apparent intent misleading. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one clear action. Reading flow: Natural progression from initialization to scaling to output. The deprecated rounding constant slightly reduces modern readability.
Run 2
Code Structure: A single class and short main method provide straightforward organization. Nesting: Only the necessary class and method scopes are present. Clarity of intent: Naming and operations clearly indicate printing pi to 1,000 decimal places, although scaling Math.PI does not produce 1,000 accurate digits, making the class name misleading. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one clear action. Reading flow: Import, initialization, scaling, and output follow a natural sequence. The deprecated BigDecimal.ROUND_HALF_UP constant slightly reduces modern Java clarity compared with RoundingMode.HALF_UP.
Run 3
Code Structure: A straightforward class with a single main method and logically ordered statements. Nesting: Minimal, consisting only of the class and method scopes. Clarity of intent: Names and operations clearly suggest printing pi to 1,000 decimal places, although scaling Math.PI does not provide 1,000 digits of precision, making the class name misleading. Code length: Concise with no unnecessary logic. Action granularity: Each statement performs one clear action. Reading flow: Natural progression from initialization to scaling to output. The deprecated rounding constant slightly reduces modern readability.