Sample
JetBrains/b47
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.14 | 0–1; higher is more readable | 98.3Δ 20.8 |
| Scalabrino | 1 | 0–1; higher is more readable | 99.2Δ 21.6 |
| Dorn | 0.059 | 0–1; higher is more readable | 4.2Δ 73.3 |
| Mi | 0.081 | 0–1; higher is more readable | 9.3Δ 68.2 |
| LLOC | 3 | Logical lines; fewer is more readable | 98.3Δ 20.8 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 28.0Δ 49.6 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 0.0 |
| BTTF | 0.675 | 0–1; higher is more readable | 98.3Δ 20.8 |
| Human | 0.9 | 0–1; original rating | 77.5 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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.862 | −7.294 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 199.705 | −6.59 |
| Source linesThe number of non-empty source lines. | 8 | +3.2 |
Intercept 8.87 + feature contributions = -1.814 (log-odds).
Score = sigmoid(-1.814) = 0.14.
| Score | 1 |
|---|
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. | 147 | −2.561 |
| 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. | 8 | +0.753 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 6.696 | −0.316 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.305 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 8 | +0.237 |
Intercept 0.07 + feature contributions = -2.777 (log-odds).
Score = sigmoid(-2.777) = 0.059.
| Score | 0.081 |
|---|
| Score | 3 |
|---|
Run 1
The code is simple and readable, using clear class and variable names, but it fails to achieve its stated goal of printing Pi to 1000 digits. It only provides about 100 digits, which makes the intent misleading. The structure is logical, nesting is flat, and actions are concise, but the code length is unnecessarily short for the problem and lacks a loop or external data source. The reading flow is natural, but the mismatch between the class name and the actual output reduces clarity of intent. Overall, it is clean but incomplete code.
Run 2
The code is highly readable due to its simple, flat structure. It has a clear intent — printing Pi to a limited number of digits — with a single responsibility per line. There is no unnecessary nesting or complexity, and the code length is concise. The only minor issue is that the variable name 'pi' is lowercase, which slightly deviates from Java naming conventions for constants (should be PI), but this does not significantly impact readability.
Run 3
The code is straightforward and easy to follow, but it fails to deliver what its name promises: 1000 digits of pi. It only prints about 100 digits, which makes the intent misleading. Structurally, it is simple and flat—single class, single method, clear statements—but it is also overly minimal and does not address the stated problem. The variable name is clear, and the output action is concise. However, the discrepancy between the class name and the actual functionality harms clarity of intent. The code is readable in terms of syntax and flow, but functionally incomplete, which limits its overall readability score.
Run 1
Code Structure: Simple, logically organized class with a single main method. Nesting: Minimal and easy to follow. Clarity of intent: Creating and printing pi is clear, but the class name misleadingly promises 1000 digits while the literal supplies far fewer. Code length: Concise overall, though the long numeric literal is cumbersome to visually inspect. Action granularity: Each statement performs one clear action. Reading flow: Natural progression from import to class, initialization, and output, supported by consistent indentation.
Run 2
Code Structure: Clean organization with one import, one class, and a simple main method. Nesting: Minimal, limited to the class and method. Clarity of intent: Creating and printing a precise decimal representation of pi is clear, but the class name misleadingly promises 1000 digits while the literal contains only 100 decimal places. Code length: Concise, although the long numeric literal is cumbersome to inspect. Action granularity: Each statement performs one clear action on its own line. Reading flow: Natural progression from importing BigDecimal to constructing pi and printing it, with consistent indentation.
Run 3
Code Structure: Straightforward import, class, and main method provide logical organization. Nesting: Minimal, limited to the class and method. Clarity of intent: Creating and printing a precise decimal is clear, but the class name implies 1,000 digits while the literal contains only 100 decimal places. Code length: Concise, although the long numeric literal is visually cumbersome. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom progression with consistent indentation and no distracting complexity.