Sample

Scalabrio136

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.67
Lines32

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
10.6Δ 42.5
Scalabrino0.6460–1; higher is more readable
65.3Δ 12.3
Dorn0.2870–1; higher is more readable
37.2Δ 15.8
Mi0.0240–1; higher is more readable
12.6Δ 40.5
LLOC19Logical lines; fewer is more readable
28.4Δ 24.6
DeepSeek V4 Pro12.670–20; mean of three runs
35.2Δ 17.8
GPT-6.1 Sol160–20; mean of three runs
34.7Δ 18.3
BTTF0.4430–1; higher is more readable
23.1Δ 29.9
Human3.671–5; original rating
53.0

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.1588.828−52.431
Source linesThe number of non-empty source lines.32+12.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.868−7.303

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

Score0.646

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.130.969−1.882
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.131+1.309
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.28−0.222
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.32−0.097
Indentation frequencyHow rapidly indentation changes from line to line.19−0.08
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.1−0.032
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.30.879+0.022

Intercept 0.07 + feature contributions = -0.911 (log-odds).
Score = sigmoid(-0.911) = 0.287.

Score0.024
Score19
Run 1

The code has moderate readability with clear test intent, but several issues reduce its score. The structure mixes resource management (Statement, Connection) with business logic without proper cleanup in a finally block, making flow hard to follow. Nesting is acceptable at two levels but indentation is inconsistent (tabs vs spaces). Variable declarations like 's', 'statement', 'connection' are ambiguous. Multiple operations (query execution, parameter setting, list retrieval, assertions) occur in long sequences without helper methods, though each line generally contains one action. Reading flow is disrupted by comments that explain 'what' rather than 'why' and missing blank lines between logical sections. The test lacks setup/teardown separation, making it unnecessarily long for its purpose.

Run 2

The code has a clear overall purpose — testing enum trimming with native SQL and HQL — and the intent is understandable. However, readability is hurt by inconsistent indentation (tabs vs spaces), unnecessary comments that restate the code, and variable type inconsistencies (using both 'final' and var-like declarations without need). The structure is mostly linear, but resource handling is not ideal; Connection, Statement, and Session could be managed more cleanly, reducing potential confusion. Nesting is minimal, which is good, and action granularity is generally reasonable — one query per statement call. Still, the method mixes setup, assertion, and cleanup tasks, which weakens logical organization. The reading flow is only moderately natural due to formatting irregularity. Shortening variable declarations, improving formatting consistency, and extracting setup/teardown logic would make the code notably more readable.

Run 3

The code has moderate readability but suffers from inconsistent indentation, mixing tabs and spaces, and non-idiomatic JPA/Hibernate usage (raw JDBC statements, manual connection handling). The method does multiple things: inserts test data, runs queries, asserts results, and cleans up, reducing clarity of intent. Nesting is flat, and action granularity is mostly one action per line, but the mixed formatting disrupts reading flow. Comments explain some steps, but the use of deprecated methods (e.g., session.connection()) and hardcoded SQL strings adds ambiguity. The test structure would benefit from splitting data setup, assertions, and cleanup into separate helper methods. Variable naming is clear, but the overall structure feels tangled due to formatting inconsistency and unclear separation of concerns.

Run 1

Code Structure: The test follows a logical setup, execution, verification, and cleanup sequence, with comments separating its two checks. Nesting: The method is flat and easy to scan. Clarity of intent: The method name, annotations, and comments clearly identify the enum-trimming behavior being tested, though the abbreviated variable s and positional query parameter are less descriptive. Code length: The code is reasonably concise; repeated assertions and inserts are appropriate for this small test. Action granularity: Each statement performs one primary action, with no crowded multi-statement lines. Reading flow: Execution proceeds naturally, but inconsistent indentation and spacing interrupt visual consistency. Reusing resultList requires tracking its changing contents, and assertions that assume query-result ordering without an explicit order clause make the intended verification less clear.

Run 2

Code Structure: The test is logically organized into setup, insertion, retrieval assertions, filtered-query assertions, and cleanup. Nesting: The method is flat, with no nested control flow. Clarity of intent: The method name, issue annotations, and comments clearly identify the enum-trimming behavior being tested, though the whitespace mechanism relies on implicit CHAR padding. Code length: Appropriate for a focused test, with minor repetition in inserts and assertions. Action granularity: Each statement performs one primary action; chained calls remain manageable. Reading flow: Execution follows a natural sequence, but inconsistent indentation and spacing interrupt visual consistency. The abbreviated session variable, reversed conventional assertEquals argument order, and reliance on unspecified query ordering make interpretation slightly harder. Cleanup is visible but lacks a structured resource-management block.

Run 3

Code Structure: The test is logically organized into setup, retrieval assertions, filtered-query assertions, and cleanup, though these phases could be more clearly separated. Nesting: The method is flat and easy to scan. Clarity of intent: The method name, issue annotations, and comments explain the enum-trimming regression being tested; abbreviated variable names and reliance on implicit CHAR padding slightly obscure details. Code length: The method is reasonably concise, with minor repetition in inserts and assertions. Action granularity: Each statement performs one main action, although chained calls add some visual complexity. Reading flow: Execution proceeds naturally, but inconsistent indentation and spacing interrupt readability. Assuming result ordering without an ORDER BY and placing cleanup only at the end make the test's behavior less explicit.