Sample
JetBrains/e34
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.008 | 0–1; higher is more readable | 84.7Δ 16.9 |
| Scalabrino | 0.826 | 0–1; higher is more readable | 79.7Δ 11.9 |
| Dorn | 0.371 | 0–1; higher is more readable | 27.1Δ 40.7 |
| Mi | 0.386 | 0–1; higher is more readable | 34.7Δ 33.1 |
| LLOC | 5 | Logical lines; fewer is more readable | 88.6Δ 20.8 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 69.9Δ 2.1 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 9.7 |
| BTTF | 0.495 | 0–1; higher is more readable | 66.1Δ 1.7 |
| Human | 0.84 | 0–1; original rating | 67.8 |
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. | 359.452 | −11.862 |
| 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.864 | −5.796 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -4.788 (log-odds).
Score = sigmoid(-4.788) = 0.008.
| Score | 0.826 |
|---|
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 |
| 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. | 74 | +0.531 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.151 | −0.525 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.707 | −0.288 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 10 | +0.191 |
Intercept 0.07 + feature contributions = -0.527 (log-odds).
Score = sigmoid(-0.527) = 0.371.
| Score | 0.386 |
|---|
| Score | 5 |
|---|
Run 1
The code is concise and logically structured with a clear purpose: listing leap years from 1800 to 2400. The logic is expressed in a single, flat conditional with minimal nesting, and the action inside the loop is one clear statement per line. The variable name 'year' is descriptive, and the loop range is explicit. The conditional expression is dense but accurately captures the leap year rule, prioritizing exception handling (century non-leap years) within a single expression. While slightly more complex than a multi-line condition with comments, the overall flow is natural and easy to follow. The class and method are minimal, and there is no unnecessary repetition.
Run 2
The code is concise and well-structured. The class and method are logically organized. The loop is flat with only one level of nesting inside main. The leap-year condition is compact but clear to readers familiar with the rule. The loop range and action are evident. However, the condition could be slightly more explicit by using a helper method or separating the logic into named variables, which would improve clarity for less experienced readers. Overall, length is minimal, action granularity is one action per line, and reading flow is linear and natural.
Run 3
The code is logically structured with a clear separation of class, method, loop, and conditional. It uses a single if statement as the only nested block, keeping nesting minimal. The leap-year condition is concise, though slightly compressed; a helper method or additional parentheses could improve clarity. The loop is straightforward and the variable declaration outside is acceptable here. Each line performs one logical action, and the reading flow is natural from initialization to output. Overall, it is highly readable for a small utility.
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 and year variable clearly indicate leap-year enumeration, though the negated compound condition takes a moment to interpret. Code length: The implementation is concise without unnecessary logic. Action granularity: Statements perform single actions; the loop header conventionally combines initialization, testing, and incrementing. Reading flow: Execution proceeds naturally from iteration through filtering to output. Declaring year within the loop and expressing the leap-year condition more directly would slightly improve readability.
Run 2
Code Structure: A single class and main method logically organize a straightforward loop. Nesting: The loop and conditional introduce only shallow, easily followed nesting. Clarity of intent: The class name and year variable clearly communicate the purpose, although the negated compound leap-year condition requires some mental parsing. Code length: The implementation is concise without unnecessary logic; declaring year directly in the for loop would improve variable scoping. Action granularity: Each statement performs one clear action, with conventional loop controls grouped appropriately. Reading flow: Consistent indentation and the natural sequence of iteration, testing, and printing make the code easy to follow.
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 name and year variable clearly indicate leap-year enumeration, though the negated compound condition requires extra thought. Code length: Concise, with only a slightly unnecessary separate declaration of year. Action granularity: Each statement performs a focused action; the loop header follows conventional Java syntax. Reading flow: Natural top-to-bottom progression from year iteration to validation and output, supported by consistent indentation.