Sample
Scalabrio95
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.146 | 0–1; higher is more readable | 87.4Δ 21.4 |
| Scalabrino | 0.653 | 0–1; higher is more readable | 66.3Δ 0.3 |
| Dorn | 0.613 | 0–1; higher is more readable | 67.8Δ 1.8 |
| Mi | 0.762 | 0–1; higher is more readable | 95.0Δ 28.9 |
| LLOC | 4 | Logical lines; fewer is more readable | 93.7Δ 27.6 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 38.7Δ 27.4 |
| GPT-6.1 Sol | 16.67 | 0–20; mean of three runs | 45.2Δ 20.9 |
| BTTF | 0.682 | 0–1; higher is more readable | 91.0Δ 24.9 |
| Human | 3.89 | 1–5; original rating | 66.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. | 232.193 | −7.662 |
| 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.65 | −6.976 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -1.768 (log-odds).
Score = sigmoid(-1.768) = 0.146.
| Score | 0.653 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100 | +0.809 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 10 | +0.682 |
| 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. | 100 | −0.57 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| 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. | 8.832 | −0.286 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.119 | −0.217 |
Intercept 0.07 + feature contributions = 0.46 (log-odds).
Score = sigmoid(0.46) = 0.613.
| Score | 0.762 |
|---|
| Score | 4 |
|---|
Run 1
The code is clear and concise, with a straightforward structure. It follows a common pattern for resource cleanup in Java, using a null check and try-catch to safely release a statement. The nesting is minimal (one if and one try-catch), and the intent is obvious. The only minor issues are the long method chain inside the cast and method call, which slightly reduces readability, and the empty catch block with only a comment, which is acceptable for this use case but could be improved with a logger.
Run 2
This code is highly readable due to its simple, flat structure and clear intent. The method performs a single task—releasing a PreparedStatement if not null—with minimal nesting (one if-block and one try-catch). Action granularity is appropriate: the null check and release are on separate logical lines. The cast and method chain in the release line are dense but acceptable given the domain context. The empty catch block with a comment is a minor readability concern, as it suppresses errors without logging, but the comment clearly signals intent. Overall, the code is concise, well-named, and easy to understand.
Run 3
The code is short and its overall purpose—releasing a PreparedStatement while ignoring exceptions—is easy to grasp. However, readability is hurt by poor structure and clarity. The single line inside the try block performs too many actions at once: casting session, getting the transaction coordinator, getting the JDBC coordinator, and calling release. This violates action granularity and makes the line difficult to parse. The use of a broad Throwable catch with an empty comment is ambiguous; it does not explain why exceptions should be ignored or what types are expected. The method name and parameter names are clear, and nesting is minimal, which helps. But the lack of line breaks within the long method chain, the unexplained exception swallowing, and the grouped operations reduce the reading flow. Overall, the code is compact but requires effort to understand fully.
Run 1
Code Structure: Logically organized around a null check and resource release. Nesting: Two shallow levels make control flow easy to follow, though an early return could flatten it. Clarity of intent: The method name clearly conveys its purpose, but the abbreviation ps and broad, silently ignored Throwable reduce transparency. Code length: Short and focused, with no substantial unnecessary code. Action granularity: One main action per statement, although the cast and chained coordinator calls concentrate several operations on one line. Reading flow: Natural progression from validation to release and exception handling; the long method chain slightly interrupts readability.
Run 2
Code Structure: Logically organized around a null check and guarded release operation. Nesting: Two levels of nesting are modest and easy to follow, though an early return could flatten the method. Clarity of intent: The method name and release call clearly convey the purpose; the abbreviated parameter name and unexplained suppression of all Throwables reduce clarity. Code length: Short and focused, with no unnecessary implementation. Action granularity: One main action per line, although the cast and chained coordinator calls make the release expression dense. Reading flow: Natural progression from validation to release to exception handling; the empty catch and generic comment leave the rationale for ignoring failures unclear.
Run 3
Code Structure: The method is logically organized around checking and releasing a statement. Nesting: The null check and try/catch introduce modest, manageable nesting. Clarity of intent: The method name and release call make the purpose clear, though the abbreviated parameter name and broad, silently ignored Throwable obscure failure handling. Code length: The implementation is concise without unnecessary logic. Action granularity: Each statement performs one primary action, but the cast and chained coordinator lookups compress several operations into one line. Reading flow: Execution proceeds naturally from the guard to resource release and exception handling; extra spacing and the long call chain slightly reduce scanning ease.