Sample

Dorn/python/84

Human rating uses the original dataset scale.

DatasetDorn
Human3.63
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
1.9Δ 70.5
Scalabrino0.0010–1; higher is more readable
0.4Δ 72.0
Dorn0.5550–1; higher is more readable
48.2Δ 24.2
Mi0.1640–1; higher is more readable
16.4Δ 56.0
LLOC40Logical lines; fewer is more readable
1.4Δ 71.0
DeepSeek V4 Pro15.670–20; mean of three runs
82.6Δ 10.2
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 7.9
BTTF0.3940–1; higher is more readable
23.1Δ 49.3
Human3.631–5; original rating
72.4

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.3340.197−110.227
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.753−7.13

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

Score0.001

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.92.98+0.696
Indentation frequencyHow rapidly indentation changes from line to line.41+0.681
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.39−0.474
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.42−0.451
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.129−0.31
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.319+0.28
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.92.902−0.27

Intercept 0.07 + feature contributions = 0.222 (log-odds).
Score = sigmoid(0.222) = 0.555.

Score0.164
Score40
Run 1

The code is well-structured with clear separation into two test classes and focused test methods. Nesting is minimal—only one try/except block exists. Intent is clear through descriptive method names that document expected behavior. Code length is appropriate; there's no unnecessary repetition, and setup/test values are concise. Action granularity is mostly good, though some assertions could be split for better clarity. Reading flow is natural: each test follows a consistent pattern of creating an expected value, creating a test value, then asserting equality. Minor issues include the first test's misleading structure (testing a failure case with a try/except rather than a more explicit assertion), trailing whitespace on one line, and the unusual class name 'PyDateTimeTest' which could be more descriptive.

Run 2

The code is generally readable with clear test method names and straightforward assertions. Structure is logical with separate test classes, but the first class 'PyDateTimeTest' contains a test that tests Python's datetime module rather than the project's date module, suggesting misplaced code. Nesting is minimal except for the try/except block, which is flat enough. Intent is mostly clear, though the first test's purpose is somewhat confusing due to the contradictory fail message. Code length is appropriate. Action granularity is good - one assertion per line. Reading flow is natural with consistent patterns for setting up test dates and asserting results. Minor issues include inconsistent spacing, trailing whitespace, and the commented pragma lines that could be removed for clarity.

Run 3

The code is generally readable but has notable issues. The test class names are inconsistent (PyDateTimeTest vs DateTimeTest), and the first test combines unrelated concerns: testing datetime.date.replace behavior and using a confusing fail message. The try/except block is awkward—the assertion lines after fail are unreachable and marked pragma no cover, reducing clarity. Nesting is minimal, which is good. Most test methods are short, follow AAA pattern (arrange, act, assert) naturally, and use clear variable names. Reading flow is logical within each test. However, the first test's intent is ambiguous and could be simplified with assertRaises. Action granularity is mostly one action per line. The test names are descriptive. Overall structure is adequate but could benefit from consistent class naming and cleaner exception testing.

Run 1

Code Structure: Tests are logically separated into classes and focused methods. Nesting: Almost entirely flat, with only a simple try/except block. Clarity of intent: Descriptive test and variable names communicate expected behavior, though the first test name is cumbersome and its exception-checking pattern obscures intent. Code length: Individual tests are concise; repeated date setup adds modest duplication. Action granularity: Each line generally performs one assignment or assertion. Reading flow: Consistent setup-then-assert patterns make most tests easy to follow. Missing spaces between arguments slightly hinder scanning. The assertion after self.fail is unreachable, and silently accepting ValueError makes the first test less direct than an explicit assertRaises check.

Run 2

Code Structure: Tests are logically separated into classes and focused methods. Nesting: Almost entirely flat, with only a simple try/except block. Clarity of intent: Descriptive method and variable names make expected date behavior clear, although the first test's unusually long name and unreachable assertion after self.fail obscure its intent slightly. Code length: Most tests are concise; repeated date setup is reasonable for independent tests, but the first test could be simplified using an exception assertion. Action granularity: Each line performs one main action. Reading flow: Consistent setup-then-assert patterns make the suite easy to follow, though missing spaces between arguments, trailing whitespace, and long inline comments reduce visual polish.

Run 3

Code Structure: Tests are logically grouped into classes and focused methods. Nesting: Almost entirely flat, with only a simple try/except block. Clarity of intent: Descriptive test and variable names explain expected behavior, although the first method name is cumbersome and its assertion after self.fail is unreachable, making that test confusing. Code length: Most tests are concise; repeated setup is reasonable for independent tests, but the first test contains unnecessary code. Action granularity: Each line performs one primary action, keeping operations easy to follow. Reading flow: Consistent setup-then-assert patterns provide a natural flow, though missing spaces between numeric arguments, trailing whitespace, and lengthy inline comments reduce visual readability.