Sample
JetBrains/e13
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 62.7Δ 23.3 |
| Scalabrino | 0.61 | 0–1; higher is more readable | 45.8Δ 6.4 |
| Dorn | 0.592 | 0–1; higher is more readable | 69.5Δ 30.1 |
| Mi | 0.565 | 0–1; higher is more readable | 66.1Δ 26.7 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.6Δ 24.2 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 49.6Δ 10.2 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 6.8 |
| BTTF | 0.425 | 0–1; higher is more readable | 33.9Δ 5.5 |
| Human | 0.67 | 0–1; original rating | 39.4 |
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. | 544.396 | −17.965 |
| 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.851 | −5.777 |
Intercept 8.87 + feature contributions = -8.472 (log-odds).
Score = sigmoid(-8.472) = 0.
| Score | 0.61 |
|---|
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. | 53 | +1.42 |
| 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.145 | −0.462 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 14.815 | −0.203 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 16 | +0.054 |
Intercept 0.07 + feature contributions = 0.373 (log-odds).
Score = sigmoid(0.373) = 0.592.
| Score | 0.565 |
|---|
| Score | 11 |
|---|
Run 1
The code is logically structured and easy to follow, with clear variable names and intent. It uses flat nesting and one action per line, contributing to good readability. However, it is slightly verbose: the manual loop to count set bits could be replaced with Integer.bitCount(i), which would reduce length and improve clarity. The main method lacks a helper for the 'evil number' check, but the logic is simple enough. Overall, it is readable but not optimized for conciseness.
Run 2
The code is logically structured: it initializes a loop, converts an integer to binary, counts set bits, and prints numbers with an even count. Nesting is only two levels deep, which is acceptable. Intent is mostly clear, though the concept of an 'evil number' is not explained in code. The code is concise and each line performs one action, aiding readability. Reading flow follows a natural top-down progression. Improvements could include extracting the bit-counting logic into a method and using Java's Integer.bitCount() to reduce complexity, but overall the code is easy to follow.
Run 3
The code is highly readable. It has a clear structure with two simple loops, shallow nesting, and obvious intent: finding numbers with an even number of 1 bits in their binary representation. Each action is on its own line, and the flow is natural—from generating binary strings to counting '1's to checking parity and printing. The variable names (binary, count) are meaningful. The only minor drawbacks are the magic number 1001 and the lack of a helper method to encapsulate the 'evil' check, but for a short example this is acceptable. The code could be more concise using Integer.bitCount(i), but the current loop makes the logic explicit, which benefits readability.
Run 1
Code Structure: Logically organized within a simple main method. Nesting: Moderate nesting from two loops and a conditional, but easy to follow. Clarity of intent: Binary conversion and counting set bits are clear; the class name suggests the purpose, though a comment explaining evil numbers and a named upper bound would help. Code length: Concise, although Integer.bitCount(i) could replace the inner loop. Action granularity: Each statement performs one action, with conventional loop headers. Reading flow: Natural progression from number generation to binary conversion, counting, and conditional output; consistent indentation supports readability.
Run 2
Code Structure: Logically organized around generating numbers, counting binary ones, and printing qualifying values. Nesting: The inner loop and conditional create moderate nesting, but the short blocks remain easy to follow. Clarity of intent: Binary conversion and the even-count test are clear; however, the meaning of an evil number and the upper bound of 1001 are not explained. Code length: Concise, with no unnecessary code. Action granularity: Each statement performs a single action, aside from conventional loop headers. Reading flow: Execution proceeds naturally from conversion through counting to output. More descriptive names such as oneCount and a named upper bound would improve readability.
Run 3
Code Structure: Logically organized into number iteration, binary conversion, bit counting, and conditional output. Nesting: Moderate nesting from two loops and an inner condition, but easy to follow. Clarity of intent: The operations clearly identify numbers with an even count of binary ones; however, the term 'evil number' is unexplained, and the bound 1001 lacks context. Code length: Concise, with no unnecessary code, although a bit-counting method could shorten it. Action granularity: Each statement performs one action; conventional loop headers remain readable. Reading flow: Execution proceeds naturally from conversion to counting to filtering, with consistent indentation and straightforward control flow.