Sample

Scalabrio184

Human rating uses the original dataset scale.

DatasetScalabrino
Human4.22
Lines18

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0020–1; higher is more readable
77.9Δ 5.0
Scalabrino0.4930–1; higher is more readable
49.2Δ 33.7
Dorn0.640–1; higher is more readable
70.9Δ 12.1
Mi0.3590–1; higher is more readable
63.8Δ 19.1
LLOC8Logical lines; fewer is more readable
76.9Δ 6.0
DeepSeek V4 Pro16.330–20; mean of three runs
80.9Δ 2.0
GPT-6.1 Sol180–20; mean of three runs
83.7Δ 0.8
BTTF0.4270–1; higher is more readable
18.1Δ 64.8
Human4.221–5; original rating
82.9

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.456.65−15.069
Source linesThe number of non-empty source lines.18+7.2
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.771−7.156

Intercept 8.87 + feature contributions = -6.155 (log-odds).
Score = sigmoid(-6.155) = 0.002.

Score0.493

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.104+0.874
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.103.944−0.737
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.18+0.399
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.16.686−0.177
Indentation frequencyHow rapidly indentation changes from line to line.17−0.149
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.107−0.1

Intercept 0.07 + feature contributions = 0.577 (log-odds).
Score = sigmoid(0.577) = 0.64.

Score0.359
Score8
Run 1

The code is well-structured and readable. It demonstrates clear separation of concerns through logical grouping of operations. The nesting is minimal — only one conditional block with a clear single-line comment explaining the exception handling requirement. Variable names like 'flush', 'isDriver', and 'isInitiator' are descriptive and self-documenting. The action granularity is good with each line performing a single logical operation. The code length is appropriate for its purpose. Reading flow is natural — it progresses from notification, to flush check, to completion handling, to resource cleanup. The repeated use of 'transactionCoordinator().getTransactionContext()' could be extracted to a local variable for improved conciseness, but overall the code maintains clarity without sacrificing readability.

Run 2

The code is well-structured with a clear logical flow: notifications, flush decision, flush execution, completion callback, and cleanup. Nesting is minimal with two shallow conditional blocks. Intent is clear from method and variable names like 'flush', 'isDriver', and 'isInitiator'. The code is concise and avoids unnecessary repetition. Each action is on its own line, aiding comprehension. The reading flow is natural, following a chronological transaction lifecycle. Minor deductions: the boolean flush expression is somewhat long and could benefit from an intermediate variable or a helper method to clarify intent. The 'closeIfRequired()' call is slightly terse. Overall, the code is highly readable.

Run 3

The code is generally clear, with a logical structure and a natural reading flow. It uses flat nesting and concise expressions. However, readability is somewhat reduced by multiple chained method calls on the same line (e.g., `transactionCoordinator().getTransactionContext().isFlushModeNever()`), which makes the boolean condition for `flush` dense. Action granularity is mostly one action per line, though the boolean assignment performs several nested operations. The intent is clear, but the code could be improved by extracting the repeated `transactionCoordinator().getTransactionContext()` chain into a local variable to reduce repetition and improve clarity. Overall, it is readable but slightly verbose in its method chaining.

Run 1

Code Structure: Logically organizes notifications, conditional flushing, transaction completion, and closing. Nesting: Two independent, shallow conditionals keep complexity low. Clarity of intent: Descriptive method names and the rollback comment explain the lifecycle, though the negated flush flags require careful interpretation. Code length: Concise overall; repeated transactionCoordinator().getTransactionContext() chains add verbosity. Action granularity: Each statement performs one clear action, and the compound flush condition is assigned to a named variable. Reading flow: Execution proceeds naturally through transaction preparation and cleanup, with whitespace separating distinct steps.

Run 2

Code Structure: Clearly organized into notifications, optional flushing, conditional completion, and closing. Nesting: Shallow, with two independent conditionals and no nested blocks. Clarity of intent: Descriptive method names and the rollback comment communicate purpose, though the compound flush condition requires careful interpretation. Code length: Concise overall, but repeated transactionCoordinator().getTransactionContext() calls add verbosity. Action granularity: Each statement performs a distinct action; the multiline boolean expression remains a cohesive calculation. Reading flow: Natural lifecycle progression with whitespace separating stages, although the negated flags slightly slow comprehension.

Run 3

Code Structure: Logically organized into notification, flush decision, conditional completion callback, and cleanup. Nesting: Shallow, with two independent conditionals and no nested blocks. Clarity of intent: Descriptive method names and the named flush boolean communicate purpose; however, the negated flush-mode checks and driver/initiator flags require domain knowledge. Code length: Concise overall, though repeated transactionCoordinator().getTransactionContext() chains add visual noise. Action granularity: Each statement performs one clear action, and the compound boolean expression is sensibly split across lines. Reading flow: Execution follows a natural transaction-completion sequence, with whitespace separating stages and a useful comment explaining exception handling.