Sample

Buse/97

Human rating uses the original dataset scale.

DatasetBuse
Human2.91
Lines9

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0060–1; higher is more readable
15.2Δ 17.7
Scalabrino0.7710–1; higher is more readable
50.0Δ 17.2
Dorn0.2340–1; higher is more readable
14.1Δ 18.7
Mi0.5940–1; higher is more readable
55.6Δ 22.7
LLOC6Logical lines; fewer is more readable
11.6Δ 21.2
DeepSeek V4 Pro10.670–20; mean of three runs
20.7Δ 12.1
GPT-6.1 Sol15.330–20; mean of three runs
39.9Δ 7.1
BTTF0.5430–1; higher is more readable
56.6Δ 23.7
Human2.911–5; original rating
32.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.322.023−10.627
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.603−6.904
Source linesThe number of non-empty source lines.9+3.6

Intercept 8.87 + feature contributions = -5.061 (log-odds).
Score = sigmoid(-5.061) = 0.006.

Score0.771

Feature contributions

FeatureValueContribution
(log-odds)
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
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.10+0.682
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.96−0.401
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.8.825−0.286
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.9+0.214
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.093+0.043

Intercept 0.07 + feature contributions = -1.185 (log-odds).
Score = sigmoid(-1.185) = 0.234.

Score0.594
Score6
Run 1

The code is nearly unusable as presented. It cuts off mid-expression: the last statement is missing a closing brace and likely more code (e.g., a return statement). The method starts cleanly with a single action creation, but the nested anonymous class increases indentation and splits the logical setup across multiple blocks without visual grouping. The intent is only partially clear—it appears to configure a button action, but the missing return and incomplete `putValue` calls obscure the full purpose. Action granularity is reasonable (one action per line), but reading flow is broken by the abrupt truncation and lack of context. Structure is flat but incomplete; the nested anonymous class is minimal, yet without the closing braces and return, the method cannot compile. Overall, the fragment is understandable in isolation but fails as readable, syntactically complete code.

Run 2

The code is generally readable. It creates an action, assigns a name and icon, and returns it. The structure is clear, but the method name suggests returning an ActionMenu while it actually returns an AbstractAction, which is a type mismatch that hurts clarity. There is minimal nesting and the action is concise. The inline anonymous class is a common pattern. The main issue is the mismatch between the method name and the returned type, which could confuse readers. Overall, the code is understandable and well-structured but has a semantic ambiguity.

Run 3

The code is moderately readable but has structural gaps. The method logic is straightforward: it creates an anonymous AbstractAction, assigns a name and icon, then presumably returns it. However, the snippet is incomplete (missing return statement and closing brace), making intent partially ambiguous. Structure is weak due to the missing return, and the anonymous inner class adds nesting. Action granularity is good—one action per line for the putValue calls. Reading flow is natural but interrupted by the incomplete code. Clarity suffers from unclear context (e.g., showDialog, createImageIcon undefined here). Length is acceptable, not overly verbose. Overall, readable but incomplete and slightly disjointed.

Run 1

Code Structure: The action creation and configuration are logically organized, though the snippet ends before the method's completion. Nesting: The anonymous class adds moderate, manageable nesting. Clarity of intent: Calling showDialog() and assigning a localized name and icon clearly express the action's purpose, although getButtonAction() declares an ActionMenu return type without a visible return. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one distinct action. Reading flow: The sequence from callback definition to action metadata is natural, but the missing closing braces and return leave the overall flow incomplete.

Run 2

Code Structure: The action creation and metadata assignment are logically organized, but the snippet ends without a return or closing method brace. Nesting: The anonymous class introduces modest, manageable nesting. Clarity of intent: Triggering a dialog and setting the action's label and icon are clear, though getButtonAction declares an ActionMenu return type while constructing an AbstractAction, leaving the intended conversion unclear. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one distinct action. Reading flow: Creation, handler definition, and configuration follow naturally, but the incomplete ending interrupts comprehension.

Run 3

Code Structure: Logically groups action creation and property configuration, but the snippet is incomplete, with no return or closing method brace. Nesting: The anonymous class adds modest, manageable nesting. Clarity of intent: Calling showDialog() and assigning an action name and icon clearly indicate UI action setup, though the relationship to the ActionMenu return type is not shown. Code length: Concise, with only minor boilerplate and extra whitespace. Action granularity: Each statement performs one clear action. Reading flow: Naturally progresses from defining behavior to configuring presentation, but the abrupt ending prevents a complete understanding of the method.