Sample
JetBrains/e25
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 39.0Δ 7.6 |
| Scalabrino | 0.407 | 0–1; higher is more readable | 22.9Δ 8.5 |
| Dorn | 0.503 | 0–1; higher is more readable | 46.6Δ 15.3 |
| Mi | 0.016 | 0–1; higher is more readable | 5.1Δ 26.3 |
| LLOC | 7 | Logical lines; fewer is more readable | 85.2Δ 53.8 |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs | 47.0Δ 15.7 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 46.2 |
| BTTF | 0.458 | 0–1; higher is more readable | 47.5Δ 16.1 |
| Human | 0.62 | 0–1; original rating | 31.4 |
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. | 618.639 | −20.415 |
| 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.413 | −6.62 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -14.165 (log-odds).
Score = sigmoid(-14.165) = 0.
| Score | 0.407 |
|---|
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. | 107 | +0.922 |
| 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. | 107 | −0.867 |
| 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.134 | −0.359 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.731 | −0.288 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 8 | +0.237 |
Intercept 0.07 + feature contributions = 0.014 (log-odds).
Score = sigmoid(0.014) = 0.503.
| Score | 0.016 |
|---|
| Score | 7 |
|---|
Run 1
The code is mostly readable but has a few issues. It is well-structured with a clear main method and a straightforward loop. The use of an array for suffixes is appropriate, though the comment is redundant. The ternary expression for special cases (11-13) is compact but slightly obscures intent; a separate condition or helper method could improve clarity. Nesting is minimal and action granularity is reasonable, though parsing and printing are combined in a single line. The logic is concise but could be more self-documenting. Overall, the code is understandable but could benefit from clearer naming and separation of concerns.
Run 2
The code is concise and logically organized, with a clear purpose: it converts numeric command-line arguments into ordinal strings. It defines a suffixes array and loops through arguments, parsing each integer and computing the correct suffix index via a compact conditional expression. Nesting is minimal (a single loop), and granularity is mostly one action per line. However, readability suffers slightly due to the long, inline conditional expression that combines multiple logical checks without parentheses, and the magic numbers (100, 10, 14) lack explanation. The suffixes array is also hardcoded with repeated 'th' entries, which works but is not self-explanatory. Comments are brief but helpful. Overall, the code is readable but could be improved by extracting the index logic into a helper method or adding parentheses and explanatory comments for clarity.
Run 3
The code is concise and logically organized. It uses a clear array lookup for suffixes and a ternary operator to handle the special case of 11-13. Naming is reasonably clear (`suffixes`, `index`, `num`). The main weaknesses are: (1) the comment on the ternary is somewhat redundant but helps clarity; (2) the inline comment after the array is trivial; (3) parsing is done without error handling, which may be acceptable for a short example. Overall, the code is easy to follow, flat, and each line performs one main action, but minor improvements in error handling and comment quality would raise readability.
Run 1
Code Structure: Logically organized into suffix initialization, argument iteration, parsing, suffix selection, and output. Nesting: Shallow, with only one loop inside main. Clarity of intent: The class name and suffix array clearly indicate ordinal formatting, although the ternary expression requires some thought and the comments mostly repeat the code. Code length: Concise without unnecessary scaffolding. Action granularity: Each statement performs one focused action on its own line. Reading flow: Natural and sequential, with minor readability drawbacks from inconsistent indentation and repeated modulo expressions.
Run 2
Code Structure: The class and main method are logically organized around a straightforward loop. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: The class name, suffix array, and output clearly communicate ordinal formatting, though the ternary expression and numeric constants require brief interpretation. Code length: Concise without unnecessary complexity; the comments largely repeat the code. Action granularity: Each statement performs a distinct action on its own line. Reading flow: Initialization, parsing, suffix selection, and output follow a natural sequence. Slightly inconsistent indentation and the generic variable name 'index' modestly reduce readability.
Run 3
Code Structure: Logically organized into a suffix lookup, argument loop, and output. Nesting: Shallow, with only one loop inside main. Clarity of intent: The class name and suffix array clearly indicate ordinal formatting, though the ternary expression and numeric constants require some interpretation. Code length: Concise without unnecessary boilerplate beyond standard Java structure. Action granularity: Each statement performs one focused action on its own line. Reading flow: Natural progression from parsing each number to selecting its suffix and printing it. Minor drawbacks include inconsistent indentation, comments that largely repeat the code, and the dense suffix-index condition.