Sample
JetBrains/e52
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.012 | 0–1; higher is more readable | 88.1Δ 2.5 |
| Scalabrino | 0.646 | 0–1; higher is more readable | 48.3Δ 42.4 |
| Dorn | 0.598 | 0–1; higher is more readable | 70.3Δ 20.3 |
| Mi | 0.497 | 0–1; higher is more readable | 52.5Δ 38.1 |
| LLOC | 9 | Logical lines; fewer is more readable | 79.2Δ 11.4 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 53.4Δ 37.3 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 63.1Δ 27.5 |
| BTTF | 0.535 | 0–1; higher is more readable | 73.7Δ 16.9 |
| Human | 0.94 | 0–1; original rating | 90.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. | 383.374 | −12.651 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 3.894 | −5.841 |
| Source linesThe number of non-empty source lines. | 13 | +5.2 |
Intercept 8.87 + feature contributions = -4.422 (log-odds).
Score = sigmoid(-4.422) = 0.012.
| Score | 0.646 |
|---|
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. | 53 | +1.42 |
| 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 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 13 | +0.576 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 11.704 | −0.246 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.101 | −0.039 |
Intercept 0.07 + feature contributions = 0.397 (log-odds).
Score = sigmoid(0.397) = 0.598.
| Score | 0.497 |
|---|
| Score | 9 |
|---|
Run 1
The code is well-structured with a clear purpose: generating the first 31 Fibonacci numbers. It uses flat nesting and maintains one action per line inside the loop, which improves readability. Variable names are descriptive, though `nextNum` could be more specific. The loop logic is straightforward, but the initial `println(firstNum)` is slightly awkward because it prints 0 before the loop starts printing from the second term. A minor improvement would be to unify output within the loop or adjust the starting index. The code length is appropriate for the task, with no unnecessary complexity. Reading flow is natural, following a logical sequence of initialization, output, and iterative calculation. Overall, it is concise and easy to understand.
Run 2
The code is simple and clear, with good logical organization and a single class performing one focused task. Nesting is minimal—just one for loop—and the reading flow is natural: initialize numbers, print the first value, then compute and print subsequent Fibonacci numbers. However, clarity of intent could be improved: variable names like 'firstNum' and 'secondNum' are somewhat generic, and the loop condition 'i<=30' uses a magic number rather than a named constant. Action granularity is good, with one main operation per line. The code is concise but would benefit from comments explaining the Fibonacci logic and why the loop starts at 1 and ends at 30. Overall, it is highly readable for a short program but could be slightly more self-documenting.
Run 3
The code is logically structured and achieves its purpose with minimal complexity. It uses a flat loop with no unnecessary nesting, and each statement is on its own line, aiding readability. Variable names like 'firstNum' and 'secondNum' clearly indicate their roles. However, clarity of intent could be improved—there is no comment explaining the sequence limit (30), and the initial value 0 is printed before the loop, making the logic slightly less intuitive. The loop condition is hard-coded, reducing flexibility. Overall, the code is concise and readable but could be slightly clearer about its intent and boundary conditions.
Run 1
Code Structure: A single main method logically groups initialization, output, and iteration. Nesting: Only one loop, keeping control flow simple. Clarity of intent: The class and variable names clearly indicate Fibonacci generation, though the unexplained limit of 30 and omission of the initial secondNum output make the intended sequence slightly unclear. Code length: Short and free of unnecessary complexity. Action granularity: Most lines perform one action, but the combined declaration of three variables slightly reduces scanability. Reading flow: Execution proceeds naturally from initialization through calculation, printing, and state updates. Inconsistent spacing in the loop header is a minor readability issue.
Run 2
Code Structure: A single, logically organized method keeps initialization, output, and iteration together. Nesting: Only one loop, making control flow easy to follow. Clarity of intent: The class and variable names clearly indicate Fibonacci generation, though the hard-coded limit of 30 is unexplained and the output skips the second initial value of 1. Code length: Concise without unnecessary abstractions or repetition. Action granularity: Most lines perform one action, but the combined variable declaration slightly reduces scanability. Reading flow: Statements follow a natural calculate-print-update sequence; consistent spacing in the loop header and separate declarations would improve readability.
Run 3
Code Structure: A single main method organizes initialization, initial output, and iteration logically. Nesting: Only one loop, keeping nesting shallow. Clarity of intent: The class name and descriptive variables clearly indicate Fibonacci generation, though the hard-coded limit of 30 and printing the sum before updating make the exact sequence boundaries less obvious. Code length: Short and appropriately concise. Action granularity: Loop statements each perform one action, but declaring three variables on one line slightly reduces scanability. Reading flow: Execution proceeds naturally from setup to output and state updates; inconsistent spacing in the loop header is a minor readability issue.