Sample
JetBrains/i37
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.006 | 0–1; higher is more readable | 83.1Δ 2.1 |
| Scalabrino | 1 | 0–1; higher is more readable | 98.3Δ 17.4 |
| Dorn | 0.047 | 0–1; higher is more readable | 3.4Δ 77.5 |
| Mi | 0.025 | 0–1; higher is more readable | 6.8Δ 74.2 |
| LLOC | 4 | Logical lines; fewer is more readable | 92.8Δ 11.9 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 62.3Δ 18.6 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 3.4 |
| BTTF | 0.584 | 0–1; higher is more readable | 87.3Δ 6.4 |
| Human | 0.9 | 0–1; original rating | 80.9 |
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. | 330.685 | −10.913 |
| 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.988 | −7.482 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
Intercept 8.87 + feature contributions = -5.125 (log-odds).
Score = sigmoid(-5.125) = 0.006.
| 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. | 149 | −2.646 |
| 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. | 11 | +0.647 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 11 | −0.357 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.873 | −0.272 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.079 | +0.174 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 11 | +0.168 |
Intercept 0.07 + feature contributions = -3.019 (log-odds).
Score = sigmoid(-3.019) = 0.047.
| Score | 0.025 |
|---|
| Score | 4 |
|---|
Run 1
The code is generally readable and well-structured. It has a clear purpose—computing tau from a hardcoded pi value—and follows a straightforward, logical order. The structure is simple: one class, one method, and a few sequential statements. There is no nesting, and each line mostly performs a single action, which helps readability. Variable names are meaningful (pi, tau), and the intent is clear. However, the code could be improved by declaring constants instead of embedding a 100+ digit string directly in main, and by avoiding deprecated BigDecimal.ROUND_HALF_UP in favor of RoundingMode. The extremely long BigDecimal literal reduces readability slightly due to horizontal scrolling. Overall, it is concise and easy to follow, but minor refactoring and modernizing APIs would make it cleaner.
Run 2
The code is highly readable due to its clear structure and intent. It imports only what is needed, defines a single class with a single method, and uses descriptive variable names like 'pi' and 'tau'. The action granularity is good: one operation per line (creating pi, computing tau, printing). Nesting is minimal. The main weakness is the extremely long string literal for pi, which hurts readability by requiring horizontal scrolling, though it is necessary for the precision being demonstrated. Overall, the logic is straightforward and easy to follow.
Run 3
The code is concise and clearly structured. The single class and method are logically organized, with no unnecessary nesting. The intent is straightforward: compute tau from a high-precision pi constant and print it to 1000 decimal places. Action granularity is well-maintained, with each statement on its own line. The reading flow is natural—declaration, multiplication, output. Minor deductions include a slightly long variable initialization for pi, but this is justified by the need for precision. The use of BigDecimal.ROUND_HALF_UP is deprecated in newer Java versions, but the code remains readable.
Run 1
Code Structure: Imports, class, and main method are logically organized. Nesting: Only the necessary class and method nesting is present. Clarity of intent: Descriptive pi and tau names clearly convey calculating and printing twice pi, though the unexplained scale of 1000 obscures the formatting choice and exceeds the supplied precision. Code length: Concise overall, but the long numeric literal is cumbersome to scan. Action granularity: Each statement performs one primary action; combining rounding and printing remains understandable. Reading flow: The sequence naturally progresses from defining pi to calculating tau and displaying it. The deprecated BigDecimal.ROUND_HALF_UP constant slightly reduces modern idiomatic clarity.
Run 2
Code Structure: Imports, class, and main method are logically organized. Nesting: Minimal, with only the required class and method scopes. Clarity of intent: Descriptive pi and tau variables clearly communicate the calculation, though setting 1000 decimal places from a much shorter pi value may misleadingly suggest greater precision. Code length: Concise overall, but the long numeric literal is visually cumbersome. Action granularity: Each statement performs one primary action; rounding within the print statement remains easy to follow. Reading flow: Natural progression from defining pi to calculating and printing tau. The deprecated BigDecimal.ROUND_HALF_UP constant slightly reduces modern API clarity.
Run 3
Code Structure: Imports, class, and main method are logically organized. Nesting: Only the necessary class and method nesting is present. Clarity of intent: Descriptive pi and tau variables clearly convey the calculation, though printing 1,000 decimal places from a roughly 100-digit input may misleadingly suggest greater precision. Code length: Concise overall, but the long pi literal slightly reduces readability. Action granularity: Each statement performs one clear operation; scaling within the print statement is simple enough to follow. Reading flow: The sequence naturally progresses from defining pi to calculating and printing tau. The deprecated BigDecimal.ROUND_HALF_UP constant is less expressive than RoundingMode.HALF_UP.