Sample
Dorn/java/107
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 38.7Δ 6.1 |
| Scalabrino | 0.119 | 0–1; higher is more readable | 6.6Δ 26.0 |
| Dorn | 0.174 | 0–1; higher is more readable | 13.4Δ 19.2 |
| Mi | 0.125 | 0–1; higher is more readable | 12.8Δ 19.8 |
| LLOC | 25 | Logical lines; fewer is more readable | 21.4Δ 11.1 |
| DeepSeek V4 Pro | 3.67 | 0–20; mean of three runs | 6.1Δ 26.5 |
| GPT-6.1 Sol | 9 | 0–20; mean of three runs | 6.4Δ 26.2 |
| BTTF | 0.55 | 0–1; higher is more readable | 59.9Δ 27.3 |
| Human | 3.04 | 1–5; original rating | 32.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. | 1169.564 | −38.596 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.026 | −7.539 |
Intercept 8.87 + feature contributions = -17.265 (log-odds).
Score = sigmoid(-17.265) = 0.
| Score | 0.119 |
|---|
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 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 46 | −0.635 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 32 | +0.37 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.7 | +0.285 |
| 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. | 88.961 | −0.103 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.031 |
Intercept 0.07 + feature contributions = -1.556 (log-odds).
Score = sigmoid(-1.556) = 0.174.
| Score | 0.125 |
|---|
| Score | 25 |
|---|
Run 1
This code is difficult to read due to multiple severe issues. The structure is tangled with an apparent switch statement fragment starting mid-case, making logical organization unclear. Deep nesting is present in the for-loop with try-catch and multiple conditionals. Intent is ambiguous - it's unclear what the overall function does or what the case values represent. While individual lines are concise, the code is unnecessarily long due to the polling loop pattern that could be extracted. Action granularity is poor with multiple actions and assertions crammed together. Reading flow is disorganized - starting mid-statement with RuntimeVariables.replace, mixing UI interactions with assertions, and unexplained labels/continue statements. The inconsistent indentation and incomplete code fragment further hurt readability. Hard-coded values like '90', '30000', and XPaths without explanation add cognitive load. The label and continue pattern suggests control flow is scattered across a larger method. Overall this code requires significant effort to understand and maintain.
Run 2
The code is highly unreadable due to its tangled structure, inconsistent indentation, and deeply nested control flow. It appears to be part of a switch statement with fall-through cases, making the logical organization difficult to follow. The mixture of Selenium commands, assertions, loops, and exception handling in one block creates excessive nesting and obscures intent. Line lengths exceed reasonable limits, and multiple actions are crammed onto single lines. The reading flow is disrupted by abrupt control flow (continue, case labels) and the lack of meaningful comments or helper methods. While individual method names like 'isVisible' and 'clickAt' are clear, the surrounding context is chaotic. The code would benefit from meaningful extraction into well-named methods, consistent formatting, and elimination of deep nesting.
Run 3
The code is difficult to read due to deep indentation, multiple responsibilities per method, and unclear flow control. The switch-case structure with fall-through and a label with 'continue' obscures intent. Heavy mixing of UI actions, assertions, polling loops, and exception handling creates tangled logic. While individual lines are somewhat clear, the overall organization and nested loops reduce readability significantly.
Run 1
Code Structure: Sequential Selenium operations are recognizable, but the incomplete switch fragment, implicit case fall-through, and label-based control flow obscure organization. Nesting: The polling loop contains nested timeout checks, try/catch, and visibility checks, creating moderate depth. Clarity of intent: Deactivation, confirmation, and advanced-search actions are understandable, but magic values, an empty catch block, and unexplained label changes reduce clarity. Code length: Individual steps are reasonably concise, though repetitive Selenium calls and inline polling add verbosity. Action granularity: Most statements perform one action, making execution steps easy to distinguish despite multiline formatting. Reading flow: Inconsistent indentation, long selectors and regex expressions, abrupt case transitions, and missing surrounding context interrupt an otherwise chronological test flow.
Run 2
Code Structure: The test actions follow a recognizable sequence, but the incomplete opening and switch cases obscure the surrounding organization; implicit fall-through and label-based continuation complicate control flow. Nesting: The polling loop contains nested timeout checks, try/catch, and visibility checks, creating moderate depth. Clarity of intent: Selenium calls and assertions convey user deactivation and navigation, but magic values, an empty catch block, and unexplained label assignment reduce clarity. Code length: The snippet is reasonably short, though repetitive setup calls and verbose polling could be extracted into helpers. Action granularity: Most statements perform one action, with multiline calls generally preserving this separation. Reading flow: Inconsistent indentation, long XPath and regex expressions, and abrupt case transitions interrupt an otherwise chronological test sequence.
Run 3
Code Structure: The test actions are grouped logically, but the fragment starts mid-statement and ends at an empty case label; switch fall-through and label-based control flow obscure organization. Nesting: The polling loop contains nested timeout checks, a try block, and a visibility check, creating moderate nesting. Clarity of intent: Selenium calls clearly describe user deactivation and navigation, but magic values, an empty exception handler, and unexplained label assignments reduce clarity. Code length: The snippet is reasonably short, though repetitive setup calls and verbose polling could be extracted into helpers. Action granularity: Most statements perform one action, with multiline formatting generally separating arguments clearly. Reading flow: The interaction sequence is understandable, but uneven indentation, abrupt case transitions, and implicit fall-through interrupt natural reading.