Sample

Dorn/python/2

Human rating uses the original dataset scale.

DatasetDorn
Human3.66
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
29.0Δ 45.7
Scalabrino0.3940–1; higher is more readable
28.7Δ 46.0
Dorn0.8240–1; higher is more readable
80.8Δ 6.1
Mi0.7450–1; higher is more readable
92.5Δ 17.8
LLOC30Logical lines; fewer is more readable
11.4Δ 63.2
DeepSeek V4 Pro13.670–20; mean of three runs
62.8Δ 11.8
GPT-6.1 Sol16.330–20; mean of three runs
70.8Δ 3.9
BTTF0.5070–1; higher is more readable
46.8Δ 27.9
Human3.661–5; original rating
74.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.1392−45.936
Source linesThe number of non-empty source lines.50+20
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.649−6.974

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

Score0.394

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.46+0.854
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.80.98+0.502
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.49.89+0.288
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.80.922+0.238
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.101−0.037

Intercept 0.07 + feature contributions = 1.543 (log-odds).
Score = sigmoid(1.543) = 0.824.

Score0.745
Score30
Run 1

The code has some good qualities, like a clear class structure and readable docstrings/action granularity, but suffers from a confusing top-level flow and unnecessary length. The initial `dlg.exec_()` appears orphaned before the `show_current_error` function, which disrupts logical organization. The `ExceptHookDialog` class is coherent but its constructor is overly long, packing multiple UI setup operations without visual separation. Exception naming (`exc_type`, `exc_obj`, `exc_tb`) is reasonably clear, and the `install`/`uninstall` functions are concise and intent-revealing. However, the top-level code order—an orphaned call, then functions, then class—impairs reading flow. Redundant blank lines and mixed quote styles reduce polish. Overall, the code is understandable but would benefit from reordering, splitting the constructor, and removing the stray initial call.

Run 2

The code is generally well-structured and readable. The main dialog class is logically organized with clear method names and consistent formatting. The top-level functions (show_current_error, install, uninstall) have clear purposes. However, there is a stray 'dlg.exec_()' line at the top that appears to be orphaned or misplaced, which breaks the reading flow. Action granularity is mostly good with one action per line, though some lines like the string formatting and method chaining could be split for slightly better clarity. The nesting is flat and the code avoids deep indentation. Overall, the code is concise and maintains good Python conventions, but the leftover artifact at the beginning detracts from its readability.

Run 3

The code has some logical organization with functions and a class, but suffers from several readability issues. The opening line 'dlg.exec_()' appears orphaned at the top, creating confusion about context. The ExceptHookDialog class is placed after functions that reference it, disrupting natural reading flow. Docstrings provide clear intent but are inconsistent in style. Nesting is minimal and action granularity is generally acceptable. However, the code could benefit from better grouping of related functions, a class docstring, and improved overall structure. The mix of UI setup operations in __init__ is reasonable but the initial orphaned call and scattered function placement reduce clarity.

Run 1

Code Structure: Functions and the dialog class separate responsibilities logically, though the initial orphaned statement and module-level registration weaken organization. Nesting: Very shallow, with only one conditional, making the code easy to follow. Clarity of intent: Descriptive function names, UI attributes, and short docstrings communicate error-dialog handling clearly; abbreviated variables and unexplained framework calls require some background knowledge. Code length: Concise overall, although excessive blank lines add visual clutter. Action granularity: Each line generally performs one action, with no compressed multi-statement lines. Reading flow: Initialization progresses naturally from UI setup to error formatting and display, but the incomplete opening context and inconsistent spacing slightly interrupt the flow.

Run 2

Code Structure: Functions and the dialog class have distinct responsibilities, but the initial dangling statement and module-level registration weaken organization. Nesting: Almost entirely flat, with only one simple conditional. Clarity of intent: Descriptive function names and short docstrings explain error handling; abbreviated variables and unexplained Qt setup methods slightly reduce clarity. Code length: Concise overall, though excessive blank lines add visual noise. Action granularity: Each statement performs one clear action. Reading flow: The constructor follows a natural initialization sequence, but the incomplete opening context and inconsistent spacing interrupt an otherwise straightforward flow.

Run 3

Code Structure: Small, purpose-focused functions and a dedicated dialog class provide logical organization, though the leading isolated dlg.exec_() and inconsistent spacing disrupt the snippet. Nesting: Minimal nesting makes control flow easy to follow. Clarity of intent: Descriptive function names and short docstrings clearly communicate error-handler behavior; dlg, msg, and html are understandable but less descriptive, while external UI dependencies require context. Code length: Concise overall, with little unnecessary logic, although excess blank lines add visual noise. Action granularity: Each statement performs a single primary action, making operations easy to scan. Reading flow: Installation, removal, and dialog initialization are straightforward, and the constructor follows a natural setup sequence; the truncated opening and registration between functions and the class slightly interrupt continuity.