Sample

Dorn/python/19

Human rating uses the original dataset scale.

DatasetDorn
Human2.75
Lines48

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
2.8Δ 15.0
Scalabrino0.30–1; higher is more readable
21.3Δ 3.5
Dorn0.1690–1; higher is more readable
12.5Δ 5.3
Mi0.0040–1; higher is more readable
1.7Δ 16.2
LLOC33Logical lines; fewer is more readable
6.7Δ 11.1
DeepSeek V4 Pro13.670–20; mean of three runs
62.8Δ 45.0
GPT-6.1 Sol160–20; mean of three runs
66.0Δ 48.2
BTTF0.4780–1; higher is more readable
39.3Δ 21.4
Human2.751–5; original rating
17.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.3115.008−102.795
Source linesThe number of non-empty source lines.48+19.2
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.5.168−7.752

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

Score0.3

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.164−3.281
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.163.98+1.841
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.49−0.699
Indentation frequencyHow rapidly indentation changes from line to line.40+0.646
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.40−0.497
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.47.97+0.261
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.091+0.062

Intercept 0.07 + feature contributions = -1.596 (log-odds).
Score = sigmoid(-1.596) = 0.169.

Score0.004
Score33
Run 1

The code is auto-generated UI setup with a clear linear structure, but readability suffers from long, repetitive lines and excessive Qt boilerplate. Structure is logical (one class, two methods) but the `setupUi` method is a wall of similar calls. Nesting is minimal, which is positive. Clarity of intent is moderate: it's obvious this configures a dialog, but the constant `_fromUtf8()` and `translate()` wrappers obscure the actual string values. Code length is inappropriate for manual reading—though acceptable for generated code, it's verbose. Action granularity is mostly one action per line, but lines are extremely long and combine object creation, property setting, and string conversion. Reading flow is disjointed due to constant repetition of object names and Qt API syntax, making it hard to scan. Overall, readable enough for a machine-generated file but poorly optimized for human comprehension.

Run 2

This is auto-generated PyQt4 UI code, so it has a predictable, linear structure with no deep nesting and clear actions per line. However, it lacks abstraction and is verbose for what it does. The intent is mostly clear (setup a dialog UI), but many repetitive setObjectName calls add noise. The try/except for _fromUtf8 is a minor compatibility shim that slightly interrupts flow. The reading flow is mechanical but consistent. Overall readability is moderate: understandable but dull, repetitive, and not optimized for human maintenance.

Run 3

The code is auto-generated UI setup, which explains its repetitive, attribute-heavy style. Structure is logical and linear, with setupUi clearly organizing widget creation, layout, and signal connections. Nesting is minimal. Intent is unambiguous, though readability suffers from long lines with many arguments and Qt-specific boilerplate. Action granularity is good but some lines perform multiple operations (e.g., setting object name and adding to layout). Reading flow is natural top-to-bottom, but the sheer number of verbose Qt calls makes scanning harder. Overall, it's moderately readable for generated code but lacks conciseness and human-friendly abstraction.

Run 1

Code Structure: Logically organized into a compatibility helper and a UI class, with widget creation, configuration, layout, and signal connections grouped sequentially. Nesting: Shallow, with no complex nested control flow. Clarity of intent: Dialog construction is clear from the class name, UI text, and Qt calls, though generic names such as label and comboBox provide little semantic context. Code length: Reasonably short, but generated boilerplate, repeated translation arguments, and an empty retranslateUi method add noise. Action granularity: Each statement generally performs one action, making operations easy to follow. Reading flow: Natural top-to-bottom initialization, followed by event wiring; however, long lines, densely formatted button flags, and few visual breaks between widget sections reduce scanability.

Run 2

Code Structure: Logically organized into compatibility handling, a UI class, and sequential widget setup, although setupUi lacks visual separation between widget groups. Nesting: Very shallow, with no complicated control flow. Clarity of intent: Qt method names and displayed text clearly convey dialog construction; generic names such as label and comboBox are less descriptive, and the empty retranslateUi method adds noise. Code length: Reasonably short, but generated boilerplate and repeated translation arguments create verbosity. Action granularity: Each statement generally performs one action, making individual setup steps easy to follow. Reading flow: Proceeds naturally from dialog properties to widgets, layout placement, and signal connections. Long lines, densely formatted button flags, and repetitive framework calls slightly hinder scanning.

Run 3

Code Structure: Logically organized into a compatibility helper, UI class, setup method, and translation stub, although setup lacks visual grouping between widgets. Nesting: Very shallow, with no complicated control flow. Clarity of intent: Qt method names and sequential widget construction clearly indicate dialog setup; generic names such as label and comboBox provide limited semantic context. Code length: Reasonable for generated UI code, but repetitive object-name assignments, translation wrappers, and an empty retranslateUi method add boilerplate. Action granularity: Each statement performs one main action, making individual operations easy to follow. Reading flow: Naturally progresses from dialog configuration to widget creation, layout placement, and signal connections. Long unwrapped lines and densely formatted button flags slightly hinder scanning.