Sample
JetBrains/e24
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 0.8Δ 91.9 |
| Scalabrino | 0.223 | 0–1; higher is more readable | 9.3Δ 83.5 |
| Dorn | 0.022 | 0–1; higher is more readable | 1.7Δ 91.1 |
| Mi | 0.006 | 0–1; higher is more readable | 1.7Δ 91.1 |
| LLOC | 23 | Logical lines; fewer is more readable | 14.8Δ 78.0 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 49.6Δ 43.2 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 46.6 |
| BTTF | 0.474 | 0–1; higher is more readable | 58.5Δ 34.3 |
| Human | 0.95 | 0–1; original rating | 92.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. | 1881.835 | −62.101 |
| Source linesThe number of non-empty source lines. | 33 | +13.2 |
| 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.161 | −6.241 |
Intercept 8.87 + feature contributions = -46.272 (log-odds).
Score = sigmoid(-46.272) = 0.
| Score | 0.223 |
|---|
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. | 152.97 | −2.814 |
| 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. | 33 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 33 | −0.336 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.122 | −0.239 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 33 | −0.132 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 31.792 | +0.035 |
Intercept 0.07 + feature contributions = -3.817 (log-odds).
Score = sigmoid(-3.817) = 0.022.
| Score | 0.006 |
|---|
| Score | 23 |
|---|
Run 1
The code is generally clear and well-structured, with logical separation of arrays for ones, tens, and teens. The main flow is flat with minimal nesting, and each action is granular per line. However, there are subtle readability issues: the TEENS array has an empty first element which is non-obvious, and the logic for handling numbers 11–19 by setting n=0 is a bit ambiguous. The single-letter variable 'n' lacks clarity, and the repeated System.out.print calls could be consolidated for better flow. Missing input validation and handling for zero also reduce clarity. Overall, it's readable but could be improved with better naming and clearer edge-case handling.
Run 2
The code is generally readable with clear intent, flat structure, and concise logic. It uses well-named constants and processes each number segment sequentially. However, there are minor flaws: it doesn't handle zero, the TEENS array indexing could confuse (index 0 is empty, so n-10 requires mental offset), and the overall logic isn't encapsulated in a reusable method. The 'if' blocks are flat and each does one logical step, improving flow, but variable mutation (n) reduces clarity slightly. Overall, understandable for a small utility but could benefit from encapsulation and zero-case handling.
Run 3
The code is generally straightforward with a flat structure and one action per line, which aids readability. Variable names are clear, and the arrays for number words are logically organized. However, the logic for handling teens (11-19) is somewhat awkward because it sets n=0 and relies on subsequent conditions failing, which makes the intent less obvious. Also, the program silently ignores numbers 0-10 and lacks input validation, which could confuse readers. The main method is concise but the control flow could be clearer with an if-else chain or helper method. Overall, the code is readable for its small size but has some logic quirks.
Run 1
Code Structure: Lookup constants precede a logically ordered conversion routine, though parsing, conversion, and printing are combined in main. Nesting: Shallow, with straightforward conditional blocks inside one loop. Clarity of intent: The class name and constants clearly communicate integer-to-English conversion; the abbreviated variable n and unstated supported range reduce clarity slightly. Code length: Compact without substantial unnecessary code, although long array declarations are harder to scan. Action granularity: Each statement performs one primary action, with output and remainder updates on separate lines. Reading flow: Processing thousands, hundreds, teens, tens, and ones follows a natural descending order. Mutating n requires tracking the remaining value, but the consistent pattern makes this manageable.
Run 2
Code Structure: Lookup constants and a straightforward conversion sequence provide logical organization, though conversion and output are combined in main. Nesting: Shallow nesting—one loop containing simple conditionals—makes the code easy to follow. Clarity of intent: The class name, constants, and arithmetic clearly communicate integer-to-English conversion; however, the supported input range and handling of zero or negative numbers are not explicit. Code length: Compact without substantial repetition, although the lookup-array declarations are long. Action granularity: Each statement performs one primary action, with output and remainder updates on separate lines. Reading flow: Processing thousands, hundreds, teens, tens, and ones follows a natural descending order. Repeated mutation of the terse variable n requires some tracking, but the overall flow remains clear.
Run 3
Code Structure: Lookup constants and a logically ordered conversion routine provide clear organization, though separating conversion from argument parsing and printing would improve modularity. Nesting: Shallow nesting, with only conditionals inside a loop, makes the code easy to follow. Clarity of intent: The class name, constants, and arithmetic clearly communicate integer-to-English conversion; the abbreviated variable n and unstated supported range reduce clarity slightly. Code length: Compact without substantial duplication or unnecessary code. Action granularity: Each statement performs a distinct action, with output and remainder updates on separate lines. Reading flow: Processing thousands, hundreds, teens, tens, and ones follows a natural descending order. Repeated printing mildly fragments the conversion logic, and behavior for zero, negative values, and larger numbers is not explicit.