Sample
Dorn/java/198
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 20.3Δ 9.7 |
| Scalabrino | 0.294 | 0–1; higher is more readable | 20.5Δ 10.0 |
| Dorn | 0.011 | 0–1; higher is more readable | 1.7Δ 8.9 |
| Mi | 0.032 | 0–1; higher is more readable | 5.3Δ 5.3 |
| LLOC | 30 | Logical lines; fewer is more readable | 11.4Δ 0.8 |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs | 46.4Δ 35.8 |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs | 37.7Δ 27.2 |
| BTTF | 0.497 | 0–1; higher is more readable | 44.3Δ 33.7 |
| Human | 2.45 | 1–5; original rating | 10.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. | 1631.867 | −53.852 |
| 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.229 | −7.843 |
Intercept 8.87 + feature contributions = -32.825 (log-odds).
Score = sigmoid(-32.825) = 0.
| Score | 0.294 |
|---|
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. | 162.961 | −3.237 |
| 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. | 37 | −0.428 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 31 | +0.335 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.915 | +0.288 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.093 | +0.034 |
Intercept 0.07 + feature contributions = -4.512 (log-odds).
Score = sigmoid(-4.512) = 0.011.
| Score | 0.032 |
|---|
| Score | 30 |
|---|
Run 1
The code is moderately readable. It follows a clear, linear sequence of Selenium actions with consistent patterns (click, wait, load modules), which aids comprehension. Each action is generally on its own line, improving granularity. However, several issues reduce readability: repeated hardcoded XPath strings obscure intent, the polling loop with `Thread.sleep` and empty catch block is awkward and hard to follow, and `RuntimeVariables.replace` is used inconsistently. The flat structure is good, but the loop’s logic and lack of abstraction make the code longer and harder to scan. While the overall flow is understandable, it would benefit from helper methods and better wait handling.
Run 2
The code has some positive attributes: flat structure with minimal nesting (except for the polling loop), one action per line, and a consistent pattern of click, wait, and load modules. However, it suffers from several readability issues. The repeated sequence of selenium.clickAt(), waitForPageToLoad(), and loadRequiredJavaScriptModules() creates unnecessary code length and repetition that could be extracted into helper methods. The XPath selectors are long and cryptic, making intent unclear without deep domain knowledge. The polling loop with try-catch and empty exception handling is a common but unclear pattern that obscures its purpose. Action granularity is generally good, but the file path on a single line is extremely long and hard to read. The reading flow is mechanical but lacks abstraction, making it difficult to quickly grasp the test scenario's business logic. The code reads more like a raw recording of browser actions than a well-structured test.
Run 3
The code is a linear sequence of UI automation steps, which makes individual actions identifiable, but it suffers from several readability issues. Hard-coded XPath selectors and repeated RuntimeVariables.replace() calls obscure intent and add noise. The polling loop for element visibility is the clearest section, though it still relies on exception swallowing and an arbitrary timeout. There is significant duplication of waitForPageToLoad and loadRequiredJavaScriptModules after every action, which could be abstracted. Multiple actions are packed into single logical steps (click, wait, load), reducing action granularity. Long lines, especially the file path, hurt reading flow. Overall, the code works but requires effort to parse and maintain.
Run 1
Code Structure: The script follows a logical search, navigation, upload, and save sequence, but lacks helper methods to group repeated operations. Nesting: Most code is flat; the polling loop introduces moderate nesting through try/catch and conditionals. Clarity of intent: Selenium method names and document labels convey the workflow, but positional XPath selectors, unexplained timeout values, and an empty catch obscure details. Code length: Repeated page-load waits, JavaScript initialization, and RuntimeVariables.replace calls add verbosity; the hardcoded file path is cumbersome. Action granularity: Each statement generally performs one action, with sensible multiline formatting for longer calls. Reading flow: Execution proceeds naturally, but repetitive setup calls interrupt the main workflow, and the polling loop requires extra attention to understand its exit and timeout behavior.
Run 2
Code Structure: The sequence is logically organized around navigation and document upload, but repeated page-load and module-loading calls would benefit from helper methods. Nesting: Most code is flat; the polling loop introduces moderate nesting through try and conditional blocks. Clarity of intent: UI labels and field values make the workflow understandable, although brittle XPath selectors, unexplained timeout values, and an empty catch obscure details. Code length: Reasonably short, but repetitive Selenium calls and a long hard-coded file path reduce conciseness. Action granularity: Each statement performs one main action, with multiline arguments generally aiding readability. Reading flow: Execution follows a natural user interaction sequence, but the inline polling implementation interrupts the workflow, and additional spacing or descriptive helpers would better distinguish phases.
Run 3
Code Structure: The script follows a logical navigation-and-upload sequence, but repeated click/wait/module-loading blocks lack helper abstractions. Nesting: Most code is flat; the polling loop adds moderate nesting through try/catch and conditionals. Clarity of intent: UI labels and field values make the workflow understandable, but positional XPath selectors, magic timeout values, and an empty catch obscure details. Code length: Reasonably short, though repetitive synchronization calls and a long hard-coded file path add clutter. Action granularity: Each statement generally performs one action, with sensible line wrapping. Reading flow: Execution proceeds naturally from searching to selecting a folder and uploading a document, but inconsistent visual grouping and the verbose polling block interrupt the flow.