Sample

Scalabrio140

Human rating uses the original dataset scale.

DatasetScalabrino
Human2.44
Lines40

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
2.0Δ 0.0
Scalabrino0.0910–1; higher is more readable
6.0Δ 4.0
Dorn0.0540–1; higher is more readable
10.1Δ 8.0
Mi0.0380–1; higher is more readable
19.1Δ 17.1
LLOC33Logical lines; fewer is more readable
2.0Δ 0.0
DeepSeek V4 Pro6.670–20; mean of three runs
5.5Δ 3.5
GPT-6.1 Sol14.330–20; mean of three runs
11.6Δ 9.5
BTTF0.2690–1; higher is more readable
3.5Δ 1.5
Human2.441–5; original rating
2.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.2632.774−86.882
Source linesThe number of non-empty source lines.40+16
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.802−7.204

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

Score0.091

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.975−1.882
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
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.40−0.497
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.116−0.183
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.38.818+0.133

Intercept 0.07 + feature contributions = -2.866 (log-odds).
Score = sigmoid(-2.866) = 0.054.

Score0.038
Score33
Run 1

The code is difficult to read due to several factors. The method name is long but descriptive, while the body lacks logical grouping or blank lines, making the structure feel tangled. Nesting is moderate but unnecessary type checks and casts (e.g., oldChild instanceof Entity, ChildWithBidirectionalManyToMany) add complexity. Intent is partially clear—testing collection listeners—but the sequence of assertions is hard to follow. Code length is moderate but repetition of pattern 'checkResult' with incrementing index is tedious. Multiple actions are packed into some lines, especially within conditional blocks and type-casting expressions. Reading flow is disorganized, jumping between setup, persistence operations, and assertions without clear sections. The use of raw types and unchecked casts further obscures clarity.

Run 2

The code has a clear test purpose but suffers from readability issues. Structure is logical but marred by excessive casting and nested conditionals. Nesting is moderate but creates complexity, especially with instanceof checks. Intent is partially clear - testing collection listeners - but repeated type checks obscure the flow. Code length is long for a single test, with many similar operations. Action granularity is okay, mostly one action per line, but lines are bloated with casts and method chains. Reading flow is disrupted by the index tracking pattern and conditional checks. The repeated cast expressions (e.g., '(ChildWithBidirectionalManyToMany) oldChild') and deep null/type checks reduce clarity. No comments or helper methods to abstract the listener verification logic. Could be improved by extracting helper methods for common operations like listener checking and casting.

Run 3

The code is a single long test method with deeply nested conditionals and multiple type casts. It mixes setup, action, and verification without helper methods or comments to clarify intent. The flow is hard to follow: multiple nested `if` blocks and repeated checks for `ChildWithBidirectionalManyToMany` disrupt readability. Lines like `checkResult( listeners, listeners.getPreCollectionUpdateListener(), ( ChildWithBidirectionalManyToMany ) oldChild, index++ );` combine casting, method calls, and incrementing a counter in one expression. Variable naming is somewhat clear but the sheer number of `checkResult` calls with incrementing indexes makes the verification logic opaque. Overall, the structure could be improved by extracting helper methods, reducing nesting, and separating setup, action, and assertion phases. The code is not unreadable, but it requires significant effort to parse and understand the test's intent and sequence of expected events.

Run 1

Code Structure: The test follows a logical setup, mutation, transaction completion, and verification sequence, but lacks visual separation between phases. Nesting: Mostly flat, with only one two-level conditional block. Clarity of intent: Descriptive variable names and listener assertions convey the purpose, though the cumbersome test name, abbreviated session variable, and repeated casts make comprehension harder. Code length: Reasonable for the scenario, but repeated listener checks and type checks add verbosity. Action granularity: Generally one statement per line; index++ combines assertion sequencing with counter mutation. Reading flow: The execution order is natural and the expected event sequence is explicit, but long assertion lines, inconsistent cast spacing, and repeated bidirectional-association conditions interrupt scanning.

Run 2

Code Structure: Logically progresses through setup, collection replacement, transaction completion, and event verification, but lacks visual separation between phases. Nesting: Mostly flat, with only one two-level conditional. Clarity of intent: Descriptive variables and listener names convey purpose, but the cumbersome test name, repeated casts, and implicit event-order expectations require domain knowledge. Code length: Reasonable for the scenario, though repetitive checkResult calls and lengthy expressions increase reading effort. Action granularity: Generally one action per line; index++ inside assertions combines verification with state mutation. Reading flow: Execution is sequential and understandable, but repeated type checks, dense assertions, inconsistent cast spacing, and absent explanatory comments interrupt the flow.

Run 3

Code Structure: Logically progresses through setup, collection replacement, transaction completion, and listener verification, but lacks visual separation between phases. Nesting: Mostly flat, with only one two-level conditional block. Clarity of intent: Descriptive domain names and assertions reveal the test's purpose, although the cumbersome method name, abbreviated session variables, and frequent casts hinder quick comprehension. Code length: Reasonable for the scenario, but repetitive listener checks and long argument lists add verbosity. Action granularity: Generally one operation per line; index++ inside verification calls combines checking with state mutation. Reading flow: Execution follows a natural chronological order, but repeated type checks, dense formatting, and conditional event expectations make the verification sequence harder to scan.