Sample
JetBrains/i12
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 36.4Δ 46.6 |
| Scalabrino | 0.867 | 0–1; higher is more readable | 86.4Δ 3.4 |
| Dorn | 0.534 | 0–1; higher is more readable | 53.4Δ 29.7 |
| Mi | 0.533 | 0–1; higher is more readable | 58.5Δ 24.6 |
| LLOC | 21 | Logical lines; fewer is more readable | 19.5Δ 63.6 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 88.6Δ 5.5 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 5.5 |
| BTTF | 0.489 | 0–1; higher is more readable | 63.6Δ 19.5 |
| Human | 0.91 | 0–1; original rating | 83.1 |
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. | 982.031 | −32.407 |
| Source linesThe number of non-empty source lines. | 35 | +14 |
| 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.372 | −5.057 |
Intercept 8.87 + feature contributions = -14.595 (log-odds).
Score = sigmoid(-14.595) = 0.
| Score | 0.867 |
|---|
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. | 59.971 | +1.125 |
| 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. | 35 | −0.382 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 35 | −0.203 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.111 | −0.135 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 33.852 | +0.063 |
Intercept 0.07 + feature contributions = 0.138 (log-odds).
Score = sigmoid(0.138) = 0.534.
| Score | 0.533 |
|---|
| Score | 21 |
|---|
Run 1
The code is highly readable due to its clear structure and separation of concerns. It uses small, focused helper methods (isPrime, reverseNumber) that each perform a single task. The main method is concise and expresses intent clearly by combining these helpers in a simple, flat conditional flow. Nesting is minimal—only two levels deep—and the logic is easy to follow. Naming is descriptive, and there is no unnecessary complexity or duplication. Minor improvements could include more comments or a brief explanation of what an Emirp number is, but the code itself is self-explanatory enough.
Run 2
The code is well-structured into clear methods with single responsibilities: isPrime and reverseNumber. Nesting is minimal, with only one level of conditional within the main loop. The intent of finding emirp numbers (primes whose reverse is a different prime) is clear from the method names and logic flow. Code length is appropriate for the task, with no unnecessary verbosity. Each line generally performs one action, improving readability. The reading flow is natural: iterate, check primality, reverse, check again, and output. Minor potential improvements could include adding comments or explaining the emirp concept, but overall the code is highly readable.
Run 3
The code is well-structured into logical methods (isPrime, reverseNumber) and a clear main loop, making the intent easy to follow. Nesting is minimal, with early returns reducing complexity. The action granularity is appropriate—each line performs a distinct operation. The reading flow is natural: prime check, reversal, then emirp validation. The code is concise and avoids unnecessary verbosity. Minor points deducted for lack of explanatory comments and slightly compressed formatting in the isPrime loop, but overall readability is very high.
Run 1
Code Structure: Well organized into a main routine and two focused helper methods. Nesting: Shallow overall, though main contains a loop and two nested conditions that could be flattened. Clarity of intent: Descriptive method names and straightforward arithmetic clearly convey prime checking and digit reversal; naming the 10000 limit would improve context. Code length: Concise without unnecessary complexity or repetition. Action granularity: Each statement performs a clear, discrete action, and the reversal expression remains easy to understand. Reading flow: Natural progression from candidate enumeration to primality checking, reversal, and output. Minor spacing inconsistencies around if, for, and while slightly reduce polish.
Run 2
Code Structure: Well organized into a main enumeration loop and two focused helper methods. Nesting: Moderate nesting in main, with a loop and two conditional levels, but each block is short and easy to follow. Clarity of intent: Descriptive method names clearly communicate primality checking and digit reversal; the emirp condition is explicit. The upper bound of 10000 could use a named constant to clarify its role. Code length: Concise, without unnecessary repetition or boilerplate. Action granularity: Each statement performs a single clear action; the arithmetic in digit reversal is appropriately grouped. Reading flow: Natural progression from candidate generation to primality checking, reversal, and output. Minor spacing inconsistencies around control statements slightly reduce polish.
Run 3
Code Structure: Well organized into three focused methods separating enumeration, primality testing, and digit reversal. Nesting: Generally shallow, though main contains a loop with two nested conditionals that could be flattened. Clarity of intent: Descriptive method names and straightforward conditions make the purpose clear; the upper limit of 10000 is unexplained. Code length: Concise without unnecessary duplication or boilerplate beyond standard Java structure. Action granularity: Each statement performs a single clear action, with conventional loop headers and arithmetic expressions. Reading flow: Methods follow a natural top-down sequence, and early returns simplify primality testing. Minor spacing inconsistencies around control statements slightly reduce polish.