Sample
JetBrains/e7
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 24.6Δ 74.2 |
| Scalabrino | 0.772 | 0–1; higher is more readable | 67.8Δ 30.9 |
| Dorn | 0.427 | 0–1; higher is more readable | 32.2Δ 66.5 |
| Mi | 0.334 | 0–1; higher is more readable | 27.1Δ 71.6 |
| LLOC | 20 | Logical lines; fewer is more readable | 22.0Δ 76.7 |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs | 38.1Δ 60.6 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 52.5 |
| BTTF | 0.496 | 0–1; higher is more readable | 66.9Δ 31.8 |
| Human | 1 | 0–1; original rating | 98.7 |
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. | 969.985 | −32.009 |
| Source linesThe number of non-empty source lines. | 26 | +10.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. | 4.105 | −6.157 |
Intercept 8.87 + feature contributions = -18.897 (log-odds).
Score = sigmoid(-18.897) = 0.
| Score | 0.772 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 67.923 | +0.788 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.134 | −0.364 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 24 | −0.13 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 26 | +0.116 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 24 | +0.093 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 24.71 | −0.064 |
Intercept 0.07 + feature contributions = -0.295 (log-odds).
Score = sigmoid(-0.295) = 0.427.
| Score | 0.334 |
|---|
| Score | 20 |
|---|
Run 1
The code is fairly readable with clear method separation and simple logic. Structure is logical with dedicated methods for perniciousness and primality checks. Nesting is minimal, mostly flat loops and conditionals. Intent is mostly clear, though the bit-summing via string conversion is somewhat indirect. Code length is concise. Action granularity is reasonable, with one main action per line despite single-line if statements without braces, which slightly reduces clarity. Reading flow is natural, top-down from main to helper methods. Improvements could include handling the digit sum via bit manipulation for clarity and adding braces for consistency.
Run 2
The code is logically organized into three clear methods, each with a single responsibility: main loop, pernicious check, and primality check. Nesting is minimal, and reading flow is straightforward. Variable names are meaningful, and intent is mostly clear. However, line-level readability suffers slightly from packed actions—e.g., in `isPernicious`, `sum += Integer.parseInt(String.valueOf(binary.charAt(i)))` combines character extraction, conversion, parsing, and accumulation into one line, reducing clarity and action granularity. Also, `if` statements without braces are terse but can be less safe and slightly harder to scan. Overall, the code is concise and maintainable but could benefit from a helper line that makes the bit-summing process more explicit.
Run 3
The code has a clear overall structure with three distinct methods and a straightforward main loop, making the high-level purpose understandable. However, readability suffers from several issues: inconsistent brace style (single-line if/for without braces), nested method calls in isPernicious that obscure intent, and unnecessary string conversion overhead. The method names are descriptive but lack comments explaining what makes a number 'pernicious'. The reading flow is mostly natural from main to helper methods, but the dense binary-parsing loop is less intuitive. Action granularity could be improved by extracting the digit-summing logic. Overall, it's functional but not idiomatic or self-documenting.
Run 1
Code Structure: Three focused methods logically separate enumeration, pernicious-number detection, and primality testing. Nesting: Shallow loops and conditionals keep complexity low. Clarity of intent: Method names communicate purpose, but 'sum' would be clearer as 'setBitCount', and 10000 is an unexplained limit. Code length: Concise overall, although converting each binary character through String.valueOf and Integer.parseInt makes bit counting unnecessarily cumbersome. Action granularity: Each statement performs one main action, with no crowded lines. Reading flow: Methods follow a natural top-down progression. Inconsistent spacing and omitted braces around single-statement branches and loops slightly reduce readability.
Run 2
1. Code Structure: Well organized into three focused methods for enumeration, pernicious-number detection, and primality testing. 2. Nesting: Shallow loop-and-condition nesting makes control flow easy to follow. 3. Clarity of intent: Method names clearly communicate purpose, though sum would be clearer as setBitCount, and the string-based bit counting requires some interpretation. 4. Code length: Concise overall, but converting individual binary characters into strings and parsing them is unnecessarily verbose. 5. Action granularity: Each line generally performs one action, with conventional loop headers and a slightly dense parsing expression. 6. Reading flow: Natural top-down progression from main to helper methods. Consistent indentation helps, while omitted braces and tight spacing slightly reduce readability.
Run 3
Code Structure: Three focused methods cleanly separate enumeration, pernicious-number detection, and primality testing. Nesting: Shallow loops and conditionals make control flow easy to follow. Clarity of intent: Method names communicate purpose, though 'sum' could more clearly describe the count of set bits, and 10000 is an unexplained limit. Code length: Compact without excessive abstraction; converting each binary character through String.valueOf and Integer.parseInt is unnecessarily verbose. Action granularity: Statements generally perform one action per line. Reading flow: Methods appear in a natural top-down order, and early returns simplify primality testing. Missing braces around several control-flow bodies and inconsistent spacing slightly reduce readability.