Sample

JetBrains/e14

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.59
Lines21

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0010–1; higher is more readable
72.9Δ 44.1
Scalabrino0.8540–1; higher is more readable
83.9Δ 55.1
Dorn0.4560–1; higher is more readable
36.4Δ 7.6
Mi0.7110–1; higher is more readable
97.5Δ 68.6
LLOC13Logical lines; fewer is more readable
52.1Δ 23.3
DeepSeek V4 Pro17.670–20; mean of three runs
88.6Δ 59.7
GPT-6.1 Sol180–20; mean of three runs
77.5Δ 48.7
BTTF0.4780–1; higher is more readable
60.2Δ 31.4
Human0.590–1; original rating
28.8

Views

Source code

public class OdiousNumbers { public static void main(String[] args) { for(int i = 0; i <= 1000; i++) { int count = countOnesInBinary(i); if(count % 2 == 1) { System.out.println(i); } } } private static int countOnesInBinary(int num) { int count = 0; while(num > 0) { if(num % 2 == 1) { count++; } num = num / 2; } return count; } }

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.558.802−18.44
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.775−5.663

Intercept 8.87 + feature contributions = -6.833 (log-odds).
Score = sigmoid(-6.833) = 0.001.

Score0.854

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.52.952+1.422
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
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.21+0.293
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.126−0.283
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.19.87−0.132
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.20−0.038

Intercept 0.07 + feature contributions = -0.175 (log-odds).
Score = sigmoid(-0.175) = 0.456.

Score0.711
Score13
Run 1

The code is well-structured with a clear separation between the main method and a helper method. It avoids deep nesting, using only one level of indentation in loops and conditionals. The intent is obvious: find and print odious numbers up to 1000. The code is concise without sacrificing readability. Each line performs one clear action, and the reading flow naturally follows from iteration to binary counting to filtering to printing. Variable names like 'countOnesInBinary' are descriptive. Minor improvements could include using an if statement instead of negating the even condition, but overall the code is highly readable.

Run 2

The code is highly readable due to its clear structure and logical organization. It separates the main iteration logic from the binary counting logic via a method, which improves clarity and reusability. Nesting is minimal and shallow, with only one if-statement inside a while-loop and another in the for-loop. The intent is unambiguous: print odious numbers up to 1000. Code length is concise and appropriate, with no unnecessary verbosity. Each line performs a single clear action. Reading flow is natural—initializing, iterating, counting ones, checking parity, and printing. Variable names such as 'count', 'num', and 'countOnesInBinary' are self-explanatory. Minor improvements could include using bitwise operations for efficiency, but this doesn't impact readability. Overall, the code is straightforward and easy to understand.

Run 3

The code is well-structured with a clear separation between the main iteration logic and the binary helper method. Nesting is minimal, with only one conditional inside the loop and helper method. Intent is clear: print odious numbers up to 1000. The code is concise and avoids unnecessary length. Each line performs a single action, enhancing readability. The reading flow is natural, moving from loop to helper method. Minor improvements could include more descriptive variable names (e.g., 'number' instead of 'i') and inline comments, but overall it is highly readable.

Run 1

Code Structure: The main loop and binary-counting helper are logically separated. Nesting: Both methods use shallow, easily followed loop-and-condition nesting. Clarity of intent: The class and helper names communicate the purpose, though naming count as onesCount and documenting odious numbers would improve accessibility. Code length: Short and focused, with no unnecessary code. Action granularity: Each statement performs one clear action; the conventional for-loop header remains readable. Reading flow: Execution proceeds naturally from iterating over numbers to counting binary ones and printing matches. Minor weaknesses include the unexplained upper bound of 1000 and missing spaces after control-flow keywords.

Run 2

Code Structure: Well organized, with iteration and output in main and binary counting in a separate helper. Nesting: Shallow and manageable, with one conditional inside each loop. Clarity of intent: Descriptive class and method names make the purpose clear, although the definition of an odious number and the choice of 1000 are not explained. Code length: Concise, without unnecessary logic. Action granularity: Each statement performs one action; the loop header uses standard Java conventions. Reading flow: Natural progression from enumerating numbers to counting binary ones and checking odd parity. Minor spacing inconsistencies and an unexplained upper bound slightly reduce readability.

Run 3

Code Structure: Clearly separates number iteration and output from binary bit counting through a helper method. Nesting: Shallow, with an if inside each loop, making control flow easy to follow. Clarity of intent: Descriptive class and method names communicate the purpose, though the definition of an odious number and the fixed upper limit could be clarified. Code length: Compact without unnecessary repetition. Action granularity: Each statement performs one action; loop initialization, condition, and increment use standard Java syntax. Reading flow: Natural progression from iterating over numbers to counting bits and printing qualifying values. Minor spacing inconsistencies and the unexplained limit of 1000 slightly reduce readability.