Sample
JetBrains/i25
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 43.2Δ 33.1 |
| Scalabrino | 0.591 | 0–1; higher is more readable | 41.5Δ 31.4 |
| Dorn | 0.211 | 0–1; higher is more readable | 16.1Δ 5.9 |
| Mi | 0.211 | 0–1; higher is more readable | 15.3Δ 5.1 |
| LLOC | 7 | Logical lines; fewer is more readable | 85.2Δ 75.0 |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs | 43.6Δ 33.5 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 34.3Δ 24.2 |
| BTTF | 0.441 | 0–1; higher is more readable | 38.1Δ 28.0 |
| Human | 0.43 | 0–1; original rating | 10.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. | 605.45 | −19.98 |
| 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.344 | −6.517 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
Intercept 8.87 + feature contributions = -13.227 (log-odds).
Score = sigmoid(-13.227) = 0.
| Score | 0.591 |
|---|
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.145 | −0.463 |
| 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. | 94 | −0.316 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.737 | −0.274 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 11 | +0.168 |
Intercept 0.07 + feature contributions = -1.32 (log-odds).
Score = sigmoid(-1.32) = 0.211.
| Score | 0.211 |
|---|
| Score | 7 |
|---|
Run 1
The code is logically structured with clear purpose, but has minor readability issues: a magic-number array is used for suffixes without explanation, and the ternary expression for index calculation is dense. It avoids deep nesting and is concise, but the lack of comments or a helper method makes intent slightly ambiguous. Action granularity is acceptable.
Run 2
The code is concise and demonstrates a clever use of logic to determine ordinal suffixes. It has a flat structure with minimal nesting, making the flow easy to follow. However, the logic for suffix selection is compressed into a single complex ternary expression, which reduces clarity and readability. The array of suffixes is compact but not self-explanatory. Variable names like 'i' and 'ii' are ambiguous, and the code lacks comments explaining the modulo and range-check logic. The reading flow is natural overall, but the core decision-making line could be broken down for better comprehension.
Run 3
The code is concise and logically organized for its purpose. It uses a lookup array and ternary logic to determine ordinal suffixes, avoiding deep nesting and unnecessary length. However, readability suffers from cryptic variable names like 'i' and 'ii', and the logic for handling numbers 11-13 is not immediately obvious. The array indexing via a boolean expression is compact but requires careful reading. Adding comments or clearer variable names would improve clarity.
Run 1
Code Structure: The class, entry point, and loop are logically organized. Nesting: Shallow nesting makes the code easy to follow. Clarity of intent: The class name and suffix lookup communicate ordinal formatting, but variable names i and ii are vague, and the compact conditional requires extra attention. Code length: Concise without unnecessary repetition. Action granularity: Each statement performs one main action, although suffix selection combines range checking and indexing in one expression. Reading flow: Parsing, calculating, selecting a suffix, and printing follow a natural sequence. Consistent spacing around operators and array elements, plus more descriptive variable names, would improve readability.
Run 2
Code Structure: Logically organized, with suffix initialization followed by argument processing and output. Nesting: Shallow, with only one loop inside main. Clarity of intent: The class name and suffix array convey ordinal formatting, but i and ii are vague names, and the tightly packed ternary expression requires extra attention. Code length: Concise without unnecessary boilerplate beyond standard Java structure. Action granularity: Each statement performs a distinct step, although suffix selection combines range checking and indexing in one expression. Reading flow: Naturally progresses from parsing to suffix selection to printing, but inconsistent spacing and compressed operators reduce scanability.
Run 3
Code Structure: Logically organized, with suffix initialization followed by argument processing and output. Nesting: Shallow, with only one loop inside main. Clarity of intent: The class name and suffix table communicate ordinal formatting, but i and ii are vague names, and the tightly packed ternary requires extra interpretation. Code length: Concise without unnecessary boilerplate beyond the Java entry point. Action granularity: Each statement performs a distinct step, though suffix selection combines range checking, a conditional, and array indexing. Reading flow: Natural progression from parsing to suffix selection to printing; consistent spacing around operators and more descriptive variable names would improve readability.