Sample

Scalabrio173

Human rating uses the original dataset scale.

DatasetScalabrino
Human2.78
Lines36

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
61.3Δ 53.5
Scalabrino0.1720–1; higher is more readable
11.6Δ 3.8
Dorn0.4420–1; higher is more readable
48.7Δ 41.0
Mi0.2670–1; higher is more readable
54.3Δ 46.5
LLOC17Logical lines; fewer is more readable
35.7Δ 27.9
DeepSeek V4 Pro13.330–20; mean of three runs
38.7Δ 30.9
GPT-6.1 Sol15.330–20; mean of three runs
24.9Δ 17.1
BTTF0.560–1; higher is more readable
60.8Δ 53.0
Human2.781–5; original rating
7.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.856.536−28.266
Source linesThe number of non-empty source lines.36+14.4
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.3.95−5.924

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

Score0.172

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.69.917+0.704
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.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.07+0.265
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.36−0.238
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.34.718+0.075

Intercept 0.07 + feature contributions = -0.233 (log-odds).
Score = sigmoid(-0.233) = 0.442.

Score0.267
Score17
Run 1

The code is reasonably structured but has readability issues. The method name is descriptive yet overly long. The use of an anonymous inner class adds nesting and obscures the main test flow. Exception handling wraps the entire block in a try-catch that rethrows as RuntimeException, adding boilerplate. Conditional logic for transactional and removeRegion paths is clear but introduces moderate nesting. Some actions are combined (e.g., assertFalse inside try-finally), which reduces action granularity. The reading flow is disrupted by the anonymous class and catch-rethrow pattern. Overall, the intent is understandable but could be improved with fewer nested structures and clearer separation of test setup, execution, and assertion steps.

Run 2

The code demonstrates moderate readability but suffers from several issues. The structure is logically organized, and the action granularity is good with one action per line. However, the nesting depth is problematic: we see an anonymous inner class, try-catch, if-else, try-finally blocks, creating multiple indentation levels that obscure control flow. The intent is somewhat clear (testing put-from-load validator behavior with removal scenarios), but the parameter names 'transactional' and 'removeRegion' are slightly ambiguous without context. The try-finally block for lockable is awkward since the assertion would fail before reaching release, making the finally block somewhat misleading. The wrapped RuntimeException in the catch block adds noise and obscures the actual test failure. The code could be significantly improved by extracting the anonymous CacheManagerCallable into a named class or lambda, reducing nesting depth, and clarifying the lockable handling logic.

Run 3

The code has a reasonably clear purpose (testing put-from-load validation with an intervening removal), and the individual actions are mostly separated into single lines. However, readability is reduced by several factors: the method name is long and slightly ambiguous; the logic is nested inside an anonymous inner class and a try-catch that simply wraps exceptions; and the conditional branch (removeRegion vs invalidateKey) and transactional setup are somewhat buried. The try-finally around acquirePutFromLoadLock adds nesting but is necessary. Overall, the structure is understandable but could be improved by extracting helper methods, reducing nesting, and using a clearer test method name.

Run 1

Code Structure: The test follows a logical setup, registration, invalidation, verification, and cleanup sequence. Nesting: The anonymous callback, outer try/catch, conditionals, and inner try/finally create moderately deep nesting. Clarity of intent: Descriptive method and API names make the intended invalidation behavior clear, though 'testee' and boolean parameters require some interpretation. Code length: Reasonably concise, with most verbosity attributable to callback scaffolding and exception handling. Action granularity: Statements generally perform one action per line; wrapped constructor arguments remain readable. Reading flow: Execution proceeds naturally, and cleanup is placed next to lock acquisition, but nested exception handling interrupts the flow slightly.

Run 2

Code Structure: The test follows a logical setup, registration, invalidation, and assertion sequence, with explicit cleanup and exception handling. Nesting: The anonymous callback, outer try/catch, conditional branches, and inner try/finally create substantial indentation for a short test. Clarity of intent: The method name and validator operations communicate the scenario well, though 'testee' and boolean parameters are less descriptive, and transaction completion is not visible. Code length: Reasonably concise, but callback and exception-handling boilerplate add visual weight. Action granularity: Each statement performs a distinct action, making individual steps easy to follow. Reading flow: Execution proceeds naturally, and blank lines separate phases; however, nested cleanup and wrapped construction interrupt an otherwise straightforward flow.

Run 3

Code Structure: The test follows a logical setup, pending-put registration, invalidation, and assertion sequence, with cleanup grouped appropriately. Nesting: The anonymous callback, outer try/catch, conditionals, and inner try/finally create substantial indentation for a short test. Clarity of intent: The method and API names communicate the scenario well, though 'testee' and boolean flags are less descriptive, and transaction completion is not visible. Code length: Mostly concise, but callback boilerplate and exception wrapping add overhead. Action granularity: Each statement performs one main action, making individual steps easy to distinguish. Reading flow: Execution proceeds naturally from setup to verification and cleanup; nested error-handling blocks and wrapped expressions slightly interrupt scanning.