Sample

JetBrains/i14

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.89
Lines16

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
63.6Δ 11.9
Scalabrino0.5110–1; higher is more readable
33.9Δ 41.5
Dorn0.590–1; higher is more readable
67.8Δ 7.6
Mi0.4820–1; higher is more readable
47.5Δ 28.0
LLOC11Logical lines; fewer is more readable
63.6Δ 11.9
DeepSeek V4 Pro16.670–20; mean of three runs
62.3Δ 13.1
GPT-6.1 Sol17.670–20; mean of three runs
63.1Δ 12.3
BTTF0.4730–1; higher is more readable
56.8Δ 18.6
Human0.890–1; original rating
75.4

Views

Source code

public class OdiousNumbers { public static void main(String[] args) { for (int i = 0; i <= 1000; i++) { String binary = Integer.toBinaryString(i); int count = 0; for (int j = 0; j < binary.length(); j++) { if (binary.charAt(j) == '1') { count++; } } if (count % 2 != 0) { 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.551.828−18.21
Source linesThe number of non-empty source lines.16+6.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.649−5.474

Intercept 8.87 + feature contributions = -8.414 (log-odds).
Score = sigmoid(-8.414) = 0.

Score0.511

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.55.938+1.296
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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.133−0.35
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.14.895−0.202
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.16+0.054

Intercept 0.07 + feature contributions = 0.363 (log-odds).
Score = sigmoid(0.363) = 0.59.

Score0.482
Score11
Run 1

The code is clear and logically structured: it iterates from 0 to 1000, converts each number to binary, counts '1' bits, and prints if the count is odd. Nesting is moderate (two loops and an if), but still flat enough to follow. Intent is obvious from the class name 'OdiousNumbers', although the algorithm could be simplified with Integer.bitCount(). Length is concise and action granularity is generally good, though the inner loop could be replaced with a single method call. Reading flow is natural: the logic progresses from number → binary string → count → check → print. Minor weaknesses include a slightly misleading class name (odious numbers have an odd number of ones in their binary representation, which matches the code) and the avoidable manual bit counting. Overall, easy to read and understand.

Run 2

The code is logically structured: main method, a loop to iterate numbers, conversion to binary, counting '1's, and a final conditional check for odd count. Nesting is shallow (two levels), which aids readability. The intent — printing odious numbers up to 1000 — is clear from the code despite the technical term 'odious' not being explained. The solution is concise and avoids unnecessary length. Each line performs a single, straightforward action, and the reading flow follows a natural progression from iteration to conversion, counting, and output. Minor improvements could include extracting the bit-counting logic into a helper method or using Integer.bitCount, but the current form is very readable.

Run 3

The code is readable: it uses a clear class and a straightforward main method. The nested loops and conditional logic are only two levels deep, which is acceptable. Each line performs a single action, making the flow easy to follow. Variable names like `binary` and `count` are meaningful. The purpose — printing odious numbers up to 1000 — is evident from the structure, though a brief comment or method extraction could improve clarity further. The logic to count set bits is simple but slightly verbose; using `Integer.bitCount(i)` would shorten the code and reveal intent more directly. Overall, the code is concise enough, well-structured, and natural to read.

Run 1

Code Structure: Logically organized into iteration, binary conversion, bit counting, and conditional output. Nesting: Moderate nesting from the inner loop and conditional, but each block is short and easy to follow. Clarity of intent: The class name and binary conversion make the purpose reasonably clear; naming count as oneBitCount would improve precision. Code length: Concise, with no unnecessary logic, although Integer.bitCount could simplify counting. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom progression with consistent indentation and straightforward control flow.

Run 2

Code Structure: Logically organized, with conversion, bit counting, and output in a straightforward sequence. Nesting: Moderate nesting from two loops and a conditional, but the short blocks remain easy to follow. Clarity of intent: The class name and binary conversion convey the purpose, though count could be named setBitCount and the odd-bit criterion could be documented. Code length: Concise without unnecessary boilerplate beyond Java requirements; Integer.bitCount could simplify the implementation. Action granularity: Each statement performs a single clear action, with conventional loop headers. Reading flow: Consistent indentation and sequential processing make the code natural to read, although a named constant for the upper limit would clarify 1000.

Run 3

Code Structure: Logically organized into iteration, binary conversion, counting set bits, and conditional output. Nesting: Moderate nesting from two loops and an inner conditional, but the short blocks remain easy to follow. Clarity of intent: The class name and straightforward logic communicate the purpose; naming count as oneBitCount would improve precision. Code length: Compact without unnecessary code, though Integer.bitCount could simplify the counting logic. Action granularity: Each statement performs a single clear action; loop headers use conventional syntax. Reading flow: Execution proceeds naturally from number generation to testing and printing, supported by consistent indentation and braces.