Sample

Scalabrio154

Human rating uses the original dataset scale.

DatasetScalabrino
Human3
Lines38

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
29.6Δ 12.8
Scalabrino0.2750–1; higher is more readable
24.6Δ 7.8
Dorn0.8130–1; higher is more readable
92.5Δ 75.6
Mi0.4420–1; higher is more readable
72.4Δ 55.5
LLOC18Logical lines; fewer is more readable
31.2Δ 14.3
DeepSeek V4 Pro9.670–20; mean of three runs
17.3Δ 0.5
GPT-6.1 Sol130–20; mean of three runs
5.0Δ 11.8
BTTF0.5340–1; higher is more readable
50.8Δ 33.9
Human31–5; original rating
16.8

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.1321.675−43.615
Source linesThe number of non-empty source lines.38+15.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.3.836−5.754

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

Score0.275

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.75.921+0.421
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.32+0.37
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.78+0.361
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.38−0.309
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.36.835+0.105
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.091+0.056

Intercept 0.07 + feature contributions = 1.472 (log-odds).
Score = sigmoid(1.472) = 0.813.

Score0.442
Score18
Run 1

The code has some structural organization with logical separation of conditions, but suffers from multiple readability issues. It uses string reference comparison (==) instead of equals(), which suggests unclear intent. The nesting is moderate but the SwingUtilities.invokeLater wrapper adds unnecessary indirection. Variable naming is cryptic (eName, tr, mee). The TODO comment indicates uncertainty about the code's correctness, undermining clarity. Code length is reasonable but action granularity is poor - multiple operations on single lines reduce readability. The reading flow is disrupted by the anonymous inner class. The initial comment about concurrent regions is helpful but doesn't fully explain the logic. Casting and collection handling could be extracted to helper methods for better granularity.

Run 2

The code has moderate structure but suffers from several readability issues. The method is reasonably organized with a clear intent (handling model changes for transitions), and the comment explains the domain logic. However, the nesting is deep - an inner anonymous Runnable class inside a method creates two levels of indentation, with conditional logic adding more. There are multiple actions per line (type casts, collection checks, and iterator calls combined), reducing clarity. The string comparison using '==' instead of equals() is a bug that also hurts readability by misleading readers. The duplicated collection-handling logic in both if/else branches could be extracted. Variable names are somewhat cryptic ('tr', 'eName', 'mee'). The comment is helpful but the TODO indicates uncertainty about the logic. Overall, the code works but requires careful reading to understand the flow and spot potential issues.

Run 3

The code has some positive aspects like clear method naming, comments explaining the domain logic, and reasonable line length. However, it has several readability issues: string comparison using == instead of equals(), duplicated code blocks for incoming/outgoing cases that could be refactored, and a nested Runnable that adds complexity. The action granularity is mostly good with one action per line, but the nesting depth from the Runnable and if-else blocks hurts readability. The collection pattern of getting the first element is repeated and could be extracted. Variable names like 'tr', 'mee', and 'eName' are too abbreviated and reduce clarity. The TODO comment highlights uncertainty in the code. Overall structure is understandable with clear intent, but implementation details make it less readable than it could be.

Run 1

Code Structure: The method is logically organized around incoming and outgoing events, but duplicates transition extraction and validation. Nesting: The anonymous Runnable and nested conditionals create moderate depth that makes scanning harder. Clarity of intent: The explanatory comment clarifies transition redirection, while abbreviated names such as mee, eName, and tr reduce clarity. String comparisons using == and the unresolved TODO introduce uncertainty about intended behavior. Code length: Reasonably short, though duplicated branches could be consolidated. Action granularity: Statements generally perform one action per line, with readable wrapping of longer calls. Reading flow: Setup proceeds naturally into deferred processing, but repeated casts, chained helper calls, and inconsistent brace placement interrupt the flow.

Run 2

Code Structure: The event handler is logically organized, but incoming and outgoing branches duplicate transition extraction and validation. Nesting: The anonymous Runnable and nested conditionals introduce moderate indentation and make the main logic harder to scan. Clarity of intent: The explanatory comment clearly states the redirection rule, while abbreviated names such as mee, eName, and tr reduce clarity. String comparisons using == and the accompanying TODO leave behavior uncertain. Code length: Reasonably short, though shared extraction logic could eliminate repetition. Action granularity: Each statement generally performs one action, with chained facade/helper calls adding some complexity. Reading flow: Initialization followed by deferred processing is coherent, but duplicated branches, raw Collection casts, and inconsistent brace formatting interrupt an otherwise understandable flow.

Run 3

Code Structure: The event handler is logically organized, but incoming and outgoing branches duplicate transition extraction and validation. Nesting: The anonymous Runnable and nested conditionals create moderate depth. Clarity of intent: The explanatory comment and API calls clarify transition redirection, while abbreviated names such as mee, eName, and trCollection reduce clarity. String comparisons using == and the unresolved TODO make the intended matching behavior uncertain. Code length: Reasonably short, though shared extraction logic could reduce repetition. Action granularity: Statements generally perform one action per line, with chained API calls adding some complexity. Reading flow: Execution proceeds naturally from event data capture to deferred handling, but inconsistent brace formatting, raw Collection casts, and duplicated branches interrupt the flow.