Sample
Dorn/java/178
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.2Δ 18.7 |
| Scalabrino | 0.648 | 0–1; higher is more readable | 68.6Δ 24.0 |
| Dorn | 0.592 | 0–1; higher is more readable | 51.5Δ 7.0 |
| Mi | 0.315 | 0–1; higher is more readable | 30.1Δ 14.5 |
| LLOC | 12 | Logical lines; fewer is more readable | 53.6Δ 9.1 |
| DeepSeek V4 Pro | 8.67 | 0–20; mean of three runs | 32.7Δ 11.8 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 41.4Δ 3.2 |
| BTTF | 0.64 | 0–1; higher is more readable | 82.7Δ 38.2 |
| Human | 3.27 | 1–5; original rating | 44.6 |
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. | 593.878 | −19.598 |
| 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.862 | −7.293 |
Intercept 8.87 + feature contributions = -6.021 (log-odds).
Score = sigmoid(-6.021) = 0.002.
| Score | 0.648 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97 | +0.761 |
| 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. | 96.968 | −0.442 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 28 | +0.231 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 28 | −0.222 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.028 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.765 | +0.006 |
Intercept 0.07 + feature contributions = 0.371 (log-odds).
Score = sigmoid(0.371) = 0.592.
| Score | 0.315 |
|---|
| Score | 12 |
|---|
Run 1
The code has some readable elements, such as clear test method names and a logical test structure. However, several issues reduce readability. The code structure is incomplete at the start, opening with dangling closing braces without context. Indentation is inconsistent—mixing tabs and spaces—and misaligned, disrupting the reading flow. The nested loops in testGetValueAt are reasonably flat and clear, but the exception handling in testGetValueAt_InvalidColumn is somewhat tangled, relying on try-catch blocks and multiple acceptable exception types. The fail message is overly verbose and awkwardly phrased. Action granularity is mostly reasonable, with one action per line in loops, but the exception block could be more concise. Overall, the code conveys its intent but lacks consistent formatting and clean structure.
Run 2
The code is partially readable but has notable issues. Structure is fragmented due to inconsistent indentation and a trailing orphaned block from a previous method. Clarity of intent suffers because the test names (testGetValueAt, testGetValueAt_InvalidColumn) are somewhat generic and the orphaned code obscures context. Nesting depth is acceptable (two loops, one try-catch), but the use of comments like 'This is acceptable' inside catch blocks is redundant and adds noise. Code length is reasonable, but the long failure message string is verbose and wraps awkwardly. Action granularity is adequate—one main action per line—but the try-catch with multiple catch blocks for different exceptions makes the flow slightly unnatural. Overall readability is moderate: the test methods are understandable, but formatting inconsistencies, unclear context from incomplete code, and verbose error messaging prevent a higher score.
Run 3
The code is poorly structured and lacks readability. Indentation is inconsistent, with mixed tabs and spaces, and the snippet appears to start mid-method with orphaned closing braces. Nesting is deep in the first test method (two levels of loops), though the second test uses a flat try-catch structure. Clarity of intent is low: the first test has no explanatory comments and is disconnected from its method signature, while the second test uses a long failure message that is wordy. Code length is acceptable, but action granularity is mixed—some lines perform multiple logical actions (e.g., loop conditions and method calls). Reading flow is disorganized due to the fragment starting with a return statement and having unbalanced indentation. Overall, the code requires significant cleanup to be maintainable.
Run 1
Code Structure: Tests are separated into focused methods, but the opening fragment lacks context and indentation is inconsistent. Nesting: The two nested loops are straightforward and appropriate for checking table cells; exception handling adds little complexity. Clarity of intent: Descriptive test names and explicit assertions make the purpose clear, though the incomplete opening obscures its intent. Code length: Generally concise, with some repetition in the exception handlers and an unnecessarily wordy failure message. Action granularity: Each statement performs one action, making individual operations easy to follow. Reading flow: The tests proceed naturally from valid-cell checks to invalid-column handling, but inconsistent brace placement, whitespace, and the truncated beginning interrupt readability.
Run 2
Code Structure: Separate annotated test methods organize the checks logically, but the opening fragment lacks context and indentation is inconsistent. Nesting: The two nested loops are modest and appropriate for checking table cells; exception handling is straightforward. Clarity of intent: Descriptive test names and assertions clearly convey normal-value and invalid-column checks, although accepting two exception types makes the expected contract less precise. Code length: Mostly concise, with a somewhat verbose failure message and repetitive catch comments. Action granularity: Each statement performs one action, and the wrapped message remains understandable. Reading flow: The tests follow naturally, but mixed whitespace, inconsistent brace placement, extra blank lines, and the incomplete opening reduce readability.
Run 3
Code Structure: Tests are separated into focused methods, but the fragment starts with an incomplete method tail and uses inconsistent formatting. Nesting: The two-level loop and simple try/catch are manageable. Clarity of intent: Descriptive test names and assertions clearly communicate the checks; accepting two exception types slightly weakens precision. Code length: Mostly concise, although the failure message is verbose and the catch blocks repeat the same comment. Action granularity: Each statement performs one clear action, with conventional loop headers. Reading flow: The tests progress naturally from valid values to an invalid column, but mixed indentation, inconsistent brace placement, and the truncated opening disrupt readability.