Sample
Scalabrio81
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.33 | 0–1; higher is more readable | 88.4Δ 0.5 |
| Scalabrino | 0.603 | 0–1; higher is more readable | 59.8Δ 28.1 |
| Dorn | 0.487 | 0–1; higher is more readable | 55.8Δ 32.2 |
| Mi | 0.674 | 0–1; higher is more readable | 91.0Δ 3.0 |
| LLOC | 6 | Logical lines; fewer is more readable | 86.9Δ 1.0 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 72.9Δ 15.1 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 29.4 |
| BTTF | 0.753 | 0–1; higher is more readable | 97.0Δ 9.0 |
| Human | 4.33 | 1–5; original rating | 87.9 |
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.844 | −7.267 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 215.493 | −7.111 |
| Source linesThe number of non-empty source lines. | 12 | +4.8 |
Intercept 8.87 + feature contributions = -0.708 (log-odds).
Score = sigmoid(-0.708) = 0.33.
| Score | 0.603 |
|---|
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. | 133 | −1.968 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 133 | +1.341 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 12 | +0.611 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 11 | −0.357 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 10.888 | −0.258 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.108 |
Intercept 0.07 + feature contributions = -0.053 (log-odds).
Score = sigmoid(-0.053) = 0.487.
| Score | 0.674 |
|---|
| Score | 6 |
|---|
Run 1
The code is generally readable with a clear structure and purpose. It follows a common test pattern: setup, action, assertion, teardown. Naming is clear ('s', 'expected'), and indentation is standard. However, the inner query string is long and complex, making that specific line harder to parse. The 'catch' block is minimal, which is fine, but the action line combines query creation, execution, and list retrieval, reducing action granularity slightly. The assertion message could be more descriptive. Overall, the intent is clear: verify that a fetch join in a subquery fails.
Run 2
The code is moderately readable. It has a clear structure (setup, action, assertion, cleanup) and flat nesting. The intent of testing that a fetch join in a subquery fails is somewhat clear from the method name and the comment. However, the long query string on a single line reduces readability, and the fail message could be clearer. The catch block is empty except for a comment, which is acceptable but could be more descriptive. Overall, it is concise and logical but could benefit from better formatting and messaging.
Run 3
The code is generally readable, with a clear structure: setup, action, assertion, and cleanup. The test intent is obvious from the method name and the fail message. Nesting is minimal, with only a try-catch block. However, readability is slightly reduced by the long HQL query string embedded directly in the method, which makes the line dense and harder to parse. Additionally, the method includes multiple actions on some lines (e.g., opening session and beginning try). The catch block is concise but lacks a comment explaining why the exception is expected, though the fail message compensates. Overall, the code is understandable but could be improved by extracting the query into a named constant and separating actions onto distinct lines.
Run 1
Code Structure: The test is logically organized into session setup, query execution, failure assertion, expected exception handling, and cleanup. Nesting: A single try/catch keeps nesting shallow. Clarity of intent: The test name and failure message clearly establish that fetch joins in subqueries must fail; the terse session variable and dense query slightly reduce clarity. Code length: Concise, with little unnecessary code. Action granularity: Most lines perform one action, although query creation and execution are chained on one long line. Reading flow: The sequence is natural, and the expected-behavior comment explains the empty catch block. Cleanup outside a finally block makes exception-path behavior less explicit.
Run 2
Code Structure: The test follows a logical setup, execution, expected-exception check, and cleanup sequence, though closing the session outside a finally block weakens cleanup structure. Nesting: A single try/catch keeps nesting shallow. Clarity of intent: The descriptive test name, failure message, and expected-exception comment clearly communicate the purpose; the variable name 's' is less descriptive. Code length: The test is concise with little unnecessary code, but the long query line is harder to scan. Action granularity: Most lines perform one action, although query creation and execution are chained together. Reading flow: The sequence is natural and easy to follow, with minor readability costs from the dense query and inconsistent spacing.
Run 3
Code Structure: The test follows a logical setup, execution, expected-failure check, and cleanup sequence, though session cleanup would be clearer and safer in a finally block. Nesting: A single try/catch keeps nesting shallow. Clarity of intent: The descriptive test name, failure message, and expected-exception comment clearly communicate the purpose; the variable name 's' is less descriptive. Code length: The test is concise without unnecessary boilerplate. Action granularity: Most lines perform one action, although query creation and execution are chained on one long line. Reading flow: The sequence is natural and easy to follow, but the lengthy inline query slightly interrupts readability.