Sample

Dorn/python/20

Human rating uses the original dataset scale.

DatasetDorn
Human3
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0010–1; higher is more readable
61.3Δ 32.0
Scalabrino0.3840–1; higher is more readable
28.3Δ 1.0
Dorn0.1060–1; higher is more readable
7.2Δ 22.0
Mi0.580–1; higher is more readable
61.3Δ 32.0
LLOC7Logical lines; fewer is more readable
67.7Δ 38.4
DeepSeek V4 Pro7.670–20; mean of three runs
27.2Δ 2.1
GPT-6.1 Sol13.670–20; mean of three runs
37.7Δ 8.5
BTTF0.5020–1; higher is more readable
45.4Δ 16.2
Human31–5; original rating
29.2

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.377.405−12.454
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.736−7.104
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -6.689 (log-odds).
Score = sigmoid(-6.689) = 0.001.

Score0.384

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.122.909−1.541
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
Indentation frequencyHow rapidly indentation changes from line to line.10−0.391
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.887−0.272
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.9+0.214
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.103−0.06

Intercept 0.07 + feature contributions = -2.137 (log-odds).
Score = sigmoid(-2.137) = 0.106.

Score0.58
Score7
Run 1

The code has several readability issues. The stray `return subject, content` at the top is orphaned and confusing. The regex variable name `charset_re` is clear, but the regex itself is not commented or documented. The `getSubject` function uses a complex generator expression inside `join`, combining decoding, conditional logic, and tuple unpacking in one line — violating action granularity and clarity. The missing whitespace around the operator in `'charset="?([-0-9a-zA-Z]+)?"'` slightly hurts readability. Nesting is low, but the try/except with fallback to raw subject is reasonable. Overall structure is minimal, but the orphaned line and dense one-liner make intent harder to grasp quickly.

Run 2

The code has readability issues: an orphaned return statement at the top, a module-level regex placed between code fragments, and a generator expression with conditional decoding that combines multiple actions on one line. Key functions use single-letter variable names (u, part[0], part[1]) reducing clarity. The try/except is reasonable, but the action granularity and reading flow are poor due to dense expressions and disconnected ordering. Structure is confusing because the initial return, regex, and function definition lack clear logical grouping or comments. Nesting is low, which is good, but clarity of intent and code length suffer — the inline conditional decoding is concise yet hard to parse. Overall, the code requires careful reading to understand its flow and purpose.

Run 3

The code is quite difficult to read due to several issues. The function begins with an invalid line ("return subject, content") that appears to be a leftover or misplaced statement. The regex is named but lacks explanation. The getSubject function uses a dense generator expression that combines decoding logic into a single line, violating action granularity and clarity. This one-liner also makes the reading flow disjointed. There's minimal error handling (only UnicodeDecodeError), and no docstring or comments to explain the purpose of header decoding. The nesting is low, which is good, but the overall organization feels incomplete and fragmented, likely due to the stray first line. Variable names are okay, but the ternary and join inside the generator make it hard to parse at a glance.

Run 1

Code Structure: The function is logically organized, but the leading return and unused charset regex make the snippet feel disconnected. Nesting: Shallow, with only a try/except block, though the generator's inline conditional adds complexity. Clarity of intent: getSubject clearly extracts and decodes an email subject, but positional tuple access obscures the decoded parts' meaning. Code length: Concise, although the long return expression compresses too much logic. Action granularity: Most lines perform one action, but the return line combines header decoding, iteration, conditional character decoding, and joining. Reading flow: The function flows naturally from extraction to decoding to fallback, but surrounding fragments and the dense expression interrupt readability.

Run 2

Code Structure: The function is logically organized, but the preceding return and unused charset regex appear disconnected in this excerpt. Nesting: Minimal nesting, with a simple try/except and an inline conditional. Clarity of intent: The function name and variables communicate subject decoding, although the compact decoding expression requires careful reading. Code length: Concise overall, but the long return line would benefit from intermediate variables or line breaks. Action granularity: Retrieval and error handling are separated, while decoding header parts, conditionally converting them, and joining results are combined on one line. Reading flow: The function follows a natural retrieve-decode-fallback sequence, but the unrelated opening statements and dense expression interrupt readability.

Run 3

Code Structure: The function is organized simply, but the leading return statement lacks context and charset_re is unused in the shown function. Nesting: Minimal nesting, with only a try/except and an inline conditional. Clarity of intent: getSubject clearly retrieves and decodes an email subject, though part[0] and part[1] are less descriptive than named variables. Code length: Concise overall, but the decoding expression is compressed into one long line. Action granularity: Most lines perform one action; the return line combines header decoding, iteration, conditional character decoding, and joining. Reading flow: The function flows naturally from retrieval to decoding and fallback, but the unrelated opening lines and dense return expression interrupt readability.