Sample
JetBrains/b12
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 28.8Δ 52.1 |
| Scalabrino | 0.786 | 0–1; higher is more readable | 69.5Δ 11.4 |
| Dorn | 0.298 | 0–1; higher is more readable | 20.3Δ 60.6 |
| Mi | 0.379 | 0–1; higher is more readable | 33.1Δ 47.9 |
| LLOC | 21 | Logical lines; fewer is more readable | 19.5Δ 61.4 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 53.4Δ 27.5 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 34.7 |
| BTTF | 0.471 | 0–1; higher is more readable | 55.1Δ 25.8 |
| Human | 0.9 | 0–1; original rating | 80.9 |
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. | 998.347 | −32.945 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.675 | −5.513 |
Intercept 8.87 + feature contributions = -17.589 (log-odds).
Score = sigmoid(-17.589) = 0.
| Score | 0.786 |
|---|
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 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 30 | −0.268 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.124 | −0.26 |
| 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. | 83.833 | +0.114 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.741 | −0.008 |
Intercept 0.07 + feature contributions = -0.857 (log-odds).
Score = sigmoid(-0.857) = 0.298.
| Score | 0.379 |
|---|
| Score | 21 |
|---|
Run 1
The code is well-structured with clear separation of concerns: main controls flow, reverseNumber and isPrime handle distinct tasks. Nesting is minimal, with only a single conditional inside a loop in main and in isPrime. Intent is evident from method names and the straightforward emirp check. Code length is concise—no unnecessary verbosity. Action granularity is mostly one action per line, though the emirp condition combines three checks on one line; still readable. Reading flow is natural top-to-bottom. Minor deductions: the unused `count` variable and lack of comments or output labeling reduce clarity slightly.
Run 2
The code is well structured with clear separation of concerns via methods for prime checking and number reversal. Nesting is minimal and control flow is easy to follow. Names like isPrime and reverseNumber make intent clear. The main loop is concise, though the condition combining prime, reverse-prime, and non-palindrome checks could be extracted for readability. Action granularity is mostly one action per line, and the reading flow is logical. Minor issues: the unused count variable, lack of comments explaining what an emirp is, and the condition check requiring i != reverseNumber(i) is slightly dense. Overall the code is approachable and maintainable.
Run 3
The code is well-structured with clear method separation for prime checking and number reversal. Nesting is minimal and the logic is easy to follow. Intent is clear: find emirp primes up to 10000. The main method is concise, but the missing increment of count is an oversight. Action granularity is good, with one meaningful operation per line. However, variable naming is slightly generic (e.g., 'reverse', 'number'), and the unused count variable suggests incomplete implementation. Overall, it is readable and maintainable, though minor naming and unused code improvements would enhance clarity.
Run 1
Code Structure: Clearly separates enumeration, digit reversal, and primality testing into small methods. Nesting: Shallow loop-and-condition nesting is easy to follow. Clarity of intent: Descriptive method names and the Emirp class name communicate purpose, though the unused count variable and unexplained limit of 10000 add minor ambiguity. Code length: Compact without being cryptic; reverseNumber(i) is unnecessarily called twice. Action granularity: Each statement performs a distinct action, while the compound condition expresses closely related checks. Reading flow: Execution proceeds naturally from main to helper methods, with straightforward early returns. Blank lines between methods and a named upper-limit constant would improve readability.
Run 2
Code Structure: Well organized into a main method and two focused helper methods. Nesting: Shallow and easy to follow, with only simple loops and conditionals. Clarity of intent: Descriptive method names clearly express primality testing and digit reversal, though the emirp condition could benefit from a named variable, and count is incremented but never used. Code length: Concise without unnecessary boilerplate; computing reverseNumber(i) twice adds minor redundancy. Action granularity: Each statement performs a distinct action, although the compound condition combines several checks. Reading flow: Natural progression from iteration to filtering and output, followed by helpers. Consistent indentation supports readability, but blank lines between methods and a named constant for 10000 would improve scanning and communicate intent.
Run 3
Code Structure: Well organized into a main method and two focused helpers. Nesting: Shallow loop-and-condition nesting is easy to follow. Clarity of intent: Descriptive helper names make the prime and digit-reversal checks clear, though the emirp condition could benefit from a brief explanation; count is incremented but never used. Code length: Concise overall, with minor redundancy from calling reverseNumber(i) twice. Action granularity: Each statement performs a distinct action, although the compound condition combines several checks. Reading flow: Consistent indentation and straightforward control flow support natural reading; blank lines between methods and a named constant for 10000 would improve scanning and context.