Sample
Buse/12
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.89 | 0–1; higher is more readable | 86.9Δ 29.3 |
| Scalabrino | 0.584 | 0–1; higher is more readable | 25.8Δ 31.8 |
| Dorn | 0.729 | 0–1; higher is more readable | 68.7Δ 11.1 |
| Mi | 0.743 | 0–1; higher is more readable | 90.9Δ 33.3 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 31.3 |
| DeepSeek V4 Pro | 8 | 0–20; mean of three runs | 7.1Δ 50.5 |
| GPT-6.1 Sol | 18.67 | 0–20; mean of three runs | 92.9Δ 35.4 |
| BTTF | 0.52 | 0–1; higher is more readable | 52.5Δ 5.1 |
| Human | 3.54 | 1–5; original rating | 57.6 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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.
| Score | 0.584 |
|---|
Feature contributions
| Feature | Value | Contribution (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.
| Score | 0.743 |
|---|
| Score | 3 |
|---|
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.