Sample
Dorn/java/153
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.002 | 0–1; higher is more readable | 63.0Δ 7.8 |
| Scalabrino | 0.629 | 0–1; higher is more readable | 64.7Δ 9.6 |
| Dorn | 0.671 | 0–1; higher is more readable | 62.1Δ 7.0 |
| Mi | 0.693 | 0–1; higher is more readable | 81.9Δ 26.7 |
| LLOC | 11 | Logical lines; fewer is more readable | 57.0Δ 1.8 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 82.6Δ 27.4 |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs | 86.5Δ 31.3 |
| BTTF | 0.543 | 0–1; higher is more readable | 57.4Δ 2.2 |
| Human | 3.4 | 1–5; original rating | 55.2 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 600.283 | −19.809 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.801 | −7.202 |
Intercept 8.87 + feature contributions = -6.141 (log-odds).
Score = sigmoid(-6.141) = 0.002.
| Score | 0.629 |
|---|
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. | 74 | +0.531 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 22 | +0.257 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.236 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 22 | +0.024 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.467 | +0.002 |
Intercept 0.07 + feature contributions = 0.714 (log-odds).
Score = sigmoid(0.714) = 0.671.
| Score | 0.693 |
|---|
| Score | 11 |
|---|
Run 1
The code is generally clear and readable, with straightforward method names and logical delegation to a persistence layer. Each method performs a single action, and the loop in the first method is easy to follow. However, the snippet begins mid-method with a closing brace and throws clause, which lacks surrounding context and hurts reading flow. The `throws` declarations add some verbosity. The loop body is simple but could benefit from a blank line separation. Overall, the structure is clean, but the fragment's incomplete start and repetitive boilerplate reduce its readability score.
Run 2
The code is highly readable due to its clear, flat structure and consistent naming conventions. Each method performs a single, well-defined action, delegating persistence operations cleanly. The lack of deep nesting and the concise implementation of each method contribute to a natural reading flow. The only minor drawbacks are the repeated exception declarations and the absence of method-level documentation, which could slightly improve clarity for unfamiliar developers.
Run 3
The code structure is clear and logically organized, with each method performing a single, well-defined persistence operation. Nesting is minimal, with only a simple loop in the first method. Intent is unambiguous, as method names directly reflect their function. Code length is concise, avoiding unnecessary boilerplate. Action granularity is good—each line typically represents one operation or a simple loop construct. Reading flow is natural and consistent, following a logical progression from deletion to retrieval. Minor deductions: the loop body could be slightly more explicit, and exception declarations, while necessary for the API, add a bit of noise but are not unreasonable. Overall, this is highly readable code, especially for a straightforward service layer.
Run 1
Code Structure: Related deletion, retrieval, and counting methods are logically grouped, although the snippet starts with an incomplete method declaration. Nesting: Only one shallow loop; retrieval methods have no nesting. Clarity of intent: Descriptive method and parameter names clearly convey each operation, including paginated retrieval. Code length: Concise methods delegate directly to persistence operations without unnecessary logic. Action granularity: Each statement performs a single clear action. Reading flow: Consistent formatting and spacing make the code easy to scan, though wrapped declarations and the truncated opening slightly interrupt the flow.
Run 2
Code Structure: Methods are logically organized around deleting, retrieving, and counting poll questions, though the opening method signature is missing. Nesting: Minimal; only a simple loop introduces nesting. Clarity of intent: Descriptive method and variable names make operations clear, including pagination parameters. Code length: Concise methods delegate directly to persistence without unnecessary logic. Action granularity: Each statement performs one clear action. Reading flow: Consistent formatting and related methods support natural reading, although the truncated opening and wrapped declarations slightly interrupt it.
Run 3
Code Structure: Methods are logically organized around deleting, retrieving, and counting questions, though the opening method signature is truncated. Nesting: Minimal; only a simple loop introduces nesting. Clarity of intent: Descriptive method and parameter names make the operations clear, with overloaded retrieval methods distinguishing pagination. Code length: Concise delegations avoid unnecessary logic. Action granularity: Each statement performs a single action. Reading flow: Consistent formatting and related methods support natural reading, although wrapped signatures and the incomplete opening slightly disrupt it.