Sample

Scalabrio133

Human rating uses the original dataset scale.

DatasetScalabrino
Human4.56
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0480–1; higher is more readable
84.9Δ 9.8
Scalabrino0.5320–1; higher is more readable
52.8Δ 42.0
Dorn0.3740–1; higher is more readable
43.2Δ 51.5
Mi0.910–1; higher is more readable
100.0Δ 5.3
LLOC8Logical lines; fewer is more readable
76.9Δ 17.8
DeepSeek V4 Pro17.330–20; mean of three runs
93.2Δ 1.5
GPT-6.1 Sol180–20; mean of three runs
83.7Δ 11.1
BTTF0.5310–1; higher is more readable
49.2Δ 45.5
Human4.561–5; original rating
94.7

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.261.343−8.624
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.824−7.236
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -2.99 (log-odds).
Score = sigmoid(-2.99) = 0.048.

Score0.532

Feature contributions

FeatureValueContribution
(log-odds)
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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.141−0.429
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.8.744−0.288
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.80.9+0.239

Intercept 0.07 + feature contributions = -0.516 (log-odds).
Score = sigmoid(-0.516) = 0.374.

Score0.91
Score8
Run 1

The code is highly readable due to its clear structure and logical flow. It follows a straightforward arrangement: create session, begin transaction, create entity, persist, flush, rollback, and close. The nesting is flat with no conditional blocks or loops. The intent is obvious—testing that unresolved property types are accepted when a target entity is set, even though the test itself is minimal. Code length is concise and appropriate. Each line represents a single action, respecting action granularity. Reading flow is natural and linear, mirroring a typical transaction lifecycle. Minor deductions could be argued for lack of comments or assertions, but for pure structure and readability, it is nearly ideal.

Run 2

The code is clean, concise, and easy to understand. It demonstrates a straightforward unit test setup with clear intent: creating a session, beginning a transaction, persisting an entity, flushing, rolling back, and closing. The structure is logical and the reading flow is natural. Nesting is minimal, and each line performs a single action, which improves action granularity. However, the method name is somewhat long and overly specific, which slightly reduces clarity regarding the test's purpose. Overall, the code is highly readable but loses points for the verbose method name and lack of comments or contextual explanation.

Run 3

The code is highly readable due to its clean, logical structure and flat nesting. Each line represents a single action, making the flow easy to follow: open session, begin transaction, create entity, persist, flush, rollback, and close. The method name clearly states its intent, though the test body doesn't directly show the 'unresolved property types' part — that likely happens implicitly via entity mapping. The code is concise, with no unnecessary complexity or ambiguity. Minor deductions: lack of try/finally for resource safety and no comments explaining why rollback is used instead of commit.

Run 1

Code Structure: The test is logically organized into session setup, entity creation, persistence, and cleanup. Nesting: The method is flat with no nested control flow. Clarity of intent: The descriptive test name communicates the expected behavior, although the connection between Gene and unresolved property types is not visible, and variable names s and tx are abbreviated. Code length: The implementation is concise without unnecessary steps. Action granularity: Each statement performs one action on its own line. Reading flow: Operations follow a natural lifecycle from opening the session to closing it. Explicit assertions or a comment explaining that successful persistence verifies acceptance would make the test's intent clearer.

Run 2

Code Structure: A logically organized test with clear setup, persistence, and cleanup phases. Nesting: Flat method body with no nested control flow. Clarity of intent: The descriptive test name states the expected behavior, though the lack of an explicit assertion and the generic names 's', 'tx', and 'item' slightly reduce clarity. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one action on its own line. Reading flow: The sequence naturally follows the session and transaction lifecycle, making it easy to read.

Run 3

Code Structure: The test is logically organized into session setup, entity creation, persistence, and cleanup. Nesting: The method is flat, with no nested control flow. Clarity of intent: The descriptive test name clearly states the expected behavior, although the relevant target-entity configuration is not visible and success is implied by the absence of an exception rather than an explicit assertion. Code length: Short and appropriately concise. Action granularity: Each statement performs one action on its own line. Reading flow: The sequence is natural and easy to follow. The abbreviated variable names s and tx slightly reduce clarity, and cleanup is not clearly separated from the test operation.