Sample

Dorn/python/13

Human rating uses the original dataset scale.

DatasetDorn
Human3.39
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.5630–1; higher is more readable
82.5Δ 27.6
Dorn0.8190–1; higher is more readable
79.7Δ 24.8
Mi0.6540–1; higher is more readable
73.3Δ 18.4
LLOC6Logical lines; fewer is more readable
72.8Δ 18.0
DeepSeek V4 Pro13.330–20; mean of three runs
61.0Δ 6.1
GPT-6.1 Sol150–20; mean of three runs
52.8Δ 2.1
BTTF0.4890–1; higher is more readable
41.8Δ 13.1
Human3.391–5; original rating
54.9

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.212.607−7.016
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.3.735−5.602
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = 0.252 (log-odds).
Score = sigmoid(0.252) = 0.563.

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.60.818+1.089
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
Indentation frequencyHow rapidly indentation changes from line to line.8−0.46
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.9.871−0.272
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.60.909+0.178
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.111−0.138

Intercept 0.07 + feature contributions = 1.512 (log-odds).
Score = sigmoid(1.512) = 0.819.

Score0.654
Score6
Run 1

The code is clear and concise with a logical structure and natural reading flow. It uses early returns to avoid nesting, keeps one action per line, and clearly states its purpose with a docstring. Minor issues: the first condition uses `== None` instead of the more Pythonic `is None` and slightly awkward line break, and the second `if` block could be merged into the first for brevity. Overall readability is high.

Run 2

The code is highly readable with excellent structure and clarity. It has low nesting (only two shallow conditionals), clear intent (validating drag event preconditions), and good action granularity. The docstring and early returns make the logic self-documenting. Minor issues prevent a perfect score: the first condition is slightly verbose and could be simplified, and 'if not item.type()' relies on implicit boolean conversion which could be made explicit. Overall, the code is concise, flat, and follows a natural reading flow from validation to action.

Run 3

The code has significant readability issues. The docstring is oddly placed with extra indentation and blank lines. The first condition is overly verbose and confusing: comparing a bitwise AND result to None is semantically wrong—it should check for a boolean or zero. The nesting is shallow, which is good, but the logic is unclear. Variables are inconsistently named (item vs currentItem). The magic number/type check (if not item.type()) is ambiguous. Overall, the intent is not clear, conditions are convoluted, and it lacks comments or meaningful structure.

Run 1

Code Structure: Logically organized guard clauses precede item validation. Nesting: Flat control flow with early returns is easy to follow. Clarity of intent: The drag-event docstring provides context, but comparing a button bitmask to None is confusing and likely incorrect; the meaning of item.type() is also unclear. Code length: Concise, though currentItem() is called twice unnecessarily. Action granularity: Each statement performs a single action, while the compound condition combines related checks reasonably. Reading flow: Generally natural, but inconsistent spacing, a needlessly multiline docstring, and using == None instead of is None reduce readability.

Run 2

Code Structure: Logically organized as sequential guard clauses followed by item retrieval. Nesting: Flat, with early returns preventing deeper nesting. Clarity of intent: The drag-event description and checks suggest a clear purpose, but comparing a button bitmask to None is confusing, and the meaning of a falsy item type is unexplained. Code length: Concise overall, though currentItem() is called repeatedly and the docstring could occupy one line. Action granularity: Each statement performs a single action; the compound condition combines related prerequisites reasonably. Reading flow: Generally natural, but inconsistent spacing, redundant parentheses, and the multiline condition slightly hinder readability.

Run 3

Code Structure: Logically organized as sequential guard clauses followed by item retrieval. Nesting: Flat, with early returns that avoid nested conditionals. Clarity of intent: The drag-event context is apparent, but the brief docstring adds little, and comparing a button-mask result to None obscures whether the intent is to check that the left button is pressed. The meaning of item.type() is also unclear. Code length: Concise, although currentItem() is called twice and the docstring could fit on one line. Action granularity: Each statement performs one main action; the combined guard condition remains manageable. Reading flow: Generally natural, but excess parentheses, inconsistent spacing, and the multiline condition slightly interrupt scanning.