Sample
Dorn/java/192
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.925 | 0–1; higher is more readable | 90.0Δ 31.5 |
| Scalabrino | 0.933 | 0–1; higher is more readable | 97.7Δ 39.2 |
| Dorn | 0.675 | 0–1; higher is more readable | 62.4Δ 3.9 |
| Mi | 0.69 | 0–1; higher is more readable | 81.1Δ 22.6 |
| LLOC | 4 | Logical lines; fewer is more readable | 82.7Δ 24.2 |
| DeepSeek V4 Pro | 5 | 0–20; mean of three runs | 10.9Δ 47.6 |
| GPT-6.1 Sol | 10.33 | 0–20; mean of three runs | 12.0Δ 46.5 |
| BTTF | 0.643 | 0–1; higher is more readable | 84.4Δ 25.9 |
| Human | 3.44 | 1–5; original rating | 58.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) |
|---|---|---|
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.298 | −6.447 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 118.536 | −3.912 |
Intercept 8.87 + feature contributions = 2.512 (log-odds).
Score = sigmoid(2.512) = 0.925.
| Score | 0.933 |
|---|
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. | 42 | +1.886 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.148 | −0.492 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.953 | −0.271 |
Intercept 0.07 + feature contributions = 0.732 (log-odds).
Score = sigmoid(0.732) = 0.675.
| Score | 0.69 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly unreadable due to missing context and poor structure. It opens mid-logic with a fail() call, suggesting a truncated or tangled control flow. The try-catch block swallows exceptions silently, hiding potential failures and making debugging difficult. Nesting is shallow but the intent is ambiguous without surrounding loops or conditionals. Action granularity is acceptable (one primary action per line), but the overall flow is disorganized and lacks comments or error handling logic. Variable names and function calls like 'selenium.isVisible' hint at web automation, but the snippet is too fragmentary to establish clear purpose. Code length is short, yet conciseness does not compensate for the absence of explanatory structure or visible control mechanisms.
Run 2
The code snippet is difficult to evaluate due to its incomplete nature, but it shows several readability issues. The structure appears tangled, starting with a stray closing brace and fail() call, suggesting disorganized code. Nesting is moderate but the empty catch block is a significant red flag, hiding potential errors. Clarity of intent is low - the purpose of checking visibility of '//section' is unclear without context, and swallowing exceptions makes debugging difficult. Code length is acceptable but action granularity is mixed, with multiple actions on the same logical level. Reading flow is disrupted by the incomplete structure and missing context. The code would benefit from proper exception handling, meaningful variable names, and better organization. Overall, this snippet demonstrates poor readability practices.
Run 3
This code snippet has significant readability issues. The structure is fragmented and lacks surrounding context, making it difficult to understand the overall logic. Exception handling is empty (swallowing errors silently), which obscures intent and makes debugging harder. Variable names like 'selenium' are somewhat ambiguous, and the hardcoded XPath '//section' is unclear. Nesting is moderate (try-catch inside a loop), but the empty catch block is a major code smell. The snippet appears disorganized, likely part of a larger, poorly structured method. It lacks comments explaining the timeout and visibility check logic. Overall, the code fails to clearly communicate its purpose, has questionable exception handling, and appears unnecessarily convoluted for what seems like a simple wait-for-element operation.
Run 1
Code Structure: The timeout failure and visibility check are separated logically, but the fragment starts mid-block and lacks enclosing context. Nesting: The try/if nesting is modest, though the initial indentation suggests additional unseen levels. Clarity of intent: Checking for a visible section and breaking is understandable, but the enclosing loop, timeout condition, and reason for silently ignoring exceptions are unclear. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one action. Reading flow: The local sequence is easy to follow, but unmatched opening context and the empty catch block interrupt comprehension.
Run 2
Code Structure: The visible try/catch is organized, but the fragment starts mid-block and contains a break without its enclosing loop, limiting context. Nesting: The conditional inside the try adds modest nesting; excessive indentation makes the fragment harder to scan. Clarity of intent: The visibility check and timeout failure suggest waiting for a section, but the empty catch silently suppresses exceptions without explaining why. Code length: The fragment is short with little unnecessary content. Action granularity: Each statement performs a single action. Reading flow: The condition and break are straightforward, but missing surrounding code, unexplained exception handling, and the disconnected timeout failure interrupt understanding.
Run 3
Code Structure: The try/catch is organized, but the fragment starts mid-block and lacks context for fail and break. Nesting: Moderate nesting remains easy to follow. Clarity of intent: The visibility check suggests waiting for a section, but the empty catch silently ignores errors and obscures intent. Code length: Concise, without obvious redundancy. Action granularity: Each statement performs one action. Reading flow: The truncated opening, unexplained loop exit, and excessive indentation interrupt otherwise straightforward flow.