Sample

Buse/12

Human rating uses the original dataset scale.

DatasetBuse
Human3.54
Lines7

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.890–1; higher is more readable
86.9Δ 29.3
Scalabrino0.5840–1; higher is more readable
25.8Δ 31.8
Dorn0.7290–1; higher is more readable
68.7Δ 11.1
Mi0.7430–1; higher is more readable
90.9Δ 33.3
LLOC3Logical lines; fewer is more readable
88.9Δ 31.3
DeepSeek V4 Pro80–20; mean of three runs
7.1Δ 50.5
GPT-6.1 Sol18.670–20; mean of three runs
92.9Δ 35.4
BTTF0.520–1; higher is more readable
52.5Δ 5.1
Human3.541–5; original rating
57.6

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)
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.123−6.184
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.102.799−3.392
Source linesThe number of non-empty source lines.7+2.8

Intercept 8.87 + feature contributions = 2.094 (log-odds).
Score = sigmoid(2.094) = 0.89.

Score0.584

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.46.75+1.685
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.5+0.859
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.6−0.53
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.136−0.376
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.6.792−0.315

Intercept 0.07 + feature contributions = 0.988 (log-odds).
Score = sigmoid(0.988) = 0.729.

Score0.743
Score3
Run 1

The code snippet is too short and context-dependent to be highly readable. It shows clear, individual UI actions but lacks variable declarations, setup, or layout configuration. The structure is fragmented, with no surrounding method or class to clarify intent. Nesting is minimal, but the reading flow is broken by blank lines and inconsistent spacing. Action granularity is good—one action per line—but clarity suffers because the purpose of btPanel, panel, ok, and cancel is unknown without additional context. Overall, the readability is moderate but limited by missing context.

Run 2

The code snippet is too fragmented to be considered readable. It shows several actions but lacks surrounding context such as variable declarations, method boundaries, or layout initialization. The structure is disorganized—elements like 'cancel' and 'ok' appear without clear origin, and 'btPanel' is used before its relationship to 'panel' is established. Nesting is minimal, which is positive, but clarity of intent is very low because the purpose of these UI operations is ambiguous without broader context. Code length is concise, but the brevity does not compensate for the missing logical flow. Action granularity is inconsistent: some lines contain a single action (e.g., setting default button), while others mix concerns like adding panels and buttons. Reading flow suffers from disjointed statements that jump between different containers. Overall, the excerpt is unreadable as a standalone piece.

Run 3

The code is a short UI setup snippet with three actions: adding a button to a panel, setting a default button, and adding another panel with a border layout constraint. It is mostly linear and easy to read at the statement level. However, readability is limited because variables like 'btPanel', 'cancel', 'ok', and 'panel' are not defined in the snippet, so intent depends heavily on external context. Leading whitespace is awkward, and there is no grouping or comment explaining the UI hierarchy or purpose. Nesting is absent, which is good, but the reading flow feels slightly disorganized due to the mixed operations on different components. The code is concise, but the lack of surrounding structure prevents a higher score.

Run 1

Code Structure: Logically groups straightforward UI setup, though the surrounding context is absent. Nesting: Flat, with no nested control flow. Clarity of intent: Clearly adds a cancel button, sets the default button, and places the button panel at the bottom; abbreviated names such as btPanel slightly reduce clarity. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one action on its own line. Reading flow: Easy to follow, although setting the default button between panel assembly statements slightly interrupts the grouping.

Run 2

Code Structure: logically groups button-panel setup and placement. Nesting: flat, with no nested control flow. Clarity of intent: clearly adds the cancel button, sets the default button, and places the button panel at the bottom; abbreviated names such as btPanel slightly reduce clarity. Code length: concise, with no unnecessary statements. Action granularity: each line performs one action. Reading flow: straightforward, although excess blank space and configuring the root pane between panel operations slightly interrupt the flow.

Run 3

Code Structure: The statements logically configure buttons and place their panel in the layout. Nesting: The snippet is flat, with no nested control flow. Clarity of intent: Adding the cancel button, setting the default button, and positioning the button panel are clear, though names such as btPanel and ok could be more descriptive. Code length: Three concise statements contain no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: The sequence is natural and easy to follow; excessive blank space slightly weakens visual compactness.