Sample
JetBrains/b14
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.007 | 0–1; higher is more readable | 83.9Δ 55.9 |
| Scalabrino | 0.745 | 0–1; higher is more readable | 61.0Δ 33.1 |
| Dorn | 0.674 | 0–1; higher is more readable | 79.7Δ 51.7 |
| Mi | 0.633 | 0–1; higher is more readable | 78.0Δ 50.0 |
| LLOC | 9 | Logical lines; fewer is more readable | 79.2Δ 51.3 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 56.8Δ 28.8 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 63.1Δ 35.2 |
| BTTF | 0.498 | 0–1; higher is more readable | 67.8Δ 39.8 |
| Human | 0.59 | 0–1; original rating | 28.0 |
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. | 419.834 | −13.855 |
| 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.483 | −5.224 |
| Source linesThe number of non-empty source lines. | 13 | +5.2 |
Intercept 8.87 + feature contributions = -5.009 (log-odds).
Score = sigmoid(-5.009) = 0.007.
| Score | 0.745 |
|---|
Feature contributions
| Feature | Value | Contribution (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. | 47 | +1.675 |
| 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.137 | −0.391 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 11.771 | −0.245 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
Intercept 0.07 + feature contributions = 0.725 (log-odds).
Score = sigmoid(0.725) = 0.674.
| Score | 0.633 |
|---|
| Score | 9 |
|---|
Run 1
The code is logically structured and concise. It uses clear variable names like 'count' for bit counting. The nesting is shallow with only two loops and one conditional. Action granularity is good—each line performs a single operation. The intent is relatively clear: find numbers with an odd number of set bits (odious numbers). However, the bitwise operations (j >>= 1, j & 1) may require some familiarity with bit manipulation. A minor improvement could be extracting the bit-counting logic into a helper method with a descriptive name, which would further enhance clarity. Overall, the code is readable and efficient.
Run 2
The code is well-structured and highly readable. It uses a single class with a clear main method. The outer loop iterates through numbers 0–1000, while the inner loop efficiently counts set bits using bit shifting and masking. Nesting is only two levels deep, maintaining flat structure. The intent is clear: identify and print 'odious numbers' (numbers with an odd number of 1s in binary). The code is concise yet not cryptic, with each line performing a distinct action. The bitwise operations (`j >>= 1`, `j & 1`) are idiomatic and readable to those familiar with Java. Minor possible improvement could be a comment explaining the 'odious' definition, but the logic is still understandable. Overall, the code balances brevity with clarity very well.
Run 3
The code is quite readable: it uses clear variable names (count, i), has a logical structure, and keeps actions relatively simple. The outer loop and inner bit-counting loop are straightforward. However, the intent is not immediately obvious — 'odious numbers' are not explained, and the bit-shift/bitwise operation (j >>= 1 and count += j & 1) requires domain knowledge. Nesting is shallow, and the code is concise, but readability could be improved with a helper method like countSetBits(int n) to clarify the purpose of the inner loop. The reading flow is natural, and there are no unnecessary complexities.
Run 1
Code Structure: Logically organized into iteration, bit counting, and conditional output. Nesting: Moderate and appropriate, with an inner loop and a simple conditional inside the outer loop. Clarity of intent: The class name suggests the purpose, but understanding odious numbers and the bitwise operations requires some background; more descriptive variable names would help. Code length: Concise without unnecessary statements. Action granularity: Each body statement performs one clear action; the loop headers use conventional initialization, testing, and updating. Reading flow: Natural top-to-bottom progression with consistent indentation. A named upper bound and a brief explanation of odd binary population counts would improve accessibility.
Run 2
Code Structure: Logically organized, with iteration, bit counting, and output clearly separated. Nesting: Moderate and appropriate; the inner loop and conditional are easy to follow. Clarity of intent: The class name indicates the purpose, but readers must recognize that odd binary population counts define odious numbers; more descriptive names or a brief comment would help. Code length: Concise without unnecessary statements. Action granularity: Each body statement performs one focused action; the loop headers use standard Java conventions. Reading flow: Natural progression from selecting a number to counting its set bits and conditionally printing it. The bitwise operations are compact but slightly reduce accessibility for beginners.
Run 3
Code Structure: Logically organized, with iteration, bit counting, and conditional output clearly separated. Nesting: Moderate and appropriate; the inner loop and conditional are simple to follow. Clarity of intent: The class name suggests the purpose, but understanding odious numbers and the bitwise operations requires some background; a more descriptive name than count could help. Code length: Concise without unnecessary statements. Action granularity: Each statement performs one clear action, with conventional loop control grouped in the headers. Reading flow: Natural progression from each candidate number to counting its set bits and printing those with odd parity. Consistent formatting supports readability.