Sample
JetBrains/b34
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.004 | 0–1; higher is more readable | 78.8Δ 7.6 |
| Scalabrino | 0.798 | 0–1; higher is more readable | 73.7Δ 2.5 |
| Dorn | 0.343 | 0–1; higher is more readable | 24.6Δ 46.6 |
| Mi | 0.342 | 0–1; higher is more readable | 28.0Δ 43.2 |
| LLOC | 5 | Logical lines; fewer is more readable | 88.6Δ 17.4 |
| DeepSeek V4 Pro | 18.67 | 0–20; mean of three runs | 100.0Δ 28.8 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 96.2Δ 25.0 |
| BTTF | 0.453 | 0–1; higher is more readable | 45.8Δ 25.4 |
| Human | 0.85 | 0–1; original rating | 71.2 |
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. | 369.978 | −12.209 |
| 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.934 | −5.902 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = -5.641 (log-odds).
Score = sigmoid(-5.641) = 0.004.
| Score | 0.798 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.16 | −0.616 |
| 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. | 75 | +0.489 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 7.75 | −0.302 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 9 | +0.214 |
Intercept 0.07 + feature contributions = -0.65 (log-odds).
Score = sigmoid(-0.65) = 0.343.
| Score | 0.342 |
|---|
| Score | 5 |
|---|
Run 1
The code is extremely readable. It has a clear, flat structure with a single, simple loop. The leap year condition is expressed logically in one line and is self-explanatory. Naming is straightforward, and there is no unnecessary complexity or nesting. Only a minor deduction for a lack of explanatory comments, though the logic is clear enough that they are not needed.
Run 2
The code is highly readable. It has a clear structure with a single class and main method. Nesting is minimal, with only one level of an if statement inside a for loop. The intent is clear: print leap years between 1800 and 2400. The length is concise yet complete. Action granularity is good, with one main action per line inside the loop. Reading flow is natural, moving from loop initialization to condition check to output. Minor deductions could be made for lack of comments, but the logic is self-explanatory.
Run 3
The code is concise and logical. It uses a single, well-known leap year condition within a simple loop. Structure is clean with minimal nesting (one loop and one if statement). Intent is clear from class and variable names. Code length is minimal and efficient. Reading flow is natural top-to-bottom. Minor deductions because the single-line if could be considered slightly dense, and lack of comments, but overall it is highly readable.
Run 1
Code Structure: The class, entry point, loop, and condition are logically organized. Nesting: The loop and conditional introduce only modest, easily followed nesting. Clarity of intent: The class name, year variable, and standard leap-year condition clearly convey the purpose, though named range constants could clarify the bounds. Code length: The implementation is concise without unnecessary code. Action granularity: Each statement performs a single clear action; the loop header uses conventional initialization, condition, and increment syntax. Reading flow: Execution proceeds naturally from iterating over years to checking eligibility and printing matching values.
Run 2
Code Structure: A single class and main method organize a straightforward loop and condition logically. Nesting: The loop contains only one conditional, keeping nesting shallow. Clarity of intent: The class name, year variable, and standard leap-year condition clearly convey the purpose; named range constants could add context. Code length: Concise without unnecessary statements or abstractions. Action granularity: Each statement performs a distinct action, with conventional initialization, comparison, and increment in the loop header. Reading flow: Execution proceeds naturally from iterating over years to testing and printing leap years, supported by consistent indentation.
Run 3
Code Structure: Logically organized into a class, main method, loop, and condition. Nesting: Shallow and appropriate for the task. Clarity of intent: The class and variable names clearly indicate leap-year detection; the standard leap-year condition is explicit, though a named helper could improve immediate comprehension. Code length: Concise with no unnecessary statements. Action granularity: Each statement performs one clear action on its own line. Reading flow: Natural progression from iterating over years to checking eligibility and printing matches, supported by consistent indentation.