Sample

Dorn/python/61

Human rating uses the original dataset scale.

DatasetDorn
Human3.74
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0970–1; higher is more readable
73.5Δ 6.4
Dorn0.6880–1; higher is more readable
63.8Δ 16.2
Mi0.8370–1; higher is more readable
99.2Δ 19.2
LLOC22Logical lines; fewer is more readable
26.7Δ 53.2
DeepSeek V4 Pro14.670–20; mean of three runs
74.1Δ 5.8
GPT-6.1 Sol14.330–20; mean of three runs
44.4Δ 35.5
BTTF0.6180–1; higher is more readable
77.4Δ 2.5
Human3.741–5; original rating
79.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.739.345−24.398
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.466−6.699

Intercept 8.87 + feature contributions = -2.227 (log-odds).
Score = sigmoid(-2.227) = 0.097.

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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.044+0.511
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.77.843+0.452
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.732+0.285
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.98+0.235
Indentation frequencyHow rapidly indentation changes from line to line.28+0.231
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.28−0.222

Intercept 0.07 + feature contributions = 0.793 (log-odds).
Score = sigmoid(0.793) = 0.688.

Score0.837
Score22
Run 1

The code is moderately readable but has several issues. The first function is missing its definition and context, making it hard to evaluate. The `else` branch with `errorExit` is reasonable but the tuple formatting is awkward. `pod2Argument` has clear intent with docstring, but the loop logic mixes concerns: it checks for `=cut`, searches for arguments, and accumulates description simultaneously, requiring careful reading. Variable names are generally descriptive ('argument', 'description'), but the regex and inline string concatenation reduce clarity. The `parseOptions` function is incomplete, showing only variable initialization, which limits assessment. Line lengths are acceptable, and nesting is minimal, but action granularity varies - some lines perform multiple conceptual operations. The reading flow is disrupted by the incomplete code and the multi-purpose loop body. Overall, the code has solid foundations but needs clearer separation of concerns and more complete function definitions to improve readability.

Run 2

The code is generally readable with clear function names and docstrings. However, there are minor inconsistencies: the first `if` references an unshown `else` with a multi-line tuple call that slightly disrupts flow, and the `pod2Argument` loop nests string concatenation inside conditionals which could be flatter. Intent is mostly clear, but the regex and POD parsing logic require domain knowledge. Lines are concise, with mostly one action per line, though the multi-line `errorExit` call is verbose. Reading flow is natural top-to-bottom, but the missing context of the first function reduces clarity.

Run 3

The code is generally well-structured and readable. Functions are separated by clear comment blocks, and each has a docstring explaining purpose, parameters, and return values. Nesting is minimal—only one if/else and a single for loop with an inner if/else. Action granularity is mostly one action per line, though a few lines (like the errorExit call) group multiple strings but remain readable. Variable names are clear (e.g., 'argument', 'description', 'found'). Reading flow is natural: parse line-by-line, accumulate description, then return. Minor issues: the 'else' at the start appears detached from an unshown preceding if-block, which could confuse the reader if not included earlier in the original function. The line 'errorExit(1, ( "Internal error...", pod, ))' is slightly cramped. 'result['dest'].replace('-', '_')' logic is clear but could benefit from a comment. Overall, intent is clear each function is focused and concise.

Run 1

Code Structure: Functions and docstrings provide logical organization, but the excerpt begins mid-block and ends in an incomplete function. Nesting: The loop and conditionals are shallow and easy to follow. Clarity of intent: Descriptive names and documentation explain POD parsing, although global options and the incomplete parseOptions body obscure the broader behavior. Code length: The implementation is concise, but long separator lines and verbose type annotations in docstrings add visual bulk. Action granularity: Each statement generally performs one action, making individual steps easy to inspect. Reading flow: pod2Argument follows a natural scan, extract, clean, and return sequence; inconsistent spacing, the abrupt opening, and the embedded POD string interrupt the overall flow.

Run 2

Code Structure: Functions and docstrings provide logical organization, but the excerpt begins mid-block and ends in an unfinished function. Nesting: Shallow loops and conditionals keep complexity low. Clarity of intent: Function names and documentation explain the POD parsing and option setup, though external dependencies and the global options variable reduce self-containment. Code length: The executable logic is concise, but large separator lines and verbose type documentation add visual bulk. Action granularity: Most lines perform a single operation, making individual steps easy to follow. Reading flow: pod2Argument progresses naturally from initialization through parsing to returning results; inconsistent spacing, legacy formatting, and incomplete surrounding code interrupt the overall flow.

Run 3

Code Structure: Functions and separator comments provide clear organization, but the fragment starts mid-block and ends with an incomplete function. Nesting: The loop and conditional are shallow and easy to follow. Clarity of intent: Descriptive function and variable names, plus docstrings, explain the parsing purpose; the regex requires some interpretation, and the global options dependency reduces clarity. Code length: The implementation is concise, though lengthy separators and verbose documentation add visual bulk. Action granularity: Statements generally perform one action per line. Reading flow: The parsing logic progresses naturally from initialization through line processing to cleanup and return, but inconsistent spacing and truncated surrounding code interrupt the flow.