Sample

Buse/55

Human rating uses the original dataset scale.

DatasetBuse
Human2.72
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.2270–1; higher is more readable
46.5Δ 26.3
Dorn0.1940–1; higher is more readable
10.1Δ 10.1
Mi0.0150–1; higher is more readable
1.0Δ 19.2
LLOC5Logical lines; fewer is more readable
29.8Δ 9.6
DeepSeek V4 Pro11.670–20; mean of three runs
23.2Δ 3.0
GPT-6.1 Sol12.670–20; mean of three runs
17.2Δ 3.0
BTTF0.4460–1; higher is more readable
35.4Δ 15.2
Human2.721–5; original rating
20.2

Views

Source code

if (missionChip == null) { GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() .getDefaultConfiguration(); loadMissionChip(gc, color, expertMission); if (expertMission) { missionChip = expertMissionChips.get(color);

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.209.593−6.917
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.252−6.378
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = -1.225 (log-odds).
Score = sigmoid(-1.225) = 0.227.

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.113−1.121
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.9+0.718
Indentation frequencyHow rapidly indentation changes from line to line.7−0.495
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.842−0.3
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.085+0.113

Intercept 0.07 + feature contributions = -1.422 (log-odds).
Score = sigmoid(-1.422) = 0.194.

Score0.015
Score5
Run 1

The code has a flat structure with minimal nesting, which is good, but the readability is undermined by other factors. The purpose of each line is relatively clear, but a chained call (GraphicsEnvironment...getDefaultConfiguration()) is split awkwardly across lines, disrupting reading flow. The variable naming is moderately descriptive, though the overall intent of the snippet is unclear without more context. Action granularity is mostly one action per line, but the null check and subsequent logic could be simplified for clarity. The main issues are the chained method call's poor formatting and the lack of surrounding context to understand the role of 'missionChip' and 'expertMissionChips'.

Run 2

The code is somewhat readable but suffers from several issues. The structure is logical but brief, lacking broader context. Nesting is moderate with two levels of if-statements. The main clarity issue is ambiguous variable naming: 'missionChip', 'expertMission', and 'color' suggest game logic but their relationships are unclear. The GraphicsConfiguration retrieval is a long method chain on one line, reducing readability, although the developer attempted to break it into multiple lines. Action granularity is mostly one action per line. Reading flow is generally natural but could be improved by extracting the GraphicsConfiguration logic into a helper method. The empty line before the closing brace hints at potential missing code or incomplete logic. Overall, the snippet is understandable but lacks context and could benefit from refactoring for better clarity.

Run 3

The code is moderately readable but has some structural issues. The initial null check is clear, and the action of obtaining the GraphicsConfiguration is logically grouped. However, the chained method calls for getting the default configuration are somewhat dense, reducing clarity. The nested if statement adds one level of nesting, which is acceptable but could be flattened for better readability. Action granularity is reasonable—each major operation is on its own line, though the chained calls violate this slightly. The intent is fairly clear: load a mission chip if missing. The variable naming is good ('missionChip', 'expertMission'), aiding comprehension. Overall, the code is understandable but would benefit from refactoring the chained calls into a helper method or variable to improve flow.

Run 1

Code Structure: The null check, configuration lookup, loading, and conditional retrieval form a logical sequence, but the snippet ends without closing braces. Nesting: Two conditional levels are manageable, though the initial indentation adds visual depth. Clarity of intent: Descriptive names suggest lazy loading of a mission chip, but the incomplete branch leaves the final behavior unclear. Code length: Concise, with no obvious redundancy. Action granularity: Each statement performs one primary action; the graphics-configuration lookup contains a moderately long method chain. Reading flow: Execution proceeds naturally from checking availability to loading and retrieving, with useful whitespace, but the abrupt ending interrupts comprehension.

Run 2

Code Structure: The null check, graphics configuration setup, loading, and expert-specific selection are logically organized, but the snippet is incomplete. Nesting: Two conditional levels are manageable, though the unclosed blocks impede readability. Clarity of intent: Descriptive names suggest lazy loading and selecting an expert mission chip; however, the relationship between loadMissionChip and the chip collections is implicit. Code length: Concise overall, with a lengthy graphics-environment call chain. Action granularity: Each statement performs one primary action, although configuration retrieval chains several calls. Reading flow: Indentation and spacing support a natural progression, but the abrupt ending prevents readers from understanding the complete control flow.

Run 3

Code Structure: The initialization sequence is logically organized, but the snippet is incomplete and lacks closing braces. Nesting: Two conditional levels are manageable. Clarity of intent: Descriptive names make lazy loading and expert-chip selection understandable, though the missing remainder leaves the full behavior unclear. Code length: Concise overall; the graphics-configuration lookup is somewhat long. Action granularity: Each statement performs one main action, although the chained lookup combines several retrieval steps. Reading flow: Indentation and spacing support a natural progression from checking to loading to selecting, but the abrupt ending disrupts readability.