Sample

JetBrains/i39

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.96
Lines21

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0090–1; higher is more readable
85.6Δ 9.3
Scalabrino0.750–1; higher is more readable
63.6Δ 31.4
Dorn0.7140–1; higher is more readable
89.8Δ 5.1
Mi0.6760–1; higher is more readable
93.2Δ 1.7
LLOC13Logical lines; fewer is more readable
52.1Δ 42.8
DeepSeek V4 Pro13.670–20; mean of three runs
32.2Δ 62.7
GPT-6.1 Sol16.330–20; mean of three runs
34.3Δ 60.6
BTTF0.540–1; higher is more readable
74.6Δ 20.3
Human0.960–1; original rating
94.9

Views

Source code

public class PrimeNumbers { public static void main(String[] args) { int start = 1; int end = 10000; for (int i = start; i <= end; i++) { boolean isPrimeNumber = true; for (int j = 2; j < i; j++) { if (i % j == 0) { isPrimeNumber = false; break; } } if (isPrimeNumber) { System.out.println(i); } } } }

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.508.967−16.796
Source linesThe number of non-empty source lines.21+8.4
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.423−5.134

Intercept 8.87 + feature contributions = -4.66 (log-odds).
Score = sigmoid(-4.66) = 0.009.

Score0.75

Feature contributions

FeatureValueContribution
(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.46.905+1.679
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.21+0.293
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.19.625−0.136
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.109−0.114
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.21−0.061
Indentation frequencyHow rapidly indentation changes from line to line.21−0.011

Intercept 0.07 + feature contributions = 0.916 (log-odds).
Score = sigmoid(0.916) = 0.714.

Score0.676
Score13
Run 1

The code is generally readable: it has a clear structure, uses flat nesting (only two levels), and communicates intent well through variable names like isPrimeNumber. Each action is placed on its own line, and the reading flow follows a natural top-to-bottom progression. The main logic is concise and straightforward. However, it loses some points for minor inefficiency: the inner loop runs unnecessarily for non-prime detection beyond the square root of i, and the boolean flag plus break pattern is slightly less elegant than a direct method like isPrime(). These issues do not hurt readability significantly, but a helper method would improve clarity and reusability.

Run 2

The code is generally readable but has several issues. Structure is logical (main method, nested loops), and variable names like 'isPrimeNumber' are clear. However, main missing action granularity/clarity: the primality test is buried in the main method instead of being extracted into a method like 'isPrime()', which reduces reusability and intent. The inner loop needlessly checks all numbers up to i-1 (should stop at sqrt(i)), but this is an efficiency issue, not readability. Nesting is only two levels deep, which is acceptable. Reading flow is natural: outer loop, inner check, then print. Code length is concise but could be shorter with a helper method. Action granularity is one action per line, which is fine. Overall, it’s easy to follow but lacks modularity and would benefit from extracting the prime-check logic. These deductions justify a below-average score for clarity and structure.

Run 3

The code is highly readable. Structure is logical: constants define the range, a primary loop iterates through candidates, and a helper flag tracks primality. Nesting is limited to two levels, and the break statement prevents unnecessary work. Intent is clear—print prime numbers within a range. Code length is concise and appropriate for the task. Each statement performs a single action. Reading flow is natural: initialize range, check each number, print if prime. Minor deductions: the algorithm is inefficient and the flag name is slightly verbose, but these don't materially affect readability.

Run 1

Code Structure: Logically organized into range setup, candidate iteration, divisor testing, and output. Nesting: Moderate nesting from two loops and a conditional, but the short blocks remain easy to follow. Clarity of intent: The class name and isPrimeNumber flag clearly communicate the purpose; i and j are conventional but less descriptive than candidate and divisor. Initializing start to 1 incorrectly includes 1 as prime, slightly undermining the expressed intent. Code length: Concise, with no unnecessary boilerplate beyond the standard Java entry point. Action granularity: Each statement performs one clear action on its own line. Reading flow: Natural top-to-bottom progression, aided by consistent indentation and blank lines separating stages.

Run 2

Code Structure: Logically organized into range setup, primality testing, and output, though extracting the test into a method would improve separation. Nesting: Two loops and an inner conditional create moderate, manageable nesting; the break avoids further complexity. Clarity of intent: The class name and isPrimeNumber flag clearly communicate the purpose, while i and j are conventional but less descriptive. Starting at 1 incorrectly treats 1 as prime, slightly undermining the stated intent. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one clear action, and control-flow blocks are easy to distinguish. Reading flow: Consistent indentation and blank lines support a natural top-to-bottom progression.

Run 3

Code Structure: Logically organized into range setup, candidate iteration, divisor checking, and output, though extracting the primality check would improve separation. Nesting: Moderate nesting from two loops and a conditional remains manageable. Clarity of intent: The class name and isPrimeNumber flag clearly communicate the purpose, but i and j are less descriptive, and treating 1 as prime undermines the intended behavior. Code length: Concise, with no unnecessary statements. Action granularity: Statements generally perform one action per line; the conventional for-loop headers are easy to follow. Reading flow: Execution proceeds naturally from initialization through checking to printing, with whitespace separating the main steps.