Sample
Dorn/python/56
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 24.8Δ 25.3 |
| Dorn | 0.555 | 0–1; higher is more readable | 47.6Δ 2.5 |
| Mi | 0.58 | 0–1; higher is more readable | 61.6Δ 11.4 |
| LLOC | 24 | Logical lines; fewer is more readable | 23.7Δ 26.5 |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs | 79.9Δ 29.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 30.2 |
| BTTF | 0.455 | 0–1; higher is more readable | 34.0Δ 16.2 |
| Human | 3.35 | 1–5; original rating | 50.1 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 1210.357 | −39.942 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.38 | −6.57 |
Intercept 8.87 + feature contributions = -25.642 (log-odds).
Score = sigmoid(-25.642) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 72.968 | +0.575 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 26 | +0.162 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.11 | −0.125 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.676 | +0.005 |
Intercept 0.07 + feature contributions = 0.219 (log-odds).
Score = sigmoid(0.219) = 0.555.
| Score | 0.58 |
|---|
| Score | 24 |
|---|
Run 1
The code demonstrates clear structure with logical test method organization and good naming conventions. Each method performs one focused action chain: setting up test data, appending, filtering, and asserting. Nesting is minimal, limited to a single if-else conditional for tree/list mode. Intent is clear - these are filter tests for task statuses. Lines are concise with one action per line, maintaining good granularity. Reading flow follows a natural setup-act-assert pattern. Minor deductions: the class definitions are cut off at the edges, and there's slight repetition across test methods that could be refactored, but overall the code is highly readable and maintainable.
Run 2
The code demonstrates good readability with clear test method naming, consistent setup patterns, and one action per line. The structure is logical, with a mixin-based test class design that separates concerns. There is minimal nesting, with only a single conditional in one test. Each test follows a predictable three-step pattern: setup, action, assertion. The use of domain-specific objects (task, list, filter) makes intent clear. The code is concise without being cryptic. Minor improvements could include better variable naming ('list' shadows Python's built-in) and perhaps extracting the conditional logic into separate test methods for even flatter structure. Overall, the code reads naturally and would be easily understood by other developers familiar with the domain.
Run 3
The code is structured as a test class with clear, concise test methods. Each test follows a consistent pattern: set up task state, append to list, apply filter, and assert. The methods are flat and readable, with one main action per line. However, the code is incomplete (the beginning of a method is cut off) and relies on outer class context (e.g., self.task, self.filter) that is not shown, making full comprehension harder. The conditional block in testFilterOverDueTaskWithActiveChild adds minor branching but remains clear. Variable names are descriptive, and the intent of each test is evident from method names. Overall, the code is quite readable but lacks complete context.
Run 1
Code Structure: Tests are logically separated into focused methods, with a distinct class configuring list mode; however, the snippet begins mid-method and depends on unseen setup. Nesting: Mostly flat, with only one simple if/else. Clarity of intent: Descriptive test names and explicit status constants clearly communicate filtering scenarios. Code length: Concise overall, though repeated setup statements add minor duplication. Action granularity: Each line performs one clear operation or assertion. Reading flow: Tests follow a natural setup, filter, and assertion sequence; inconsistent whitespace and the incomplete opening slightly interrupt readability.
Run 2
Code Structure: Tests are logically separated into named methods, with a distinct class for list-mode configuration; however, the snippet begins mid-method, reducing context. Nesting: Mostly flat, with only a simple if/else branch for tree-mode behavior. Clarity of intent: Descriptive test names and assertions clearly communicate the filtering scenarios, although fixture setup and helper implementations are not shown. Code length: Concise overall, with some repeated setup across tests that is reasonable for independently readable tests. Action granularity: Each line performs one clear operation. Reading flow: Setup, filter action, and assertion follow a natural sequence. Minor naming inconsistencies such as 'OverDue' and uneven whitespace slightly detract from polish.
Run 3
Code Structure: Tests are logically separated into descriptive methods, with a distinct class for list-mode configuration; however, the snippet begins mid-method, reducing standalone readability. Nesting: Mostly flat, with only a straightforward if/else branch. Clarity of intent: Test names, status constants, and assertion helpers clearly convey the scenarios and expected outcomes. Code length: Concise overall, though repeated setup statements add minor duplication. Action granularity: Each line performs a single operation, making state changes easy to follow. Reading flow: Setup, filtering, and assertions appear in a natural sequence. Minor whitespace inconsistencies and reliance on unseen fixture definitions slightly hinder readability.