Sample

Dorn/python/49

Human rating uses the original dataset scale.

DatasetDorn
Human3.69
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
17.0Δ 59.3
Scalabrino0.2580–1; higher is more readable
17.4Δ 58.9
Dorn0.7060–1; higher is more readable
66.3Δ 10.0
Mi0.2340–1; higher is more readable
22.6Δ 53.8
LLOC32Logical lines; fewer is more readable
8.2Δ 68.1
DeepSeek V4 Pro130–20; mean of three runs
59.3Δ 17.0
GPT-6.1 Sol150–20; mean of three runs
52.8Δ 23.5
BTTF0.5770–1; higher is more readable
67.7Δ 8.6
Human3.691–5; original rating
76.3

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.1827.06−60.293
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.531−6.796

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

Score0.258

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Indentation frequencyHow rapidly indentation changes from line to line.43+0.75
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.44−0.589
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.73+0.573
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.72.98+0.373
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.851+0.287
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.079+0.179

Intercept 0.07 + feature contributions = 0.874 (log-odds).
Score = sigmoid(0.874) = 0.706.

Score0.234
Score32
Run 1

The code has a moderately clear structure with three class definitions and one function, but suffers from several readability issues. The first line appears orphaned with odd indentation, making it unclear if it belongs to a previous context. Class names use lowercase (smart_install_data, build_data), violating standard Python conventions and reducing clarity. Missing blank lines between class methods hurt readability. The build_data.run method has a moderate nesting level (two loops deep) but lacks explanatory comments for non-obvious operations. Variable names like 'f', 'dir', and 'data' are too generic. The do_setup function is reasonably clear but could benefit from comments explaining the Python 3 conditional logic. Most lines contain single actions, but the overall flow feels disconnected due to the orphaned first line and lack of documentation. Type hints are absent. The code feels like a fragment extracted from larger context, making intent harder to grasp.

Run 2

The code is moderately readable but lacks cohesion. The opening line is orphaned, likely a remnant or incorrectly placed function call, which hurts clarity. The classes `smart_install_data` and `build_data` have logical purposes and are fairly flat, with clear intent in method names like `run`, `initialize_options`, and `finalize_options`. However, `build_data.run` contains a nested loop that could be simplified or made more explicit with helper functions. Variable reuse (`dir`, `data`) is minor but reduces clarity. `do_setup` is concise and readable, though it mixes packaging concerns with Python 3 compatibility logic. Overall structure jumps from a stray call to class definitions to a setup function without a clear top-level flow. Nesting is acceptable but not minimal. Action granularity is mostly one action per line, and reading flow is somewhat disrupted by the orphaned line and duplicate command class assignments across multiple branches.

Run 3

The code has reasonable structure with distinct classes and functions, but several issues reduce readability. The first line appears orphaned without context. Classes lack docstrings except for one reference comment. The build_data class has empty methods and the run method does multiple operations per line (path conversion, joining, mkpath). Variable names like 'f' and 'dir' are vague. The nesting in build_data.run is moderate (two levels), but action granularity could be better. The flow jumps from class definition to module-level code without clear separation. Error handling is absent. Overall intent is somewhat clear for setup-related operations, but improvements in naming, comments, and line breaks would help readability.

Run 1

Code Structure: Classes and the setup function separate responsibilities logically, though the opening fragment lacks context and command registration occurs at module scope. Nesting: Mostly shallow, with a manageable nested loop and simple version conditional. Clarity of intent: Method names and comments explain installation and build behavior, but generic names such as f and dir obscure details, and dir shadows a built-in. Code length: Concise overall; empty lifecycle methods are understandable framework boilerplate. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: Installation customization, data building, registration, and setup follow a reasonable sequence, but inconsistent spacing, dictionary alignment, and the incomplete opening slightly disrupt readability.

Run 2

Code Structure: Distinct command classes and a setup function organize responsibilities logically, though the opening fragment lacks context and global subcommand registration interrupts the flow. Nesting: Mostly shallow, with an understandable two-level loop for copying data files. Clarity of intent: Method calls and comments convey installation and build behavior, but generic names such as f, dir, and data reduce precision. Code length: Concise overall; empty option methods add boilerplate but fit the command interface. Action granularity: Statements generally perform one action per line, making execution easy to follow. Reading flow: Progression from command definitions to registration and setup is natural, but inconsistent spacing, dictionary indentation, and the incomplete opening slightly hinder readability.

Run 3

Code Structure: Classes and the setup function separate responsibilities logically, although the opening fragment lacks context and global command registration interrupts the organization. Nesting: Mostly shallow, with a straightforward two-level loop for copying data files. Clarity of intent: Method names and comments explain installation and build behavior, but generic names such as f, data, and dir reduce precision; dir also shadows a built-in. Code length: Concise overall, with minimal boilerplate and little unnecessary repetition. Action granularity: Each line generally performs one clear action. Reading flow: Progression from command classes to registration and setup is natural, but inconsistent spacing, dictionary alignment, and the incomplete opening slightly disrupt readability.