Sample
Dorn/java/202
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 45.7Δ 16.4 |
| Dorn | 0.193 | 0–1; higher is more readable | 15.9Δ 46.2 |
| Mi | 0.511 | 0–1; higher is more readable | 53.5Δ 8.6 |
| LLOC | 13 | Logical lines; fewer is more readable | 50.8Δ 11.3 |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs | 55.8Δ 6.3 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 19.9Δ 42.2 |
| BTTF | 0.496 | 0–1; higher is more readable | 43.7Δ 18.4 |
| Human | 3.48 | 1–5; original rating | 62.1 |
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. | 787.48 | −25.987 |
| 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. | 4.924 | −7.386 |
Intercept 8.87 + feature contributions = -12.503 (log-odds).
Score = sigmoid(-12.503) = 0.
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 |
| 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. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.13 | −0.318 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| 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. | 86.903 | −0.016 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.648 | +0.005 |
Intercept 0.07 + feature contributions = -1.429 (log-odds).
Score = sigmoid(-1.429) = 0.193.
| Score | 0.511 |
|---|
| Score | 13 |
|---|
Run 1
The code is moderately readable but has several issues. It starts mid-block with an assignment, lacks context, and uses a broad Exception catch. Nesting is shallow, which is good, and action granularity is mostly reasonable. However, the 'if-else' for list sorting is redundant and could be simplified. The 'finally' block handles caching but is not immediately clear without surrounding context. Variable names like 'q' are too short, reducing clarity of intent. Overall structure is logical but incomplete in this snippet, making it harder to evaluate. The code would benefit from a more descriptive query variable name and a clearer explanation of the caching logic.
Run 2
The code shows moderate readability. Structure is somewhat logical with a try-catch-finally block and clear session handling, but the opening line appears as a fragment from a larger conditional context, making the intent unclear. Nesting is reasonable—only two levels deep. Clarity of intent is mixed: the purpose of the conditional sorting logic is understandable, but the initial SQL concatenation and the surrounding control flow lack context. Code length is concise for the operation, but some lines are dense, especially the QueryUtil.list calls with multiple arguments. Action granularity is mostly one action per line, though the QueryUtil.list invocations pack several parameters. Reading flow is decent, with logical progression from session creation to query execution to result handling. However, the fragmentary opening and lack of variable declarations reduce overall comprehension. The empty catch block's transformation via processException is standard, but the finally block's cache handling is clear.
Run 3
The code is moderately readable but has several weaknesses. The structure is logical: it builds a SQL query, opens a session, executes it, handles exceptions, and caches results. Nesting is shallow - only two levels - and the try/catch/finally flow is standard. However, clarity of intent is hindered by generic naming (e.g., 'sql', 'q', 'list') and an unfinished opening fragment ('sql = ...' appears to continue from prior code not shown). Action granularity is mostly one action per line, but some lines are densely packed with multiple chained calls. Reading flow is natural in the try block but the leading orphaned conditional fragment disrupts it. The 'finally' block mixes null-checking with cache logic without separation. The code is concise but the parameter 'false' in QueryUtil.list and the empty else block reduce understandability.
Run 1
Code Structure: The session lifecycle follows a recognizable try/catch/finally pattern, but the excerpt begins and ends mid-block, obscuring its overall organization. Nesting: Moderate nesting is manageable, though conditional logic inside try and finally adds indentation. Clarity of intent: Query execution, sorting, exception handling, and cache maintenance are identifiable; the abbreviated variable q and missing surrounding context reduce clarity. Code length: Mostly concise, with some duplicated query-list calls. Action granularity: Statements generally perform one action per line, and wrapped arguments remain readable. Reading flow: Execution proceeds naturally from opening the session to retrieving results and handling cleanup, but incomplete boundaries and the abrupt ending disrupt comprehension.
Run 2
Code Structure: Query execution, exception handling, and cleanup/cache handling are logically grouped, but the fragment starts and ends mid-block, obscuring the overall structure. Nesting: Mostly moderate, with conditionals inside try and finally blocks. Clarity of intent: Session creation, query execution, sorting, and caching are recognizable; however, the variable q and boolean argument false provide little context. Code length: Fairly concise, though the two QueryUtil.list calls repeat similar logic. Action granularity: Each statement generally performs one action, and wrapped calls remain readable. Reading flow: Execution proceeds naturally through query creation and result handling, but heavy indentation, missing surrounding code, and the truncated caching branch interrupt comprehension.
Run 3
Code Structure: Session creation, querying, exception handling, and cache management are logically grouped, but the fragment starts and ends mid-block, obscuring the overall structure. Nesting: Moderate nesting within try/finally and conditional branches is manageable. Clarity of intent: Query execution and sorting are recognizable, but names such as q and list, along with the unexplained false argument, reduce clarity. Code length: Mostly concise, though the two QueryUtil.list calls repeat similar logic. Action granularity: Statements generally perform one action per line; wrapped calls remain readable. Reading flow: The execution sequence is natural, but excessive leading indentation, abrupt boundaries, and the unfinished cache branch disrupt comprehension.