Sample

Buse/72

Human rating uses the original dataset scale.

DatasetBuse
Human2.86
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0210–1; higher is more readable
23.2Δ 4.5
Scalabrino0.4260–1; higher is more readable
10.6Δ 17.2
Dorn0.1050–1; higher is more readable
1.0Δ 26.8
Mi0.2940–1; higher is more readable
15.2Δ 12.6
LLOC5Logical lines; fewer is more readable
29.8Δ 2.0
DeepSeek V4 Pro11.670–20; mean of three runs
23.2Δ 4.5
GPT-6.1 Sol12.330–20; mean of three runs
14.1Δ 13.6
BTTF0.4050–1; higher is more readable
22.2Δ 5.6
Human2.861–5; original rating
27.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.283.634−9.36
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.379−6.569
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = -3.859 (log-odds).
Score = sigmoid(-3.859) = 0.021.

Score0.426

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.130−1.841
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.6+0.824
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
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.794−0.301
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.075+0.216

Intercept 0.07 + feature contributions = -2.141 (log-odds).
Score = sigmoid(-2.141) = 0.105.

Score0.294
Score5
Run 1

The code is incomplete, making a full evaluation difficult. It shows reasonable formatting and basic intent, but the variable naming (e.g., 'str', 'device') is vague, and the logic is partly clear. However, it lacks proper structure, has an unfinished conditional block, and no error handling or comments. The action granularity is okay, but the overall readability is low due to ambiguity and incomplete implementation.

Run 2

The code is fairly readable with a clear, single-purpose method. It starts by calling the superclass renderer and casting the result to JLabel, which is straightforward. The structure is logical: setup, type check, and (presumably) configuration follow in sequence. Nesting is minimal, with only one if-statement visible, keeping the flow flat and easy to follow. Intent is clear—the method is a standard Swing renderer implementation that handles DeviceIf values. However, the code ends abruptly at the type check, lacking the actual rendering logic, which makes the snippet incomplete and slightly ambiguous. The variable 'str' is declared but unused, suggesting either dead code or missing context. Action granularity is good: each line performs one logical operation. Length is concise, but the incomplete nature and unused variable detract from overall clarity. With the rest of the method and removal of the unused 'str', it would likely score higher.

Run 3

The code is relatively readable with clear intent and logical structure. It follows standard Swing renderer patterns, and variable names like 'label', 'value', 'isSelected' are descriptive. The action granularity is good, with one main operation per line. The nesting is shallow, and the instanceof check makes the type handling clear. However, the code snippet is incomplete, making it hard to fully assess flow and purpose. The 'str' variable is declared but unused in the visible portion, and the abrupt ending hurts readability. Overall, it demonstrates solid fundamentals but lacks enough context for a higher score.

Run 1

Code Structure: The visible statements are logically organized, but the snippet ends inside an unfinished conditional, preventing assessment of the complete method. Nesting: Only one conditional level is shown, so nesting is shallow. Clarity of intent: The renderer override and DeviceIf type check suggest a clear purpose, but generic names such as str and the missing continuation obscure the intended rendering behavior. Code length: The excerpt is concise, though blank lines add some visual fragmentation. Action granularity: Each statement performs one primary action; the superclass call combined with a cast and assignment is conventional Java. Reading flow: Execution proceeds naturally from obtaining a label to checking and casting the value, but the abrupt ending interrupts the flow.

Run 2

Code Structure: The visible portion is logically organized, starting with superclass rendering before handling device values, but the incomplete method prevents assessing its full structure. Nesting: One conditional introduces shallow, readable nesting. Clarity of intent: The renderer method and device type check convey purpose, though 'str' is vague and its role is unknown. Code length: The excerpt is concise, with some unnecessary blank lines and a long method signature. Action granularity: Each statement performs one main action. Reading flow: Execution proceeds naturally from label creation to type checking and casting, but the abrupt ending leaves the behavior and return path unclear.

Run 3

Code Structure: The visible statements are logically organized, but the snippet ends mid-block, preventing assessment of the complete method. Nesting: Only one conditional level is shown, keeping complexity low. Clarity of intent: The renderer method and DeviceIf check suggest device-specific rendering, but the unfinished logic and vague variable name str obscure the intended result. Code length: The excerpt is concise, though extra blank lines slightly interrupt cohesion. Action granularity: Each statement performs one action, making individual operations easy to follow. Reading flow: Calling the superclass renderer before checking the value type is natural, but the abrupt ending, missing return, and unclosed blocks leave the overall flow incomplete.