Sample
JetBrains/e47
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 4.2Δ 43.2 |
| Scalabrino | 0.41 | 0–1; higher is more readable | 23.7Δ 23.7 |
| Dorn | 0.028 | 0–1; higher is more readable | 2.5Δ 44.9 |
| Mi | 0.015 | 0–1; higher is more readable | 4.2Δ 43.2 |
| LLOC | 24 | Logical lines; fewer is more readable | 11.4Δ 36.0 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 35.2Δ 12.3 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 26.7Δ 20.8 |
| BTTF | 0.337 | 0–1; higher is more readable | 17.8Δ 29.7 |
| Human | 0.72 | 0–1; original rating | 47.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. | 1698.17 | −56.04 |
| Source linesThe number of non-empty source lines. | 36 | +14.4 |
| 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.7 | −7.051 |
Intercept 8.87 + feature contributions = -39.82 (log-odds).
Score = sigmoid(-39.82) = 0.
| Score | 0.41 |
|---|
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. | 119.972 | −1.416 |
| 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 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 36 | −0.405 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 36 | −0.238 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.11 | −0.13 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 34.81 | +0.077 |
Intercept 0.07 + feature contributions = -3.55 (log-odds).
Score = sigmoid(-3.55) = 0.028.
| Score | 0.015 |
|---|
| Score | 24 |
|---|
Run 1
The code structure is logical, separating pi computation from arctangent calculation. Nesting is shallow and action granularity is generally one operation per line, aiding readability. However, clarity of intent suffers: the odd/even term alternation in the arctan method uses a magic-number pattern that could be clearer, and the method signatures use SCALE as a parameter name in all caps, which is unconventional. Some lines, like the pi calculation, combine multiple operations, slightly reducing readability. The code is concise and follows a natural reading flow, but ambiguous variable names and minor style inconsistencies prevent a higher score.
Run 2
The code is reasonably readable with a clear structure: separate methods for computing pi and arctangent, and a simple main method. Naming is mostly clear, and the mathematical intent is understandable. However, there are some issues: the parameter names SCALE are uppercase, which violates Java conventions and reduces clarity. The arctan method uses a do-while loop with a condition that may not terminate for all inputs, and the loop logic is somewhat dense. Some variables are declared without initialization and then assigned on separate lines, reducing readability. There are also magic numbers (5, 239, 4) without explanation. The code is concise and not deeply nested, but the mathematical reasoning behind the pi formula is not commented, making the purpose less obvious. Overall, the structure is good, but conventions and clarity of intent could be improved.
Run 3
The code is generally readable, with clear method separation and intent. The main logic is understandable, and the arctan computation is logically structured. However, readability is reduced by a few issues: the SCALE parameter is named as a constant but used as a mutable parameter; variable declarations are grouped instead of declared close to usage; the loop termination relies on term reaching zero, which is not immediately obvious; and some lines do multiple operations. Nesting is flat, which helps, but the lack of comments explaining the Machin-like formula (π = 16 arctan(1/5) - 4 arctan(1/239)) makes the purpose less clear. Overall, it is readable but could be improved with better naming, comments, and slightly more structured variable handling.
Run 1
Code Structure: Clearly separates printing, pi computation, and arctangent calculation into focused methods. Nesting: Shallow, with only a conditional inside a loop. Clarity of intent: Method names communicate purpose, but abbreviated variables, uppercase SCALE parameters, and unexplained mathematical formulas make the numerical algorithm less accessible. Code length: Compact without substantial redundancy, although the chained pi expression is visually dense. Action granularity: Most lines perform one action; the chained arithmetic expression and grouped variable declaration slightly weaken this. Reading flow: Execution progresses naturally from entry point to helper methods, and the series calculation follows a consistent sequence. Braces around conditional branches and brief comments explaining the formula and termination condition would improve readability.
Run 2
Code Structure: Well separated into printing, computing pi, and evaluating arctangent. Nesting: Shallow, with only a conditional inside one loop. Clarity of intent: Method names convey purpose, but abbreviated variables and the unexplained mathematical formula and series require domain knowledge; uppercase SCALE is unconventional for a parameter. Code length: Compact without substantial redundancy. Action granularity: Most lines perform one action, though the chained pi calculation and grouped variable declarations reduce scanability. Reading flow: Natural progression from entry point to mathematical helpers, with consistent indentation; missing conditional braces and explanatory comments slightly hinder readability.
Run 3
Code Structure: Well-organized methods separate printing, computing pi, and evaluating arctangent. Nesting: Shallow, with only a conditional inside a loop. Clarity of intent: Method names communicate purpose, but abbreviated variables and unexplained mathematical constants obscure the algorithm; SCALE also resembles a constant despite being a parameter. Code length: Concise without substantial redundancy, though the long chained expression is harder to scan. Action granularity: Most lines perform one action, but grouped variable declarations and chained arithmetic reduce clarity. Reading flow: Execution follows a natural sequence from main to helper methods, although missing braces around conditional branches and a lack of mathematical context slightly hinder readability.