Sample

Scalabrio106

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.56
Lines36

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
36.7Δ 8.8
Scalabrino0.5670–1; higher is more readable
56.3Δ 10.8
Dorn0.5640–1; higher is more readable
64.8Δ 19.3
Mi0.2380–1; higher is more readable
51.8Δ 6.3
LLOC17Logical lines; fewer is more readable
35.7Δ 9.8
DeepSeek V4 Pro140–20; mean of three runs
49.2Δ 3.8
GPT-6.1 Sol16.670–20; mean of three runs
45.2Δ 0.3
BTTF0.470–1; higher is more readable
29.1Δ 16.3
Human3.561–5; original rating
45.5

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.1075.054−35.477
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.4.853−7.279

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

Score0.567

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.104.944+0.889
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.104.944−0.78
Indentation frequencyHow rapidly indentation changes from line to line.28+0.231
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.28−0.222
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.34−0.167
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.08+0.16
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.34.802+0.077

Intercept 0.07 + feature contributions = 0.258 (log-odds).
Score = sigmoid(0.258) = 0.564.

Score0.238
Score17
Run 1

The code is moderately readable. Method signature and purpose are clear, and comments explain non-obvious logic. Naming is meaningful (e.g., isImpliedOptimisticLocking, loadedState). The structure follows a logical flow: determine optimistic locking, get delete strings, iterate tables. Depth is only two levels, acceptable. However, clarity suffers slightly from a long parameter list and unexplained magic index 'j' in the loop, obscuring intent. The comment contains a jarring phrase 'doAfterTransactionCompletion the location' likely a copy-paste artifact, reducing clarity. Length is reasonable. Some lines combine multiple actions, lowering granularity. Overall flow is natural but not optimal.

Run 2

The code has some strengths: it uses clear method and variable names, includes helpful comments, and maintains flat nesting with only one level of if-else/if blocks. The loop and method calls are straightforward. However, several issues reduce readability: the method signature is long and spans multiple lines awkwardly; there is a typo in 'generateSQLDeletStrings' (should be 'Delete'); the comment 'doAfterTransactionCompletion the location the safe way' is confusing; and magic numbers/strings are absent but the logic assumes deep framework knowledge. The boolean logic for 'isImpliedOptimisticLocking' is somewhat dense. Action granularity is mostly good, but some lines combine multiple concerns (e.g., final EntityKey generation). Overall, the code is workable but could benefit from simplifying the conditional logic and cleaning up comments to improve intent clarity.

Run 3

The code is fairly readable. It uses a consistent comment style, Javadoc, and clear variable names like 'isImpliedOptimisticLocking' and 'loadedState'. The structure is logical: handle a special case, choose delete strings, then iterate. However, readability is slightly reduced by a few factors: the method signature is long, the nested if/else adds some depth, and the comments are a bit verbose (e.g., 'doAfterTransactionCompletion the location the safe way' contains a typo and awkward phrasing). Also, multiple actions occur in single lines, such as initializing arrays and calling methods, which lowers action granularity. The reading flow is generally natural but could be improved by extracting the optimistic locking check into a helper method.

Run 1

Code Structure: Organized into three logical stages: retrieving loaded state, choosing delete statements, and deleting across tables. Nesting: Shallow, with only one nested conditional, making control flow easy to follow. Clarity of intent: The method name, descriptive variables, and comments establish its purpose, but Hibernate-specific locking behavior requires domain knowledge. A confusing comment containing 'doAfterTransactionCompletion' and the typo in 'generateSQLDeletStrings' reduce clarity. Code length: Reasonably concise for its responsibilities, though some comments and blank lines add noise. Action granularity: Statements generally perform one action per line, with intermediate variables helping readability. Reading flow: Execution proceeds naturally from preparation to SQL selection to deletion. The reverse table traversal and overloaded delete call are understandable structurally but lack explanations of their semantics.

Run 2

Code Structure: Logically separates loaded-state retrieval, SQL selection, and deletion execution. Nesting: Shallow, with only one nested conditional, so control flow is easy to follow. Clarity of intent: Descriptive variable names and comments explain optimistic-locking behavior, although framework-specific concepts, the vague index name 'j', and a confusing comment reduce clarity. Code length: Appropriately concise for the work performed; some comments and blank lines could be trimmed. Action granularity: Each statement generally performs one action, with no crowded multi-operation lines. Reading flow: Proceeds naturally from preparation to statement selection to execution. The reverse table traversal is clear syntactically but lacks an explanation of why that order is necessary.

Run 3

Code Structure: Clearly separates loaded-state retrieval, SQL selection, and deletion execution. Nesting: Shallow overall, with only one nested conditional during state retrieval. Clarity of intent: Descriptive names and comments explain optimistic locking and dynamic SQL, though the malformed proxy comment, misspelled generateSQLDeletStrings method, and unexplained reverse table traversal reduce clarity. Code length: Reasonably concise for the logic, with minor excess whitespace and comments. Action granularity: Each statement performs a distinct action, making operations easy to follow. Reading flow: Proceeds naturally from preparing state to choosing statements and executing deletions; Hibernate-specific terminology and the overloaded delete call require some contextual knowledge.