Sample

JetBrains/b12

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.9
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
28.8Δ 52.1
Scalabrino0.7860–1; higher is more readable
69.5Δ 11.4
Dorn0.2980–1; higher is more readable
20.3Δ 60.6
Mi0.3790–1; higher is more readable
33.1Δ 47.9
LLOC21Logical lines; fewer is more readable
19.5Δ 61.4
DeepSeek V4 Pro160–20; mean of three runs
53.4Δ 27.5
GPT-6.1 Sol170–20; mean of three runs
46.2Δ 34.7
BTTF0.4710–1; higher is more readable
55.1Δ 25.8
Human0.90–1; original rating
80.9

Views

Source code

public class Emirp { public static void main(String[] args) { int count = 0; for (int i = 1; i <= 10000; i++) { if (isPrime(i) && isPrime(reverseNumber(i)) && i != reverseNumber(i)) { System.out.println(i); count++; } } } public static int reverseNumber(int number) { int reverse = 0; while (number != 0) { reverse = reverse * 10 + number % 10; number /= 10; } return reverse; } public static boolean isPrime(int number) { if (number == 1 || number == 0) { return false; } for (int i = 2; i <= Math.sqrt(number); i++) { if (number % i == 0) { return false; } } return true; } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.

Score0.786

Feature contributions

FeatureValueContribution
(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.

Score0.379
Score21
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.