Sample

Dorn/python/115

Human rating uses the original dataset scale.

DatasetDorn
Human3.34
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
33.4Δ 16.4
Dorn0.7350–1; higher is more readable
69.4Δ 19.5
Mi0.4560–1; higher is more readable
46.2Δ 3.6
LLOC32Logical lines; fewer is more readable
8.2Δ 41.6
DeepSeek V4 Pro17.670–20; mean of three runs
97.1Δ 47.2
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 30.5
BTTF0.4770–1; higher is more readable
39.0Δ 10.9
Human3.341–5; original rating
49.9

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.1313.156−43.334
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.533−6.799

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

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.67+0.827
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.49−0.704
Indentation frequencyHow rapidly indentation changes from line to line.37+0.543
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.38−0.309
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.265+0.279
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.67+0.277
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.093+0.037

Intercept 0.07 + feature contributions = 1.02 (log-odds).
Score = sigmoid(1.02) = 0.735.

Score0.456
Score32
Run 1

The code is highly readable with a consistent structure across all methods. Each method follows a predictable pattern: callback invocation, optional list copying, delegation, and return. Nesting is essentially flat, with no conditional or loop structures obscuring the logic. The function names clearly convey intent (getFirst/Next, add/update), and the empty lines after callback calls improve visual separation. Action granularity is appropriate—each line performs a single logical operation. The code length is concise; the repetitive pattern is justified by the domain (new/updated/deleted items). The doAddItem docstring adds helpful context. Minor deductions: the repetitive copy-then-delegate pattern could be refactored, and the empty methods (doAddItem, updateItem) might benefit from docstrings explaining their purpose, but overall this is clean, maintainable code.

Run 2

The code is highly readable and well-structured. Each method is short, focused, follows a clear pattern, and has a single responsibility. Action granularity is excellent, with each significant step on its own line. Nesting is flat, and reading flow is natural—especially the pairing of 'getFirst' and 'getNext' methods for each entity type. Minor deductions could be made for slight repetition, but the consistency aids comprehension. Overall, the code is clean, maintainable, and easy to follow.

Run 3

The code is highly readable due to its consistent structure and clear naming. Each method follows a simple, predictable pattern: pulse the callback, optionally copy a list, and delegate to a helper. Nesting is minimal—no deep conditional blocks. Intent is clear from method names like getFirstNewItem and updateItem. The code is concise, with no unnecessary verbosity, and action granularity is appropriate, with one logical step per line. Reading flow is natural, grouping related 'get' methods together. Minor deductions: the repeated list-copy pattern could be DRYer, and the blank line after callback.pulse() is slightly inconsistent in visual rhythm, though it aids readability. Overall, it is highly maintainable and easy to follow.

Run 1

Code Structure: Methods are logically separated into retrieval, addition, and update operations, with consistent first/next pairs. Nesting: Completely flat control flow makes the code easy to scan. Clarity of intent: Descriptive method and attribute names convey purpose, although _getItem behavior, callback effects, and the meaning of return code 201 are not explained. Code length: Individual methods are concise, but repeated retrieval patterns add some duplication. Action granularity: Each statement performs one primary action, with clear separation between callbacks, copying, parsing, and storage. Reading flow: Consistent formatting and method patterns create a predictable progression. Readability is slightly reduced by stateful iteration through list-copy attributes and the apparently incomplete updateItem method.

Run 2

Code Structure: Small, logically grouped methods separate iteration, addition, and updating, though repeated iterator patterns introduce duplication. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive method and attribute names make most operations clear, and doAddItem has a helpful docstring. However, _getItem behavior and the required first-before-next calling sequence are implicit; updateItem appears incomplete in this excerpt. Code length: Individual methods are concise, but the six similar iteration methods add repetitive length. Action granularity: Each statement performs a distinct operation on its own line, making side effects easy to identify. Reading flow: Consistent formatting and predictable first/next method pairs support natural reading, followed by a straightforward addItem sequence and its extension hook.

Run 3

Code Structure: Small, logically grouped methods separate retrieval, addition, and update operations. Nesting: Entirely flat, making control flow easy to follow. Clarity of intent: Method and attribute names generally explain their roles, and doAddItem has a useful docstring; however, _getItem's behavior, callback effects, and the incomplete updateItem implementation are unclear from this excerpt. Code length: Individual methods are concise, though repeated first/next retrieval patterns add duplication. Action granularity: Each statement performs a distinct operation, with no crowded multi-statement lines. Reading flow: Consistent formatting and paired first/next methods create a natural progression. Readability is slightly reduced by implicit state dependencies: next-item methods rely on copy lists initialized by their corresponding first-item methods.