Sample

Dorn/python/96

Human rating uses the original dataset scale.

DatasetDorn
Human3.52
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
22.3Δ 43.5
Scalabrino0.4060–1; higher is more readable
29.8Δ 35.9
Dorn0.5480–1; higher is more readable
47.4Δ 18.4
Mi0.430–1; higher is more readable
42.1Δ 23.7
LLOC22Logical lines; fewer is more readable
26.7Δ 39.0
DeepSeek V4 Pro14.670–20; mean of three runs
74.1Δ 8.4
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 14.6
BTTF0.5380–1; higher is more readable
56.0Δ 9.7
Human3.521–5; original rating
65.7

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.1284.691−42.395
Source linesThe number of non-empty source lines.30+12
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.582−6.873

Intercept 8.87 + feature contributions = -28.398 (log-odds).
Score = sigmoid(-28.398) = 0.

Score0.406

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.80.355+0.492
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.065+0.309
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.83+0.15
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.23−0.107
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.30−0.026
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.821+0.007

Intercept 0.07 + feature contributions = 0.192 (log-odds).
Score = sigmoid(0.192) = 0.548.

Score0.43
Score22
Run 1

The code is generally readable with clear method naming, logical segmentation, and concise comments that explain non-obvious behavior. Structure is reasonable, with methods focused on specific responsibilities. Nesting is minimal, limited to try/except and a simple conditional. Action granularity is mostly good, though some lines combine multiple operations (e.g., binding within loops, timer start with parameter). Reading flow is natural: initialization, event handlers, then status update logic. Minor issues include the inline comment 'for CommandEvent from the Toolbar' being slightly awkward, and the try/except for AttributeError being a slightly fragile pattern. The timer logic — starting a one-shot timer and stopping it in the handler — could be clearer with a named constant instead of the magic number 500. Overall, it's clean and maintainable, but a few small refactors could improve clarity.

Run 2

The code is moderately readable but has several issues. Structure is acceptable with logical method separation, though the timer setup in what appears to be an initializer lacks surrounding context. Nesting is minimal and flat. Intent is generally clear through descriptive method names and comments, but the magic number 500 and the dual event handling for menus/toolbars add ambiguity. Code length is reasonable but could be more concise. Action granularity is mostly one action per line. Reading flow is disrupted by the try/except block in resetStatusBar and unclear timer status-checking logic. The undocumented attribute 'scheduledStatusDisplay' appears unused. Minor improvements like constants for delays, better error handling, and removing unused attributes would improve readability.

Run 3

The code is generally well-structured and readable. It uses clear method names that reflect their purpose, maintains flat nesting with minimal conditional depth, and keeps actions granular—one operation per line for the most part. The timer mechanism and event binding are logically organized. Comments clarify non-obvious behavior, such as the workaround for menu/toolbar status text and the delayed status display. Minor issues include the try/except for accessing different event types, which slightly obscures intent, the commented-out pylint disable, and some redundancy (self.__timer is never None in the condition). Naming like 'self.__timer' is acceptable but could be simplified. Overall, the reading flow is natural, and the code is concise without sacrificing clarity.

Run 1

Code Structure: Event setup and status-handling methods are logically separated, though the excerpt starts mid-method. Nesting: Shallow loops, conditionals, and exception handling keep complexity low. Clarity of intent: Descriptive method names and comments explain status restoration and delayed updates; the broad AttributeError fallback and timer existence check are slightly less explicit. Code length: Compact, with little unnecessary code. Action granularity: Each statement performs a single clear action. Reading flow: Setup naturally leads into event handlers, and each handler is easy to follow. Minor distractions include inconsistent whitespace, an awkwardly worded docstring, and an inline lint directive.

Run 2

Code Structure: Responsibilities are logically separated into initialization, status restoration, delayed updates, and display callbacks, although the initialization fragment lacks its enclosing method. Nesting: Shallow control flow and a simple try/except make the code easy to follow. Clarity of intent: Descriptive method names and explanatory comments clarify event handling and the update delay; scheduledStatusDisplay and the timer existence check lack context. Code length: Concise, with little unnecessary code. Action granularity: Each line generally performs one action, keeping operations easy to scan. Reading flow: Setup proceeds naturally into related callbacks, though inconsistent naming conventions, excess whitespace, and legacy comment formatting slightly reduce polish.

Run 3

Code Structure: Initialization and event handling are logically separated into focused methods, though the snippet starts mid-method. Nesting: Shallow conditionals and a simple try/except keep complexity low. Clarity of intent: Descriptive method names and comments explain status restoration and delayed updates; wx-specific events require some framework knowledge. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one clear action, and inline comments do not obscure execution. Reading flow: Setup naturally leads into handlers and status updates. Minor distractions include inconsistent naming styles, an outdated-looking lint directive, and reliance on the unseen _displayStatus method.