Sample
Dorn/java/194
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 27.6Δ 8.1 |
| Scalabrino | 0.282 | 0–1; higher is more readable | 19.8Δ 0.3 |
| Dorn | 0.043 | 0–1; higher is more readable | 5.0Δ 14.5 |
| Mi | 0.044 | 0–1; higher is more readable | 7.0Δ 12.5 |
| LLOC | 26 | Logical lines; fewer is more readable | 18.8Δ 0.7 |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs | 31.2Δ 11.7 |
| GPT-6.1 Sol | 10 | 0–20; mean of three runs | 10.2Δ 9.3 |
| BTTF | 0.58 | 0–1; higher is more readable | 69.1Δ 49.6 |
| Human | 2.76 | 1–5; original rating | 19.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. | 1389.744 | −45.862 |
| 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.042 | −7.562 |
Intercept 8.87 + feature contributions = -24.554 (log-odds).
Score = sigmoid(-24.554) = 0.
| Score | 0.282 |
|---|
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 |
| 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. | 104 | −0.74 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 36 | −0.405 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.867 | +0.287 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.102 | −0.05 |
Intercept 0.07 + feature contributions = -3.115 (log-odds).
Score = sigmoid(-3.115) = 0.043.
| Score | 0.044 |
|---|
| Score | 26 |
|---|
Run 1
The code has significant readability issues. There is an orphaned line at the beginning (selenium.getValue with no assignment), suggesting incomplete or copy-pasted code. The structure is a flat sequence of Selenium commands without grouping or helper methods, making the intent difficult to discern. The polling loops are duplicated with identical logic, violating DRY principles. Exception handling is an empty catch block, which hides failures and makes debugging harder. Magic numbers (90, 1000) and long XPath selectors reduce clarity. Variable names like 'second' are acceptable in context but could be more descriptive. Action granularity is mostly one action per line, which is good, but the overall flow lacks organization. The code reads as a disorganized test script rather than a maintainable piece of software.
Run 2
The code has moderate readability issues. Structure is somewhat logical with wait loops separated from the main flow, but nesting and repetition reduce clarity. The two timeout loops are duplicated and use for(;;) with a manual timeout, which obscures intent. Clarity of intent is limited: long XPath selectors, hardcoded strings, and copied assertions make it hard to understand what each step does. Code length is unnecessarily long due to repeated wait logic; extracting a helper would improve it. Action granularity is mostly one action per line, which is good, but lines are quite long, hurting reading flow. The empty catch blocks hide exceptions, making debugging harder. Reading flow suffers from inconsistent indentation (first line has extra tabs) and inconsistent use of RuntimeVariables.replace. Overall, the code works but would benefit from refactoring waits into a method, using constants for selectors, and handling exceptions explicitly.
Run 3
The code is difficult to read due to several factors. Structure is weak: there is a dangling method call at the start and duplicated polling logic. XPath selectors are extremely long and cryptic, obscuring intent. The wait loops use infinite `for` with magic numbers (90 seconds) and silent exception swallowing, which harms clarity and hides failures. Action granularity is mixed—some lines chain multiple operations while others are verbose. Reading flow is disrupted by repetition and inconsistent formatting. Positives include flat nesting and mostly one action per line. However, unclear selectors, poor error handling, and redundant code make it hard to maintain or understand at a glance.
Run 1
Code Structure: The Selenium workflow is sequential and logically grouped, but duplicated polling loops and incomplete opening and closing statements weaken organization. Nesting: Most actions are flat, while polling introduces moderate nesting through loops, try blocks, and conditionals. Clarity of intent: Sending a message and checking success are recognizable, but positional XPath selectors, repetitive test data, and silently swallowed exceptions obscure details. Code length: Repeated waits and long literals add unnecessary bulk; helper methods and named selectors would improve concision. Action granularity: Most statements perform one action, although wrapped arguments make individual operations span several lines. Reading flow: The interaction sequence is natural, but inconsistent indentation, verbose assertions, and the truncated boundaries interrupt readability.
Run 2
Code Structure: The test follows a logical compose-and-send sequence, but duplicated polling logic and incomplete boundaries weaken organization. Nesting: Wait loops contain moderately nested try/if blocks, though the main interaction sequence is flat. Clarity of intent: Selenium method names and message labels reveal the purpose, but positional XPath selectors, hard-coded recipient strings, and empty catch blocks obscure details. Code length: Repeated waits, selectors, and long assertions add avoidable verbosity; helper methods and named locators would improve concision. Action granularity: Most statements perform one action, making individual steps easy to distinguish. Reading flow: Interactions and assertions generally follow execution order naturally, but inconsistent wrapping, the malformed opening statement, and the truncated final loop interrupt readability.
Run 3
Code Structure: The steps follow a logical UI-test sequence, but duplicated polling loops and an incomplete fragment weaken organization. Nesting: Polling uses moderate nesting through loops, try blocks, and conditionals. Clarity of intent: Selenium method names and message text communicate the workflow, but positional XPath selectors, empty catch blocks, and generic timeout messages obscure details. Code length: Repeated waiting logic and long recipient strings add verbosity that helper methods and constants could reduce. Action granularity: Most statements perform one action, with reasonable multiline formatting for calls. Reading flow: The interaction sequence is natural, but inconsistent indentation, lengthy assertions, and the abrupt beginning and ending interrupt readability.