Sample

Dorn/java/209

Human rating uses the original dataset scale.

DatasetDorn
Human3.5
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
51.0Δ 13.1
Scalabrino0.6620–1; higher is more readable
70.2Δ 6.1
Dorn0.620–1; higher is more readable
53.8Δ 10.3
Mi0.7470–1; higher is more readable
92.8Δ 28.7
LLOC11Logical lines; fewer is more readable
57.0Δ 7.1
DeepSeek V4 Pro7.670–20; mean of three runs
27.2Δ 36.9
GPT-6.1 Sol130–20; mean of three runs
30.6Δ 33.4
BTTF0.4410–1; higher is more readable
31.5Δ 32.6
Human3.51–5; original rating
64.1

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.077−7.616

Intercept 8.87 + feature contributions = -9.806 (log-odds).
Score = sigmoid(-9.806) = 0.

Score0.662

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.90+0.648
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
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.89.968−0.145
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.101−0.037
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.78+0.006

Intercept 0.07 + feature contributions = 0.49 (log-odds).
Score = sigmoid(0.49) = 0.62.

Score0.747
Score11
Run 1

The code exhibits poor readability across multiple criteria. The most glaring issue is the absence of any import statements or class structure visible — it begins with a stray comment terminator and package declaration, suggesting missing context. The for-loop timeout pattern is unnecessarily verbose and cryptic: the condition `second >= 90` with an empty increment and an empty catch block obscures intent. The try-catch swallows exceptions silently, making debugging impossible. Nesting is moderate but the loop structure is confusing. Action granularity is acceptable (one action per line) but the surrounding logic lacks clarity. The code appears copied from auto-generated test scaffolding without any refactoring for readability. Variable names like 'second' are poorly chosen — 'timeoutSeconds' would be clearer. Overall, this code would be difficult to maintain or review without significant effort to understand its purpose.

Run 2

The code is functional but has readability issues. It uses a common but non-intuitive polling pattern (for loop with timeout, try/catch with empty body) that obscures intent. The structure is sequential, but the loop logic is confusing: the condition 'second >= 90' and the break inside try/catch make the flow hard to follow. There's an empty catch block (a known code smell) and multiple actions per line in the loop. The package and imports are clear, but the test method begins with an unclear polling mechanism before performing the actual test steps. The code is concise, but the polling loop could be extracted into a reusable method with a descriptive name to significantly improve clarity and reduce nesting. Overall, the code works but requires effort to understand.

Run 3

The code shows moderate readability. Structure is logical but the test method lacks sections or helper methods. Nesting is acceptable with only two levels (try-catch inside for loop), but the polling pattern is verbose. Intent is somewhat clear - waiting for an element - but the hardcoded timeout and empty catch block obscure the purpose. Code length is unnecessarily long for a simple wait operation; a WebDriverWait or utility method would be more concise. Action granularity is good, with one action per line. Reading flow suffers from the abrupt loop-with-no-condition pattern (`for (int second = 0;; second++)`) and unclear exception swallowing. The comment header and package declaration suggest generated or boilerplate code, which impacts readability. Overall, it's functional but would benefit from abstraction of the waiting logic and better error handling.

Run 1

Code Structure: The class and test method are logically organized, but the supplied snippet has a stray comment terminator and lacks closing braces. Nesting: The polling loop contains a try block and nested conditionals, creating moderate nesting. Clarity of intent: Opening the page and waiting for a shopping-page link are understandable, but the empty catch silently suppresses exceptions, and the numeric timeout is unexplained. Code length: The snippet is short, though the manual polling logic is verbose compared with a reusable wait helper. Action granularity: Each statement performs one action, making individual steps easy to follow. Reading flow: Consistent indentation and spacing support sequential reading, but the unusual infinite-loop syntax, exception swallowing, and incomplete ending interrupt the flow.

Run 2

Code Structure: The package, imports, class, and test method are logically organized, but the snippet begins with a stray comment terminator and lacks closing braces. Nesting: The loop contains a timeout check and a try block with another conditional, creating moderate nesting. Clarity of intent: Navigation and waiting for a shopping-page link are understandable, but the empty catch silently suppresses errors, and the indefinite loop obscures the polling limit. Code length: Short overall, though the manual polling logic is verbose compared with a dedicated wait helper. Action granularity: Each statement performs one action, making individual steps easy to scan. Reading flow: Execution proceeds naturally from opening the page to loading JavaScript and waiting, with useful whitespace; however, the unusual loop syntax and incomplete ending interrupt readability.

Run 3

Code Structure: The setup and visibility-polling loop are logically grouped, but the fragment starts with a stray comment terminator and lacks closing braces. Nesting: The loop, try block, and conditional introduce moderate nesting for a simple wait operation. Clarity of intent: Selenium calls clearly indicate navigation and waiting for a shopping page link, but the empty catch silently hides errors, and the timeout and polling interval are unexplained literals. Code length: The snippet is short, although a reusable wait helper could express the polling more concisely. Action granularity: Each statement performs one action, and spacing separates the main steps effectively. Reading flow: Execution proceeds naturally from navigation to polling, but the unusual unbounded for-loop and incomplete fragment interrupt readability.