Sample

Scalabrio120

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.89
Lines16

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
65.3Δ 0.8
Scalabrino0.4620–1; higher is more readable
43.7Δ 22.4
Dorn0.7820–1; higher is more readable
89.4Δ 23.4
Mi0.6030–1; higher is more readable
82.4Δ 16.3
LLOC12Logical lines; fewer is more readable
57.3Δ 8.8
DeepSeek V4 Pro8.670–20; mean of three runs
12.8Δ 53.3
GPT-6.1 Sol160–20; mean of three runs
34.7Δ 31.4
BTTF0.5060–1; higher is more readable
40.2Δ 25.9
Human3.891–5; original rating
66.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.559.092−18.45
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.613−6.92
Source linesThe number of non-empty source lines.16+6.4

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

Score0.462

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.63.941+0.957
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.17+0.434
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.135−0.369
Indentation frequencyHow rapidly indentation changes from line to line.14−0.253
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.64+0.228
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.15.846−0.188

Intercept 0.07 + feature contributions = 1.277 (log-odds).
Score = sigmoid(1.277) = 0.782.

Score0.603
Score12
Run 1

The code has basic logical structure but suffers from multiple readability issues. Nesting is moderate (if inside if), but the action granularity and clarity are weak — multiple operations are crammed into single lines (e.g., `res.addElement(Model.getFacade().getAssociation(aer));`), making intent less obvious. The comment `//wasteful!` is ambiguous without context, and the `// empty Vector` comment adds little. Variable names are cryptic (`aer`, `cr`, `res`, `ends`), hurting clarity. The method uses raw types (`List`, `Vector`, `Collection`, `Iterator`) and inconsistent return types, reducing expressiveness. Reading flow is interrupted by the unnecessary `if (ends == null)` block and the mixed indentation. Overall, the code is understandable but verbose and unclear, earning a low-moderate score.

Run 2

The code has several readability issues. It uses raw types (`List`, `Vector`) instead of generics, making intent ambiguous. The variable names are cryptic: `res`, `cr`, `aer`, `iter` reveal little about their purpose. The comment `//wasteful!` suggests poor design but offers no explanation. Nesting is moderate but the early return flow is awkward, with an inline comment interrupting logic. Each line performs one action, which is good, but the overall structure feels tangled: type-checking `port` then treating it as a classifier role without clarity. The method mixes concerns: validating input, fetching association ends, and transforming them. No null check on `getAssociation()` result. The code could be far more concise with modern Java streams or at least meaningful variable names and generics. Reading flow is choppy due to scattered comments and unexplained logic branches. Score reflects functional but poorly expressive code that requires significant effort to understand.

Run 3

The code is moderately readable but has several issues. The logic is straightforward but relies heavily on facade calls, and the method name `getInEdges` is slightly misleading since it returns associations, not edges. The use of `Vector` is outdated and inefficient. The structure is mostly flat with minimal nesting, which is good, but the unnecessary comment and inconsistent indentation hurt clarity. The null check for `ends` is helpful, but returning an empty `Vector` instead of a more generic collection reduces flexibility. The loop is simple and each statement performs one action, aiding readability. However, the mix of old Java collection types (`Vector`, raw `List`, raw `Iterator`) suggests poor modern practices. Overall, the logic is understandable but the code would benefit from modernization with generics, better naming, and consistent formatting.

Run 1

Code Structure: logically organized around collecting associations for a classifier role. Nesting: modest, with a conditional containing a null check and loop; an early return for unsupported ports could flatten it further. Clarity of intent: the method name and facade calls communicate purpose, but abbreviations such as res, cr, and aer, raw collection types, and the vague 'wasteful!' comment reduce clarity. Code length: concise overall, although the cr alias is unnecessary. Action granularity: statements generally perform one action per line. Reading flow: initialization, validation, iteration, and return follow a natural sequence, but inconsistent indentation and legacy Vector/Iterator usage slightly hinder readability.

Run 2

Code Structure: Logically organized around a type check, collection retrieval, and iteration, though the cr alias is unnecessary. Nesting: Moderate nesting within the conditional and loop; the early return avoids an additional nested block. Clarity of intent: The method clearly gathers associations for a classifier role, but abbreviated names such as res, cr, and aer, raw collection types, and the unhelpful 'wasteful!' comment reduce clarity. Code length: Short and mostly concise, with minor redundancy. Action granularity: Each statement performs a single action on its own line. Reading flow: Execution proceeds naturally from validation to retrieval to accumulation and return, but inconsistent indentation and repeated facade access slightly disrupt readability.

Run 3

Code Structure: Logically organized around collecting associations for a classifier role, with an early return for missing ends. Nesting: Moderate nesting through a conditional and loop, but still easy to follow. Clarity of intent: The method name and facade calls convey purpose, although abbreviated variables such as cr, aer, and res, raw collection types, and the vague 'wasteful!' comment reduce clarity. Code length: Short and focused, though the cr alias is unnecessary. Action granularity: Each statement performs one main action; chained facade calls remain understandable. Reading flow: Initialization, validation, iteration, and return follow a natural sequence, but inconsistent indentation slightly disrupts scanning.