Sample

Dorn/python/18

Human rating uses the original dataset scale.

DatasetDorn
Human3.74
Lines49

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0010–1; higher is more readable
60.2Δ 20.1
Scalabrino0.3750–1; higher is more readable
27.1Δ 53.1
Dorn0.7640–1; higher is more readable
73.0Δ 7.2
Mi0.3010–1; higher is more readable
29.0Δ 51.3
LLOC15Logical lines; fewer is more readable
46.5Δ 33.7
DeepSeek V4 Pro14.670–20; mean of three runs
74.1Δ 6.1
GPT-6.1 Sol120–20; mean of three runs
19.9Δ 60.3
BTTF0.5630–1; higher is more readable
64.1Δ 16.2
Human3.741–5; original rating
80.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.843.665−27.841
Source linesThe number of non-empty source lines.49+19.6
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.891−7.337

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

Score0.375

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.50−0.734
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.71.94+0.618
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.036+0.59
Indentation frequencyHow rapidly indentation changes from line to line.33+0.404
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.33−0.336
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.67.8+0.289
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.48.973+0.275

Intercept 0.07 + feature contributions = 1.177 (log-odds).
Score = sigmoid(1.177) = 0.764.

Score0.301
Score15
Run 1

The code is generally readable and straightforward, but has some issues. The function 'cleanup' is logically organized with a single responsibility, and nesting is minimal (one level). Variable names are mostly clear, though 'rx' and 'mt' are slightly cryptic abbreviations. Code length is concise. However, the main block is dense with 12 regexes listed in a nested loop, hurting reading flow. Action granularity is mixed: some lines do multiple things (e.g., 'files.append((int(mt.group(1)), name))' does extraction, conversion, and appending). The use of a regex to extract a revision number for sorting is clever but not immediately obvious. The purpose of deleting all but the highest revision is only implied, reducing clarity. Error handling for missing directories is absent. Overall, it's readable but would benefit from clearer naming, extraction of the regex list into a named constant, and a comment explaining the deletion logic.

Run 2

The code is generally readable with clear intent: it cleans up old build artifacts by keeping only the highest revision of each file pattern. The main function is simple and uses flat nesting with only one level of indentation in the cleanup logic. Variable names like 'path', 'rx', 'files', 'rev', and 'name' are concise but somewhat cryptic—'rx' could be 'pattern' and 'mt' could be 'match' for better clarity. The action granularity is good, with one main operation per line. However, the code imports both 'os' and 're' on one line, which hurts readability slightly. The regex patterns are repetitive but logically organized in a clearly structured list. The sorting mechanism works correctly because tuple sorting puts revision numbers first, but this isn't immediately obvious and could use a comment. Overall the code is compact and functional, but minor improvements in naming and comments would enhance readability.

Run 3

The code has a clear purpose and logical flow, but readability suffers from several issues. The `cleanup` function is reasonably structured with a single loop and conditional, though the list-building and sorting logic could be clearer. Variable names like `rx` and `mt` are cryptic, and the hardcoded regex patterns in `__main__` are difficult to scan. The sorting key relies on regex capture groups, which is not immediately obvious. The list of regex patterns is repetitive and would benefit from a data-driven approach or clearer organization. Nesting is shallow, and actions are mostly one per line, which helps. However, the overall script lacks comments explaining *why* files are being removed or what the version numbers mean. The reading flow breaks down in the long regex list, where patterns blur together. The code is functional but requires domain knowledge to understand fully.

Run 1

Code Structure: The cleanup function and main guard provide logical separation, but the final loop has no body, leaving the snippet incomplete. Nesting: Mostly shallow, with modest nesting in file filtering and the main loops; the conditional before deletion is unnecessary. Clarity of intent: Sorting revisions and deleting all but the newest suggests a clear cleanup purpose, but abbreviated names such as rx and mt and the absence of documentation obscure details. Code length: The function is concise, though the lengthy list of similar regular expressions adds repetition. Action granularity: Most lines perform one action, except the combined import. Reading flow: File discovery, sorting, and deletion follow a natural sequence, but the dense regex list and abrupt ending interrupt comprehension.

Run 2

Code Structure: A separate cleanup function and main guard provide logical organization, but the main loop is incomplete and has no body. Nesting: Mostly shallow, though the conditional around the deletion loop is unnecessary. Clarity of intent: Sorting revisions and deleting all but the latest suggests artifact cleanup, but abbreviated names such as rx and mt, an unused rev variable, and no explanatory docstring reduce clarity. Code length: The function is concise; the long, repetitive regex list adds visual bulk. Action granularity: Most lines perform one action, although the combined import groups two modules. Reading flow: Collection, sorting, and deletion follow a natural sequence, but dense filename patterns and the abrupt ending interrupt comprehension.

Run 3

Code Structure: A focused cleanup function and main guard provide logical organization, but the final loop has no body, leaving the script incomplete. Nesting: Mostly shallow, although nested loops and the unnecessary 'if files' add indentation. Clarity of intent: Sorting revisions and deleting all but the latest is understandable, but abbreviated names such as 'rx' and 'mt' and unexplained filename patterns require interpretation. Code length: The function is concise; the repetitive pattern list dominates the script and could be organized as a named constant. Action granularity: Most lines perform one action, though combining imports slightly reduces consistency. Reading flow: Collection, sorting, and deletion follow a natural sequence, but the large inline regex list and missing final operation interrupt the flow.