Sample
JetBrains/i9
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 16.1Δ 64.8 |
| Scalabrino | 0.848 | 0–1; higher is more readable | 83.1Δ 2.1 |
| Dorn | 0.502 | 0–1; higher is more readable | 45.8Δ 35.2 |
| Mi | 0.426 | 0–1; higher is more readable | 39.8Δ 41.1 |
| LLOC | 31 | Logical lines; fewer is more readable | 3.8Δ 77.1 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 78.8Δ 2.1 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 3.4 |
| BTTF | 0.518 | 0–1; higher is more readable | 69.5Δ 11.4 |
| Human | 0.9 | 0–1; original rating | 80.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. | 1357.517 | −44.798 |
| Source linesThe number of non-empty source lines. | 47 | +18.8 |
| 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.495 | −5.242 |
Intercept 8.87 + feature contributions = -22.371 (log-odds).
Score = sigmoid(-22.371) = 0.
| Score | 0.848 |
|---|
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. | 60.915 | +1.085 |
| 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. | 44 | +0.785 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 47 | −0.658 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 47 | −0.628 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 45.806 | +0.23 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.074 |
Intercept 0.07 + feature contributions = 0.006 (log-odds).
Score = sigmoid(0.006) = 0.502.
| Score | 0.426 |
|---|
| Score | 31 |
|---|
Run 1
The code is logically organized into small, focused methods with clear names, making the flow easy to follow: main loop, Smith number check, digit sum, prime factor sum, and primality test. Nesting is minimal—only one level inside loops and conditionals. Intent is transparent; each method does exactly what its name suggests. Code length is compact without sacrificing clarity. Action granularity is mostly one action per line, improving readability. The reading order is natural, from high-level logic down to helper methods. Minor deductions: `factorSum` could be slightly clearer by extracting a helper for prime factor iteration, and `isPrime` uses `Math.sqrt` without a comment, though the intent is clear enough. Overall, very readable.
Run 2
The code is well-structured into small, focused methods with clear responsibilities, making it highly readable. The main loop, digit sum, factor sum, and primality check are separated logically. Nesting is minimal—only one nested while loop inside a for loop—keeping the code relatively flat. Intent is clear from method names and the overall flow. Code length is concise without sacrificing clarity. Each line performs a single action, improving readability. The reading flow is natural: from problem statement (main) to verification (isSmithNumber) to helper methods. Minor deductions: factorSum recomputes digitSum for each factor rather than summing digits of the full factorization once, and the loop bound could be optimized, but these do not significantly impair readability.
Run 3
The code is highly readable due to clear method decomposition, shallow nesting, and logical organization. Each method has a single responsibility (digit sum, factor sum, primality check), making intent obvious. The main loop is concise, and lines are short with one action each. Variable names are descriptive. One minor improvement could be documenting the Smith number logic or optimizing factorSum to avoid redundant checks, but overall the structure supports excellent readability and maintainability.
Run 1
Code Structure: Well organized into small, focused methods for digit sums, factor sums, primality, and Smith-number detection. Nesting: Shallow overall; the nested factorization loop is manageable. Clarity of intent: Descriptive method names make the purpose clear, though the Smith-number definition and repeated-factor counting could benefit from brief comments. Code length: Concise without unnecessary boilerplate or repetition. Action granularity: Each statement performs a single clear action; the combined return condition remains easy to understand. Reading flow: The main loop introduces the task naturally, followed by the detection method and its helpers. Minor readability drawbacks include the unexplained upper bound of 10000 and modifying the number parameter during factorization.
Run 2
Code Structure: Well-organized into small, focused methods separating enumeration, Smith-number detection, digit summation, factor summation, and primality testing. Nesting: Shallow and manageable, with at most two control-flow levels per method. Clarity of intent: Descriptive method names make the overall purpose clear, though factorSum could more explicitly indicate summing the digits of prime factors, and the upper bound 10000 is unexplained. Code length: Concise without unnecessary abstraction or repetition. Action granularity: Each statement performs a distinct operation; loop headers use conventional Java syntax. Reading flow: Natural top-down progression from the entry point to supporting methods, aided by consistent formatting. Minor readability limitations include generic loop variables and mutating number during factorization, which requires readers to track the changing loop bound.
Run 3
Code Structure: Well-organized into small methods for digit sums, factor sums, primality, and Smith-number detection. Nesting: Shallow and manageable, with at most two nested control structures. Clarity of intent: Descriptive method names make the purpose clear, though factorSum could more explicitly indicate summing the digits of prime factors, and 10000 is an unexplained limit. Code length: Concise without unnecessary repetition or boilerplate. Action granularity: Each statement performs a single straightforward action. Reading flow: The entry point followed by the main predicate and supporting methods provides a natural progression; consistent formatting and early returns improve readability.