Sample

Dorn/python/24

Human rating uses the original dataset scale.

DatasetDorn
Human3.61
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0420–1; higher is more readable
71.6Δ 0.3
Dorn0.9960–1; higher is more readable
99.7Δ 28.4
Mi0.410–1; higher is more readable
40.7Δ 30.6
LLOC8Logical lines; fewer is more readable
63.9Δ 7.4
DeepSeek V4 Pro5.670–20; mean of three runs
13.9Δ 57.4
GPT-6.1 Sol13.670–20; mean of three runs
37.7Δ 33.6
BTTF0.5540–1; higher is more readable
61.6Δ 9.7
Human3.611–5; original rating
71.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.287.919−9.501
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.331−6.497
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -3.129 (log-odds).
Score = sigmoid(-3.129) = 0.042.

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.0+3.665
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.1+1.001
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0+0.942
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.78.909+0.469
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.0−0.41
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398

Intercept 0.07 + feature contributions = 5.432 (log-odds).
Score = sigmoid(5.432) = 0.996.

Score0.41
Score8
Run 1

The code snippet is difficult to read due to several factors. It lacks surrounding context, making the purpose ambiguous. The use of abbreviations like `_er`, `dtpref_cols`, and `dtpref_rows` obscures intent. The nesting is shallow, but the logic flow is disjointed. The first conditional returns early, which is good, but the second conditional bundles multiple actions: assignment, update, and a method call. The third conditional abruptly returns a different method call with keyword arguments, breaking the logical flow. Variable names like `data` and `source` are generic. The string literal `'Saved changes.'` is hard-coded, and the `self.manage_main(self, ...)` call looks like a potential mistake—passing `self` to its own method. Overall, the code lacks clarity and cohesive structure, making it hard to understand without additional context.

Run 2

The code has a somewhat logical flow (check for submit, update source, render, handle request) but suffers from several readability issues. The first condition is flat but contains a non-standard `has_key` call, which is outdated and unclear. The second condition correctly nests only one line, which is good. However, the third condition nests multiple actions under a single `if`, reducing action granularity. The assignment `message="Saved changes."` lacks spacing around the operator, and the function call `self.manage_main(self, REQUEST, ...)` is redundant and confusing. The overall structure is acceptable, but clarity of intent is weakened by ambiguous variable names like `_er`, `dtpref_cols`, and `dtpref_rows`. Reading flow is disrupted by inconsistent spacing and the use of `REQUEST` as both a condition and an argument. Concise but not highly readable.

Run 3

This code is largely unreadable due to multiple factors. The structure is confusing and lacks logical organization, with conditional returns and state changes interleaved. Nesting is minimal but the flow is disjointed. Clarity of intent is very poor: unclear variable names like '_er', 'dtpref_cols', 'SUBMIT', and 'REQUEST' obscure purpose. Action granularity is mixed, with some lines performing multiple conceptual steps. Reading flow is unnatural, jumping between state checks, side effects, and returns with no cohesive narrative. The string literal 'message=' has inconsistent quoting. Overall, the code requires significant effort to understand its purpose, data flow, and control logic.

Run 1

Code Structure: Three sequential conditionals provide a simple organization, although the opening triple quote makes it unclear whether this is executable code or a string fragment. Nesting: Shallow nesting is easy to follow. Clarity of intent: Updating the source, rendering, and reporting saved changes are understandable, but abbreviations such as _er and dtpref_cols obscure the first branch. Code length: The snippet is concise without obvious redundancy. Action granularity: Each line performs one main action. Reading flow: Blank lines separate logical steps, but the early return, unexplained REQUEST usage, legacy has_key call, and inconsistent assignment spacing slightly interrupt readability.

Run 2

Code Structure: The conditional blocks are logically separated, but the leading triple quote makes it unclear whether this is executable code or an incomplete string. Nesting: Shallow nesting keeps the snippet easy to scan. Clarity of intent: Updating the source, rendering, and reporting saved changes are understandable, but names such as _er and dtpref_cols obscure details. Code length: Concise, with no obvious unnecessary code. Action granularity: Each statement performs one action, supporting readability. Reading flow: The early return and sequential checks provide a natural flow, although missing context, inconsistent assignment spacing, and the unexplained manage_main(self, ...) call introduce ambiguity.

Run 3

Code Structure: The checks, update, rendering, and response handling are logically grouped. Nesting: Shallow conditionals make the snippet easy to scan. Clarity of intent: Updating the source and displaying a save confirmation are clear, but abbreviated names such as _er and dtpref_cols obscure details. The opening triple quote also makes it unclear whether this is executable code or an incomplete string/comment block. Code length: Concise, with no obvious unnecessary statements. Action granularity: Each line performs one main action. Reading flow: The progression from checking changes to updating and responding is natural, though the unexplained early return and missing surrounding context reduce clarity.