Sample

Scalabrio192

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.11
Lines39

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
5.5Δ 15.8
Scalabrino0.3990–1; higher is more readable
36.7Δ 15.3
Dorn0.2780–1; higher is more readable
36.2Δ 14.8
Mi0.4330–1; higher is more readable
70.4Δ 49.0
LLOC33Logical lines; fewer is more readable
2.0Δ 19.3
DeepSeek V4 Pro11.330–20; mean of three runs
27.6Δ 6.3
GPT-6.1 Sol16.330–20; mean of three runs
42.5Δ 21.1
BTTF0.4040–1; higher is more readable
16.1Δ 5.3
Human3.111–5; original rating
21.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.2031.788−67.049
Source linesThe number of non-empty source lines.39+15.6
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.828−7.242

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

Score0.399

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.64.974+0.913
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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.158−0.597
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.39−0.345
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.37.258+0.111

Intercept 0.07 + feature contributions = -0.956 (log-odds).
Score = sigmoid(-0.956) = 0.278.

Score0.433
Score33
Run 1

The test method has a clear overall goal but suffers from significant readability issues. The code structure is repetitive and tangled, with three nearly identical session lifecycle blocks. Nesting is minimal, but action granularity is poor, as multiple operations are packed into single lines. Clarity of intent is undermined by vague naming (e.g., 'Widge', 'Get', 'part if a Widget') and redundant cache eviction calls. The reading flow is disorganized: the test jumps between setup, assertions, cleanup, and re-fetching without clear separation. Magic strings and repeated type casts further obscure intent. The method is also unnecessarily long for what it tests, making it hard to follow.

Run 2

The code has a clear logical structure with three distinct test phases (setup, orphan removal, verification), which helps readability. However, it repeats the session/cache setup pattern multiple times without helper methods, making it somewhat verbose. The reading flow is natural but interrupted by cache eviction calls between sessions. Variable names like 'prod', 'part', and 'part2' are reasonably descriptive, though 'mapKey' could be clearer as 'topMapKey'. The test method has no comments explaining the orphan delete scenario, relying on implicit understanding of Hibernate behavior. Nesting is flat, and action granularity is mostly one operation per line, which is good. The three-phase test structure would benefit from blank lines or helper methods to separate the phases more clearly. Overall, it's readable for someone familiar with Hibernate testing patterns, but could be improved with extraction of repeated session boilerplate and clearer phase separation.

Run 3

The code is reasonably structured for a test method, but it has readability issues. It follows a logical sequence of operations (test setup, transaction handling, assertions), but the repeating session/transaction boilerplate reduces clarity. There are three separate session blocks, each with similar operations, but this repetition isn't abstracted. Nesting is flat, which is good, but the mixed concerns of session management, cache eviction, and assertions create some ambiguity about intent. The code is concise but could be shorter with helper methods. Generally, each line performs one action, which is positive, but the lack of blank lines between logical sections hurts reading flow. The test name and assertions communicate intent, but the repeated manual cache evictions and transaction management obscure the core test scenario. Overall, it's readable for an experienced developer but not immediately clear to someone unfamiliar with Hibernate testing patterns.

Run 1

Code Structure: Organized into three distinct transaction phases: setup, orphan removal, and verification/cleanup. Nesting: Flat, with no nested control flow. Clarity of intent: The test name and assertions communicate the purpose, but abbreviated variables, an unused reassignment to part, and no direct assertion that the removed Part was deleted reduce clarity. Code length: Reasonably concise, though repeated session, transaction, and cache-management code adds boilerplate. Action granularity: Each statement occupies its own line, making individual operations easy to identify. Reading flow: Execution follows a natural chronological sequence, and blank lines separate phases; inconsistent spacing and repeated variable reassignment slightly hinder scanning.

Run 2

Code Structure: The test follows clear setup, modification, verification, and cleanup phases, separated by blank lines, but lacks explicit phase labels or helper methods. Nesting: The method is flat, with no nested control flow. Clarity of intent: The test name and assertions communicate orphan-deletion behavior, although abbreviated variables such as t and prod and an unused reassignment to part reduce clarity. Code length: Reasonably concise, but repeated session, transaction, and cache-management operations add boilerplate. Action granularity: Each statement generally performs one action; chained calls and nested arguments remain manageable. Reading flow: Execution proceeds naturally and chronologically, though variable reuse and inconsistent spacing slightly disrupt readability.

Run 3

Code Structure: Organized into clear setup, orphan-removal, and verification phases, separated by blank lines. Nesting: Flat, with no nested control flow. Clarity of intent: The test name and Hibernate operations convey the purpose, though generic variables such as t and part2, an unused reassignment to part, and the lack of a direct assertion that the removed Part was deleted reduce clarity. Code length: Reasonably concise, but repeated session, transaction, and cache-management operations add boilerplate. Action granularity: Each statement performs one primary action; chained calls remain understandable. Reading flow: Execution follows a natural chronological sequence, although inconsistent spacing and repeated infrastructure operations slightly interrupt readability.