Sample
JetBrains/b25
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 45.8Δ 50.0 |
| Scalabrino | 0.38 | 0–1; higher is more readable | 19.5Δ 76.3 |
| Dorn | 0.69 | 0–1; higher is more readable | 83.1Δ 12.7 |
| Mi | 0.561 | 0–1; higher is more readable | 64.4Δ 31.4 |
| LLOC | 17 | Logical lines; fewer is more readable | 34.3Δ 61.4 |
| DeepSeek V4 Pro | 14.67 | 0–20; mean of three runs | 40.3Δ 55.5 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 18.2 |
| BTTF | 0.619 | 0–1; higher is more readable | 89.8Δ 5.9 |
| Human | 0.96 | 0–1; original rating | 95.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. | 759.555 | −25.065 |
| Source linesThe number of non-empty source lines. | 22 | +8.8 |
| 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.624 | −5.437 |
Intercept 8.87 + feature contributions = -12.832 (log-odds).
Score = sigmoid(-12.832) = 0.
| Score | 0.38 |
|---|
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. | 49.955 | +1.549 |
| 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 (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 20.765 | −0.12 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.108 | −0.112 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 22 | −0.084 |
Intercept 0.07 + feature contributions = 0.798 (log-odds).
Score = sigmoid(0.798) = 0.69.
| Score | 0.561 |
|---|
| Score | 17 |
|---|
Run 1
The code is generally readable and well-structured. It has a clear purpose: converting numbers to ordinal strings via command-line arguments. The structure is logical, with low nesting (one loop and one if-else chain). The intent is fairly clear, though the ordinal logic could be more explicit. The code length is appropriate and concise. Action granularity is mostly one action per line, except the lastDigit and secondLastDigit calculations, which could be clearer if separated or better named. The reading flow is natural: parse input, compute suffix, print result. However, there is a minor ambiguity: the algorithm does not handle negative numbers, and the use of lastDigit/secondLastDigit could be clearer. Overall, it is readable but could be improved with a helper method for ordinal logic and better variable naming.
Run 2
The code is logically structured and straightforward, with a single class and a clear main method. It is relatively flat, with only a few conditional branches. The intent is clear: generate ordinal suffixes for numbers from command-line arguments. Action granularity is good, with one main action per line. However, readability is slightly reduced by the lack of helper methods for parsing and suffix logic, which could make the code more modular and reduce cognitive load. Variable names are mostly clear, but 'secondLastDigit' logic could be extracted for clarity. The code is concise but not overly compressed, and the flow is natural.
Run 3
The code is fairly readable with a clear purpose: it appends an ordinal suffix to each numeric command-line argument. The structure is logical and the if-else chain is flat, which aids readability. The action granularity is good, with one main operation per line. However, the code is slightly verbose: the suffix determination could be condensed, and the secondLastDigit variable could be more clearly named. The intent of the conditional logic is understandable, but the repeated suffix assignments make it longer than necessary. Overall, it is readable but not maximally concise.
Run 1
Code Structure: Logically organized into input parsing, digit extraction, suffix selection, and output. Nesting: Shallow and manageable, with a single loop containing a straightforward conditional chain. Clarity of intent: Descriptive variable names and familiar suffixes make ordinal formatting clear, though the special handling of teen numbers could benefit from a brief comment. Code length: Concise, with little unnecessary code; the repeated suffix assignments are reasonable for readability. Action granularity: Each statement performs one action, making individual steps easy to follow. Reading flow: Consistent indentation and a natural top-to-bottom progression support quick comprehension.
Run 2
Code Structure: Logically organized into argument parsing, digit extraction, suffix selection, and output. Nesting: Shallow and easy to follow; the conditional chain sits within a single loop. Clarity of intent: Descriptive variable names and recognizable suffix rules clearly convey ordinal formatting, though Main is generic and the digit arithmetic requires brief interpretation. Code length: Concise, with little unnecessary code; the repeated suffix assignments are straightforward. Action granularity: Each statement performs a focused action, with no crowded lines. Reading flow: Consistent indentation and sequential processing make the code natural to read. Extracting suffix selection into a named helper could make its purpose even more explicit.
Run 3
Code Structure: Logically organized into argument parsing, digit extraction, suffix selection, and output. Nesting: Limited to a loop and a straightforward if/else chain; easy to follow. Clarity of intent: Descriptive names make ordinal suffix generation apparent, though a dedicated method could make the purpose more explicit. Code length: Concise, with only minor repetition in assigning "th". Action granularity: Each statement performs a single clear action; standard loop syntax is appropriate. Reading flow: Natural top-to-bottom progression and consistent indentation support readability. A few blank lines separating processing stages and parentheses around the digit calculation would improve scanning slightly.