Sample
Scalabrio100
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 37.7Δ 15.3 |
| Scalabrino | 0.171 | 0–1; higher is more readable | 11.1Δ 42.0 |
| Dorn | 0.002 | 0–1; higher is more readable | 0.5Δ 52.5 |
| Mi | 0.006 | 0–1; higher is more readable | 3.5Δ 49.5 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.1Δ 10.1 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 3.0Δ 50.0 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 3.0Δ 50.0 |
| BTTF | 0.352 | 0–1; higher is more readable | 7.0Δ 46.0 |
| Human | 3.67 | 1–5; original rating | 53.0 |
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. | 878.948 | −29.005 |
| Source linesThe number of non-empty source lines. | 20 | +8 |
| 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.824 | −7.237 |
Intercept 8.87 + feature contributions = -19.372 (log-odds).
Score = sigmoid(-19.372) = 0.
| Score | 0.171 |
|---|
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. | 228 | −5.992 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 18.838 | −0.147 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.112 | −0.143 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 20 | −0.038 |
Intercept 0.07 + feature contributions = -6.099 (log-odds).
Score = sigmoid(-6.099) = 0.002.
| Score | 0.006 |
|---|
| Score | 11 |
|---|
Run 1
The code has several readability issues. It contains deeply nested anonymous inner classes and extremely long method chains that make the intent unclear. The repeated casting of `session` to `SessionImplementor` and the multiple chained calls to get the transaction coordinator and JDBC coordinator obscure the actual operations being performed. The empty catch block for the drop table statement is confusing and hides potential issues. Multiple actions are compressed into a few lines, violating the one-action-per-line principle. The reading flow is poor because the reader must mentally parse long method chains before understanding what each line does. While the overall structure follows a logical sequence, the implementation lacks clarity and conciseness.
Run 2
The code suffers from poor readability due to deep nesting, long lines, and repetitive access chains. The intent (drop and recreate a table) is obscured by verbose JDBC coordinator calls, and action granularity is poor with multiple actions per line. Structure lacks helper methods or extracted variables. Reading flow is disrupted by excessive chaining and redundant casts. While it is syntactically valid, it is unnecessarily long and tangled.
Run 3
The code has several readability issues. Structure is tangled: the anonymous Work class contains a long chain of nested method calls, making the intent hard to grasp. Nesting depth is moderate but the repeated cast and call chain ((SessionImplementor)session).getTransactionCoordinator().getJdbcCoordinator() inflates line length and obscures the action. Clarity of intent is low — the drop/create table logic is buried inside try/catch with an ignored exception, and the anonymous class hides the workflow. Code length is unnecessarily long due to repetitive chains that could be extracted into variables. Action granularity suffers: multiple operations are crammed into single lines. Reading flow is disorganized, as the reader must parse deeply nested calls before understanding what each statement does. Overall, the code is functional but difficult to scan and modify safely.
Run 1
Code Structure: The lifecycle hook follows a logical sequence: open a session, drop and recreate a table, release the statement, and close the session. However, repeated coordinator access obscures the structure. Nesting: The anonymous Work implementation and try/catch introduce moderate nesting for a simple task. Clarity of intent: The SQL makes the table-reset purpose clear, but the abbreviated variable st and silently ignored exception reduce clarity. Code length: The method is reasonably short, though repeated casts and long method chains make it unnecessarily verbose. Action granularity: Most statements perform one action per line, but lengthy chained calls and embedded SQL increase visual density. Reading flow: Execution proceeds naturally, yet uneven formatting, long lines, and the empty catch block interrupt scanning.
Run 2
Code Structure: The lifecycle hook follows a logical sequence: invoke the superclass, open a session, recreate a table, and close the session. Nesting: The anonymous Work implementation and try/catch introduce moderate nesting. Clarity of intent: The SQL makes table recreation clear, but the abbreviated variable 'st', unused connection parameter, and silently ignored exception obscure details. Code length: The method is relatively short, yet repeated casts and long coordinator-access chains add unnecessary verbosity. Action granularity: Most statements perform one action per line, though chained calls and lengthy inline SQL make individual lines dense. Reading flow: Execution proceeds naturally, but long lines, repetition, and the empty catch block interrupt readability; named helpers or local coordinator variables would improve it.
Run 3
Code Structure: The sequence is logically organized: invoke the superclass hook, open a session, recreate the table, release the statement, and close the session. Nesting: The anonymous Work implementation and try/catch introduce moderate nesting for a short operation. Clarity of intent: The SQL makes table recreation clear, but the vague variable name 'st', unused connection parameter, and silently ignored exception obscure details. Code length: Repeated casts and long coordinator call chains make the code unnecessarily verbose; a local coordinator variable would help. Action granularity: Most lines perform one action, although long chained expressions make individual actions harder to parse. Reading flow: Execution proceeds naturally, but lengthy lines, embedded SQL, and the empty catch block interrupt scanning.