Sample

Dorn/python/9

Human rating uses the original dataset scale.

DatasetDorn
Human3.68
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
10.9Δ 64.3
Scalabrino0.2340–1; higher is more readable
15.5Δ 59.7
Dorn0.6170–1; higher is more readable
53.5Δ 21.7
Mi0.3920–1; higher is more readable
37.9Δ 37.3
LLOC34Logical lines; fewer is more readable
5.4Δ 69.8
DeepSeek V4 Pro140–20; mean of three runs
65.9Δ 9.3
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 5.2
BTTF0.5450–1; higher is more readable
57.7Δ 17.5
Human3.681–5; original rating
75.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.2193.605−72.389
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.409−6.614

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

Score0.234

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.48+0.923
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.49−0.704
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.81+0.502
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.671+0.284
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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.104−0.065

Intercept 0.07 + feature contributions = 0.477 (log-odds).
Score = sigmoid(0.477) = 0.617.

Score0.392
Score34
Run 1

The code is moderately readable but has several issues. Structure is partially logical—classes group related tests—but the first `DummyFilter` is incomplete and its `filter` method lacks a return type. Nesting is generally flat, which is good. Clarity of intent is mixed: method names like `testSetTreeMode_True` and `testNoMatch` are self-explanatory, but `DummyFilter`'s purpose is ambiguous due to missing context. Some actions combine multiple operations per line (e.g., the long `ObservableList` instantiation), reducing granularity. Reading flow is natural in most test methods but disrupted by inconsistent naming of filter classes (`DummyFilter` vs. `TestFilter`) and duplicated setup patterns. The `setSearchString` helper is useful but its parameter list is dense. Overall, the code is understandable but could be improved with better naming, more consistent structure, and more one-action-per-line formatting.

Run 2

The code is generally clear and logically organized into test classes with descriptive method names. The structure follows a consistent pattern, and intent is easy to understand. Nesting is minimal, and each line typically performs a single action. However, there are minor readability issues: some lines are broken awkwardly for length, and the `test` method in `TestFilter` contains an inline pylint disable comment that interrupts flow. Additionally, the `DummyFilter` class appears incomplete or truncated, and the `filter` method simply returns its input, which could be confusing without context. Overall, the code is readable but could benefit from slightly cleaner line breaks and fewer inline comments.

Run 3

The code is moderately readable but has several issues. The structure is organized into test classes with setUp methods, which is logical, but the DummyFilter class appears incomplete - it only shows filter() and test() methods without context. Nesting is flat and action granularity is mostly good (one action per line). However, clarity of intent suffers because class definitions are fragmented and some methods like setTreeMode are called but not defined in the visible code. Long lines with multiple parameters (setUp, setSearchString) reduce readability. The reading flow is generally natural, following test patterns, but the incomplete class definitions and unexplained class inheritance make the code harder to follow. Testing nomenclature like testcalled is slightly unclear - should be test_called for better readability.

Run 1

Code Structure: Test classes logically group related behavior, with setup methods separating fixtures from assertions; however, the opening methods lack their enclosing class context. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive test names and straightforward assertions clearly communicate expected behavior, though generic names such as filter1 and filter2 provide limited context. Code length: Concise methods and a reusable search helper avoid unnecessary repetition. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Setup followed by focused tests creates a natural progression. Minor inconsistencies in continuation indentation, older assertion names, camelCase naming, and the inline lint suppression slightly reduce readability.

Run 2

Code Structure: Tests are logically grouped into classes, with shared setup separated from individual cases; however, the opening methods lack their enclosing class context. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive test names and straightforward assertions communicate expected behavior, though generic names such as list and filter provide limited context. Code length: Methods are short and focused, with little unnecessary code. Action granularity: Each statement performs a single clear action; multiline calls remain readable. Reading flow: Setup-to-action-to-assertion ordering is natural and consistent. Minor distractions include inconsistent continuation indentation, trailing whitespace, legacy assertion names, and a pylint suppression comment.

Run 3

Code Structure: Test classes logically group related behavior, with shared initialization in setUp methods, though the opening methods lack their surrounding class context. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive test names and straightforward assertions communicate expected behavior; generic names such as list and filter and the unexplained testcalled flag slightly reduce clarity. Code length: Concise tests and a helper method avoid unnecessary repetition. Action granularity: Each statement performs a single clear action. Reading flow: Setup naturally precedes tests, and spacing separates methods and classes. Minor drawbacks include inconsistent continuation alignment, older assertion names, and a distracting inline lint suppression.