Sample
Dorn/java/212
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 51.3Δ 29.2 |
| Scalabrino | 0.699 | 0–1; higher is more readable | 76.4Δ 4.1 |
| Dorn | 0.692 | 0–1; higher is more readable | 64.3Δ 16.2 |
| Mi | 0.784 | 0–1; higher is more readable | 96.7Δ 16.2 |
| LLOC | 11 | Logical lines; fewer is more readable | 57.0Δ 23.5 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 18.1Δ 62.4 |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs | 24.4Δ 56.1 |
| BTTF | 0.467 | 0–1; higher is more readable | 36.8Δ 43.7 |
| Human | 3.75 | 1–5; original rating | 80.5 |
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. | 698.806 | −23.061 |
| 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. | 5.056 | −7.584 |
Intercept 8.87 + feature contributions = -9.775 (log-odds).
Score = sigmoid(-9.775) = 0.
| Score | 0.699 |
|---|
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. | 75.968 | +0.448 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76 | +0.422 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.106 | −0.087 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.753 | +0.006 |
Intercept 0.07 + feature contributions = 0.807 (log-odds).
Score = sigmoid(0.807) = 0.692.
| Score | 0.784 |
|---|
| Score | 11 |
|---|
Run 1
The code has some structural issues that hurt readability. The `for` loop uses an awkward pattern with an empty condition and a `second` variable that serves a timeout purpose, but this intent is not immediately clear. The nesting is moderate, but the try-catch block with an empty catch body is a poor practice. Variable naming is acceptable, but there is a magic number (90) that should be a named constant. The action granularity is mostly fine, with one action per line, but the flow is disrupted by the loop pattern. The overall purpose (waiting for an element to appear) is common, but it could be extracted into a helper method to improve clarity and reduce duplication if repeated elsewhere. The code length is reasonable, but conciseness is undermined by the verbose wait-loop pattern.
Run 2
The code exhibits poor readability. It contains a manually implemented polling loop with a 'for' loop and 'Thread.sleep', which is verbose and obscures intent. The loop structure is unnecessarily nested and tangled, mixing timeout logic, visibility checks, and exception handling in a non-flat manner. The action granularity is inconsistent; 'selenium.open' and 'loadRequiredJavaScriptModules' are on separate lines, but the loop logic crams multiple concerns. The reading flow is disorganized due to the abrupt break and empty catch block. Clarity of intent is low because the purpose of the loop is not immediately obvious; a helper method or explicit wait would be clearer. The code is unnecessarily long for what is essentially a single wait operation. While the class and method names are descriptive, the implementation details overshadow these positives.
Run 3
The code shows several readability issues. The loop for waiting lacks clarity with an arbitrary timeout value (90) and a bare `for` condition, making intent unclear. The try-catch block swallows exceptions without explanation, obscuring failure handling. The code structure mixes concerns (setup, waiting, and test logic) without clear separation. Nesting is moderate but could be flattened. Action granularity is acceptable per line, but the overall flow feels disorganized. Variable names like 'second' and hardcoded strings reduce clarity. The code lacks comments explaining the wait logic. Overall, it is functional but difficult to follow quickly, with low readability due to unclear intent and poor structure.
Run 1
Code Structure: Package, imports, class, and test method are conventionally organized, but the excerpt begins with an orphaned comment terminator and lacks closing braces. Nesting: The polling loop contains a try block and nested condition, adding moderate complexity. Clarity of intent: Descriptive names and the visibility check suggest waiting for a wiki page, but the promised deletion is not shown; silently swallowed exceptions obscure failures. Code length: Short overall, though manual polling is more verbose than a dedicated wait utility. Action granularity: Statements generally perform one action per line. Reading flow: Opening the page, loading modules, and waiting follow a logical sequence, but the unusual infinite-loop syntax, unexplained timeout value, and incomplete ending interrupt readability.
Run 2
Code Structure: The package, imports, class, and test method are logically organized, but the excerpt starts with a stray comment terminator and lacks closing braces. Nesting: The polling loop contains nested timeout and visibility checks plus a try/catch, creating moderate nesting. Clarity of intent: Descriptive class and method names identify the intended test, but the visible code only opens a page and waits for a link; no deletion is shown. The empty catch silently ignores errors. Code length: The excerpt is short, though the manual polling logic is verbose compared with a dedicated wait helper. Action granularity: Statements generally perform one action per line. Reading flow: Execution proceeds naturally from navigation to waiting, with whitespace aiding scanning, but the unusual loop condition and incomplete excerpt interrupt readability.
Run 3
Code Structure: The package, imports, class, and test method are logically organized, but the excerpt begins with a stray comment terminator and lacks closing braces. Nesting: The loop contains a try block and nested conditional, creating moderate nesting for a simple wait. Clarity of intent: Names and the visibility check indicate waiting for a wiki page link, but the advertised deletion action is absent, and silently swallowed exceptions obscure failures. Code length: The excerpt is short, though the manual polling loop is verbose compared with a dedicated wait helper. Action granularity: Statements generally perform one action per line. Reading flow: Consistent indentation and spacing aid readability, but the unconventional infinite-loop header, empty catch block, and incomplete boundaries interrupt the flow.