Sample
JetBrains/e9
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 12.7Δ 21.2 |
| Scalabrino | 0.863 | 0–1; higher is more readable | 84.7Δ 50.8 |
| Dorn | 0.446 | 0–1; higher is more readable | 33.9Δ 0.0 |
| Mi | 0.668 | 0–1; higher is more readable | 91.5Δ 57.6 |
| LLOC | 28 | Logical lines; fewer is more readable | 5.9Δ 28.0 |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs | 11.9Δ 22.0 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 15.3Δ 18.6 |
| BTTF | 0.462 | 0–1; higher is more readable | 48.3Δ 14.4 |
| Human | 0.65 | 0–1; original rating | 33.9 |
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. | 1265.498 | −41.761 |
| Source linesThe number of non-empty source lines. | 38 | +15.2 |
| 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.893 | −5.839 |
Intercept 8.87 + feature contributions = -23.53 (log-odds).
Score = sigmoid(-23.53) = 0.
| Score | 0.863 |
|---|
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. | 61 | +1.082 |
| 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.15 | −0.516 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 38 | −0.451 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 36.677 | +0.103 |
Intercept 0.07 + feature contributions = -0.219 (log-odds).
Score = sigmoid(-0.219) = 0.446.
| Score | 0.668 |
|---|
| Score | 28 |
|---|
Run 1
The code is moderately readable. It has clear method separation (isPrime, digitSum, primefactorSum) and mostly flat nesting, which helps structure. However, readability suffers in a few areas: the primefactorSum method has a non-obvious reset of the loop counter (i=1) that obscures intent; variable and method names are clear but formatting is inconsistent (e.g., 'primefactorSum' lacks camelCase); action granularity is generally okay, but some lines combine multiple actions. The main method is concise and purpose-driven, but the overall lack of comments or explanatory context reduces clarity. The code is short, but the unusual loop-reset logic makes reasoning about correctness harder, lowering readability.
Run 2
The code is reasonably structured and generally readable, but it has moderate readability issues. The methods are logically organized and concise, with one action per line, which is good. However, the primefactorSum method is somewhat confusing: resetting i to 1 inside the loop is an unusual and non-obvious approach to finding prime factors, and it makes the control flow harder to follow. Variable names like num and i are acceptably clear, but the conditions in the main loop could benefit from whitespace or parentheses for clarity. Nesting is mostly flat, but the primefactorSum loop's logic is not straightforward. Overall, the code is understandable but could be improved with clearer factorization logic or comments.
Run 3
The code is short and somewhat readable, but it has several flaws. Structure is disjointed: primefactorSum 'resets' i to 1 instead of using a loop index, making logic hard to follow. The prime factor summation algorithm is inefficient and the purpose is unclear without domain knowledge. Nesting is acceptable but not flat everywhere. It lacks comments and meaningful variable names; methods avoid helpers like 'isSmith'. The main method does one action per line but the primefactorSum loop has multiple actions tightly coupled. Formatting is inconsistent (brace placement, spacing), reducing readability. Overall the code is comprehensible for an experienced developer but not self-explanatory.
Run 1
Code Structure: Separate methods for primality, digit sums, factor sums, and output provide logical organization. Nesting: Loops and conditionals are shallow and easy to follow. Clarity of intent: Class and method names mostly communicate purpose, but resetting i to 1 while reducing num makes repeated factor extraction less intuitive; primefactorSum also uses inconsistent capitalization. Code length: Compact without substantial unnecessary code, though the wildcard import is unused. Action granularity: Statements generally perform one action per line, with conventional loop headers. Reading flow: Helpers precede main naturally, but tight operator spacing, omitted braces on some conditionals, and modifying the loop counter and bound within primefactorSum interrupt readability. The unexplained upper bound of 10000 and lack of a brief explanation of Smith numbers slightly obscure the overall intent.
Run 2
Code Structure: Well separated into focused methods for primality, digit sums, factor sums, and output. Nesting: Shallow loops and conditionals make the code easy to follow. Clarity of intent: Method names mostly communicate purpose, but primefactorSum has inconsistent naming, and resetting i to 1 while modifying num makes factorization less intuitive. Code length: Compact without excessive boilerplate, although the unused wildcard import adds clutter. Action granularity: Most statements perform one action per line; loop headers conventionally combine initialization, testing, and incrementing. Reading flow: Helpers precede main logically, but cramped operator spacing, omitted braces on some conditionals, and the unexplained 10000 limit reduce readability. The handling of zero in isPrime also obscures the intended domain.
Run 3
Code Structure: Separate methods for primality, digit sums, factor sums, and output provide logical organization. Nesting: Loops and conditionals are shallow and easy to follow. Clarity of intent: Method names largely explain their purpose, but resetting i to 1 during factorization is non-obvious, and the Smith-number condition lacks explanation. Code length: Compact without substantial redundancy, although repeatedly checking primality complicates factorization. Action granularity: Most lines perform one action; loop headers conventionally combine initialization, testing, and incrementing. Reading flow: Methods appear in a natural helper-to-main order, but tight operator spacing, omitted braces on some conditionals, inconsistent method naming, and the unused wildcard import reduce polish. Edge-case behavior for zero and negative inputs also obscures the intended domain.