Sample

Scalabrio94

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.22
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
55.8Δ 28.4
Scalabrino0.4850–1; higher is more readable
47.7Δ 20.4
Dorn0.2450–1; higher is more readable
32.2Δ 4.8
Mi0.0750–1; higher is more readable
29.1Δ 1.8
LLOC13Logical lines; fewer is more readable
53.0Δ 25.6
DeepSeek V4 Pro10.330–20; mean of three runs
21.1Δ 6.3
GPT-6.1 Sol150–20; mean of three runs
19.6Δ 7.8
BTTF0.5140–1; higher is more readable
44.2Δ 16.8
Human3.221–5; original rating
27.4

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.808.518−26.681
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.806−7.209

Intercept 8.87 + feature contributions = -13.02 (log-odds).
Score = sigmoid(-13.02) = 0.

Score0.485

Feature contributions

FeatureValueContribution
(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.180−3.959
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.180+2.1
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.28+0.231
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.28+0.045
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.28.735−0.008
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.097−0.004

Intercept 0.07 + feature contributions = -1.127 (log-odds).
Score = sigmoid(-1.127) = 0.245.

Score0.075
Score13
Run 1

The code has adequate structure and some clarity of intent, but suffers from excessive nesting and overly verbose method chaining. The anonymous inner class forces three levels of nesting, and the multi-line chained call to prepare the statement is hard to parse. While each action is generally on its own line, the long chained expression violates the 'one action per line' principle in spirit. The reading flow is interrupted by the deeply embedded cast and chained calls. The purpose is clear (testing SQL grammar failure) but the implementation obscures it with boilerplate. Improvements: extract a helper method for statement preparation, reduce nesting by using a lambda, and avoid multiple actions on one line.

Run 2

The code has a logical test structure with minimal nesting, but readability is severely hindered by extremely long method chain calls that break line wrapping and create visual clutter. While each action is mostly on its own line, the dense nested calls reduce clarity. The anonymous inner class adds complexity and shifts the main test flow away from the reader. The intent to test a bad grammar SQL statement is clear, but the implementation obscures it with verbose, deeply chained invocations. There is some separation between setup, action, and cleanup, but the overall reading flow is interrupted by the unwieldy inline Work implementation. The test could be much more concise and scannable with extracted helper methods or variables to clarify intent.

Run 3

The code is moderately readable but has several issues. The method name 'testBadGrammar' is clear, but the overall structure is tangled due to a deeply nested anonymous Work class containing an execute method with a try-catch-finally block. Nesting reaches 4+ levels, making the flow harder to follow. Action granularity is poor in places: multiple chained method calls on long lines (e.g., retrieving the statement preparer) reduce clarity and require horizontal scrolling. Intent is somewhat clear—test that querying a non-existent table fails—but the clutter obscures the core purpose. Code length is acceptable but verbose due to inner class boilerplate. Reading flow is unnatural; the test logic is buried inside callback and exception handling rather than presented linearly. Overall, the code would benefit from extracting the Work into a separate method or class, breaking chained calls into intermediate variables, and reducing nesting.

Run 1

Code Structure: Logically organized into session setup, invalid-query execution, expected-exception handling, and cleanup. Nesting: The anonymous Work implementation and try/catch/finally introduce moderate nesting that makes a small test harder to scan. Clarity of intent: The method name, SQL, comments, and failure message clearly communicate the expected SQL grammar error, though tbl_no_there is informal. Code length: Mostly concise, but repeated casts and lengthy coordinator access chains add unnecessary visual complexity. Action granularity: Statements generally perform one action per line, although the long method chains combine several access steps. Reading flow: Execution follows a natural setup-test-cleanup sequence, but heavy indentation, awkward wrapping, and long lines interrupt readability.

Run 2

Code Structure: The test follows a logical setup, execution, verification, cleanup sequence, with statement cleanup in finally. Nesting: The anonymous Work implementation and try/catch/finally create moderate nesting that adds visual complexity. Clarity of intent: The test name, nonexistent-table query, failure message, and expected-exception comment clearly communicate the purpose. Code length: Reasonably short, but repeated casts and lengthy coordinator chains add avoidable verbosity. Action granularity: Most lines perform one action, although the long preparation and extraction expressions combine several access steps. Reading flow: The overall sequence is natural, but deeply chained calls, long lines, and anonymous-class formatting interrupt scanning. Session cleanup outside finally also makes the lifecycle less clearly robust.

Run 3

Code Structure: The test has a logical setup, execution, expected-exception check, cleanup, and teardown sequence. Nesting: The anonymous Work implementation and try/catch/finally introduce moderate nesting that makes the core test harder to scan. Clarity of intent: The test name, SQL comment, fail message, and expected-exception comment clearly communicate the purpose; the abbreviated variable ps is less descriptive. Code length: Reasonably short, but repeated casts and long coordinator method chains add verbosity. Action granularity: Most statements perform one action per line, although the long preparation and extraction expressions bundle several accessor calls. Reading flow: Execution proceeds naturally, but deeply indented blocks and lengthy lines interrupt readability.