Sample

Scalabrio98

Human rating uses the original dataset scale.

DatasetScalabrino
Human3
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
11.1Δ 5.8
Scalabrino0.3480–1; higher is more readable
30.2Δ 13.3
Dorn0.1160–1; higher is more readable
18.6Δ 1.8
Mi0.0630–1; higher is more readable
26.1Δ 9.3
LLOC18Logical lines; fewer is more readable
31.2Δ 14.3
DeepSeek V4 Pro7.670–20; mean of three runs
9.5Δ 7.3
GPT-6.1 Sol150–20; mean of three runs
19.6Δ 2.8
BTTF0.480–1; higher is more readable
33.7Δ 16.8
Human31–5; original rating
16.8

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.1539.119−50.791
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.851−7.277

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

Score0.348

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.109.967−0.993
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.128−0.304
Indentation frequencyHow rapidly indentation changes from line to line.30+0.301
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.30−0.268
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.30−0.026
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.28.784−0.007

Intercept 0.07 + feature contributions = -2.031 (log-odds).
Score = sigmoid(-2.031) = 0.116.

Score0.063
Score18
Run 1

The code has a clear overall structure with setup and verification separated, but readability suffers from excessive casting and deep nesting. Action granularity is mixed - some lines are concise while others contain multiple operations. The anonymous inner classes create nesting depth, and the repeated casting within method calls obscures intent. Lines like `assertNull( ( ( Student ) resultList.get( 1 ) ).getPreferredCourse() );` contain multiple operations (cast, get, method call) on one line. Reading flow is disrupted by scattered casts and the inline anonymous class definitions. The code would benefit from extracting local variables for cast results, reducing nesting, and improving naming clarity.

Run 2

The code is a test method with a clear purpose, but readability suffers from excessive nesting and repetitive casts. The anonymous inner classes add structural complexity, and multiple actions are packed into single lines, reducing clarity. Deeply nested assertions like `( ( Student ) resultList.get( 1 ) ).getPreferredCourse()` require careful parsing. The method name is descriptive but overly long. While the logical flow follows a typical arrange-act-assert pattern, the heavy use of parentheses and inline conditionals makes it harder to scan. Formatting is inconsistent (spaces inside parentheses), and the long method creates a dense block of code. The intent is understandable for a developer familiar with Hibernate testing, but the verbosity and lack of extracted helpers or variables lower the overall readability.

Run 3

The code has a clear overall purpose and some logical structure via anonymous inner classes, but readability suffers significantly. The method name is overly long, and the nested anonymous classes add indirection. Assertions are heavily nested with multiple casts and parenthesized expressions, increasing cognitive load. Several lines combine multiple actions (casting, method calls, assertions), reducing clarity. While the intent is understandable to Hibernate developers, the repetitive casting and verbose structure obscure the logic. Formatting is inconsistent, and the reading flow is disrupted by deep parentheses and long lines. Concise helper methods or extracted setup would improve clarity.

Run 1

Code Structure: Query execution and result checking are logically separated into two callbacks, followed by test execution. Nesting: Anonymous classes add moderate nesting, but only one conditional appears within the checks. Clarity of intent: The descriptive test name, explicit HQL, and assertions make the purpose clear; raw types, repeated casts, and indexed access obscure individual checks. Code length: Reasonably compact, though repeated student retrieval and casting could be replaced with named local variables. Action granularity: Each statement performs one main action, and assertions are clearly separated. Reading flow: Setup, verification, and execution follow a natural sequence, but long assertion expressions, excessive parentheses, and inconsistent spacing interrupt scanning.

Run 2

Code Structure: Clearly separates query creation, result verification, and test execution. Nesting: Anonymous classes and a conditional add moderate nesting, but control flow remains simple. Clarity of intent: The descriptive test name, HQL, and assertions communicate the purpose, though raw lists, repeated casts, and positional access obscure individual entities. Code length: Reasonably compact, but repeated retrieval and casting could be reduced with named Student variables. Action granularity: Generally one assertion or assignment per statement, with appropriate multiline formatting for a longer assertion. Reading flow: Proceeds naturally from setup to verification to execution; redundant parentheses, long assertion lines, and minor spacing inconsistencies interrupt readability.

Run 3

Code Structure: Clearly separates query creation, result checking, and test execution, though anonymous classes add boilerplate. Nesting: Moderate nesting from anonymous classes and one conditional; still manageable. Clarity of intent: The descriptive test name, explicit HQL, and assertions convey purpose, but repeated casts and positional list access obscure the entities being checked. Code length: Reasonable for its coverage, although typed local variables could reduce repetition. Action granularity: Each statement performs one primary action; multiline assertions are appropriately grouped. Reading flow: Progresses naturally from setup to verification to execution, but long assertion lines, excessive parentheses, and slightly inconsistent spacing interrupt readability.