Sample

Scalabrio139

Human rating uses the original dataset scale.

DatasetScalabrino
Human4.11
Lines21

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
38.7Δ 39.4
Scalabrino0.5040–1; higher is more readable
50.3Δ 27.9
Dorn0.1130–1; higher is more readable
18.1Δ 60.1
Mi0.4790–1; higher is more readable
75.4Δ 2.8
LLOC16Logical lines; fewer is more readable
40.2Δ 37.9
DeepSeek V4 Pro16.330–20; mean of three runs
80.9Δ 2.8
GPT-6.1 Sol180–20; mean of three runs
83.7Δ 5.5
BTTF0.3950–1; higher is more readable
14.6Δ 63.6
Human4.111–5; original rating
78.1

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.879.055−29.009
Source linesThe number of non-empty source lines.21+8.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.4.779−7.168

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

Score0.504

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.132.952−1.966
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.066+0.305
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.21+0.293
Indentation frequencyHow rapidly indentation changes from line to line.15−0.218
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.19.724−0.134

Intercept 0.07 + feature contributions = -2.057 (log-odds).
Score = sigmoid(-2.057) = 0.113.

Score0.479
Score16
Run 1

The code demonstrates clear structure with a logical two-phase setup: listener instantiation followed by registration. Nesting is minimal and flat. Intent is clear—creating and registering collection event listeners. However, the constructor parameter `SessionFactory sf` is then cast to `SessionFactoryImplementor`, which slightly obscures intent. The code is concise, with one action per line. Reading flow is natural, though grouping-related registrations (e.g., PRE/POST pairs) could improve readability. Naming is consistent and descriptive.

Run 2

The code is well-structured with clear intent. It follows a logical order: instantiate listeners, then register them. The constructor is flat with no nested blocks. Each listener registration is on its own line, aiding readability. Variable names are descriptive. However, there are minor issues: the cast and service lookup on one long line is slightly dense, and the repeated 'setListeners' calls could be seen as boilerplate, but this is acceptable given the pattern. Overall, it is concise, purpose-driven, and easy to follow.

Run 3

The code is well-structured and highly readable. It follows a clear pattern: first, all listener instances are initialized in a logical grouping, then registered with the event registry in a consistent order. Nesting is minimal—only one cast expression is used. The intent is unambiguous: setting up collection event listeners. Code length is appropriate, with no unnecessary repetition beyond the inherent symmetry of the task. Each action is on its own line, which improves clarity. The reading flow is natural, moving from listener creation to registration in a systematic sequence. Minor improvements could include extracting the registry lookup into a local variable for even flatter structure, but overall this is clean, maintainable code.

Run 1

Code Structure: Clearly separates listener initialization from registration, with related pre/post events grouped together. Nesting: Flat constructor with no nested control flow. Clarity of intent: Descriptive listener names and explicit event types make the purpose clear; the abbreviated parameter 'sf' is slightly less informative. Code length: Concise for the required setup, though repetitive assignments and registrations add some verbosity. Action granularity: Each statement performs one primary action; the registry lookup combines a cast and chained calls in one long line. Reading flow: Initialization naturally precedes registration, and blank lines improve scanning. Minor inconsistencies in initialization versus registration ordering and the long registry lookup slightly reduce readability.

Run 2

Code Structure: Clearly separates listener creation from registration, with registrations grouped into related pre/post pairs. Nesting: Flat constructor with no nested control flow. Clarity of intent: Descriptive listener names and explicit event types make the purpose clear; the abbreviated parameter sf is slightly less informative. Code length: Appropriately concise, although initialization and registration contain some repetitive boilerplate. Action granularity: Each statement performs one primary action; registry retrieval combines a cast and chained calls in a long expression. Reading flow: Natural progression from creating listeners to obtaining the registry and registering them. Consistent spacing and blank lines aid scanning, though initialization order does not fully match registration order.

Run 3

Code Structure: Clearly separates listener initialization from registration, with registrations grouped by event type. Nesting: Flat constructor body with no nested control flow. Clarity of intent: Descriptive listener names and explicit event constants make the purpose obvious, though the parameter name 'sf' is abbreviated. Code length: Appropriately concise; repetition is straightforward and easy to scan. Action granularity: Each statement performs one primary initialization or registration action, although registry retrieval combines a cast and chained calls. Reading flow: Initialization naturally precedes registration, and blank lines distinguish event groups. Minor readability drawbacks include the long registry-retrieval line, inconsistent spacing, and initialization order that does not fully match the paired registration order.