Sample
JetBrains/i40
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 61.0Δ 11.0 |
| Scalabrino | 0.539 | 0–1; higher is more readable | 37.3Δ 12.7 |
| Dorn | 0.286 | 0–1; higher is more readable | 18.6Δ 31.4 |
| Mi | 0.288 | 0–1; higher is more readable | 22.9Δ 27.1 |
| LLOC | 8 | Logical lines; fewer is more readable | 82.2Δ 32.2 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 69.9Δ 19.9 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 27.5 |
| BTTF | 0.39 | 0–1; higher is more readable | 27.1Δ 22.9 |
| Human | 0.73 | 0–1; original rating | 50.0 |
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. | 526.871 | −17.387 |
| 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.352 | −6.528 |
| Source linesThe number of non-empty source lines. | 15 | +6 |
Intercept 8.87 + feature contributions = -9.045 (log-odds).
Score = sigmoid(-9.045) = 0.
| Score | 0.539 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 13 | +0.576 |
| 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. | 91.867 | −0.226 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 15 | −0.218 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 13.839 | −0.216 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.115 | −0.173 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 15 | +0.077 |
Intercept 0.07 + feature contributions = -0.915 (log-odds).
Score = sigmoid(-0.915) = 0.286.
| Score | 0.288 |
|---|
| Score | 8 |
|---|
Run 1
The code is concise and logically structured: initialization, loop, and output are straightforward. Nesting is minimal and readability is strong, with one logical action per line. Intent is clear—calculating Euler's number via Taylor series—though variable names like 'e' and 'i' are conventional but not descriptive. The loop body is clear, and the overall flow is natural. Minor deductions for lack of comments explaining the approximation limit and the use of hardcoded values (1000 iterations, 1000 scale) without context.
Run 2
The code is concise and logically structured. It clearly computes Euler's number using the Taylor series. The intent is evident from the variable names 'e' and 'factorial'. Nesting is minimal with only one loop. Action granularity is reasonable, with each line performing a distinct operation. The reading flow is natural: initialize, iterate, update factorial, accumulate term, then output. Potential minor improvements could include a comment explaining the series, but the code is readable as is.
Run 3
The code is well-structured and easy to follow. It uses a simple loop to compute Euler's number (e) to 1000 decimal places. The variable names 'e' and 'factorial' clearly convey intent, and the logic is concise without being obscure. There is minimal nesting—just one loop—and each line performs a single logical action. The reading flow is natural, with the factorial update and e accumulation clearly separated. The only minor drawbacks are slightly generic variable names and a lack of comments explaining the mathematical series, which could help less experienced readers. Overall, the code is highly readable and maintainable.
Run 1
Code Structure: Initialization, calculation, and output are logically organized. Nesting: A single loop keeps nesting shallow. Clarity of intent: The factorial accumulation and reciprocal sum clearly suggest an approximation of Euler’s number, though a brief comment and named constants for iteration count and precision would help. Code length: Compact without unnecessary statements. Action granularity: Each statement performs one clear action. Reading flow: Execution proceeds naturally from setup through computation to printing. Minor readability drawbacks include unexplained numeric constants, slightly inconsistent spacing, and the deprecated BigDecimal.ROUND_HALF_UP constant instead of RoundingMode.HALF_UP.
Run 2
Code Structure: Clean organization with initialization, calculation, and output in a single short method. Nesting: Only one loop, making the control flow easy to follow. Clarity of intent: Descriptive variables and the factorial series suggest an approximation of Euler’s number, although a comment and named constants for iteration count and decimal scale would clarify the purpose and precision. Code length: Concise without unnecessary statements. Action granularity: Each statement performs one primary action, though the chained division and addition require slightly more parsing. Reading flow: Natural top-to-bottom progression with helpful blank lines. Minor readability drawbacks include the repeated literal 1000, inconsistent spacing in for(int...), and the deprecated rounding constant instead of RoundingMode.HALF_UP.
Run 3
Code Structure: Logically organized into initialization, computation, and output. Nesting: Minimal, with only one loop inside main. Clarity of intent: The factorial variable and series make the calculation of Euler's number recognizable, though a brief comment and named constants for iteration count and precision would clarify it further. Code length: Concise without unnecessary statements. Action granularity: Each line performs one clear operation; the chained arithmetic remains understandable. Reading flow: Natural top-to-bottom progression with helpful blank lines. Minor readability drawbacks include repeated literal 1000 values, slightly inconsistent spacing, and the legacy ROUND_HALF_UP constant rather than RoundingMode.HALF_UP.