Sample
Dorn/python/28
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 47.4Δ 20.6 |
| Scalabrino | 0.43 | 0–1; higher is more readable | 32.9Δ 35.0 |
| Dorn | 0.366 | 0–1; higher is more readable | 30.1Δ 37.9 |
| Mi | 0.172 | 0–1; higher is more readable | 17.5Δ 50.4 |
| LLOC | 7 | Logical lines; fewer is more readable | 67.7Δ 0.3 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 87.9Δ 19.9 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 93.5Δ 25.5 |
| BTTF | 0.336 | 0–1; higher is more readable | 18.4Δ 49.6 |
| Human | 3.55 | 1–5; original rating | 68.0 |
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. | 538.424 | −17.768 |
| 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.533 | −6.799 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -11.697 (log-odds).
Score = sigmoid(-11.697) = 0.
| Score | 0.43 |
|---|
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 |
| 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. | 9 | −0.426 |
| 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. | 76.818 | +0.412 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.134 | −0.364 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.667 | −0.275 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 10 | +0.191 |
Intercept 0.07 + feature contributions = -0.549 (log-odds).
Score = sigmoid(-0.549) = 0.366.
| Score | 0.172 |
|---|
| Score | 7 |
|---|
Run 1
The code is generally readable with clear test method names that explain intent. Structure is logical with one action per line, flat nesting, and concise length. Minor issues: line continuation formatting for effortOutsidePeriod is slightly awkward, and there's no docstring explaining the test scenarios, but overall the flow is natural and easy to follow.
Run 2
The code is fairly readable. It has a clear structure with two distinct test methods, each testing a specific scenario. Nesting is minimal with no deep indentation or nested blocks. Intent is mostly clear from method names and variable names like `effortOutsidePeriod`. Code length is concise without unnecessary lines. Action granularity is good, with each action on its own line, improving debuggability and readability. Reading flow is natural; each test follows a setup-act-assert pattern. Minor deductions: line 7 splits arguments across two lines, which slightly disrupts flow, and the assertion in `testAddEffortOutsidePeriodToTask` could be clearer about why zero duration is expected. Overall, the code is readable and requires little effort to understand.
Run 3
The code is well-structured with clear test method names that convey intent. Each method contains minimal, logical steps, maintaining flat nesting and one action per line. The use of assertions and straightforward object construction makes the purpose unambiguous. Minor formatting inconsistency in the second method (line break in the constructor arguments) slightly interrupts the reading flow but does not significantly impact readability.
Run 1
Code Structure: Two focused test methods are logically separated. Nesting: Both methods are flat and easy to scan. Clarity of intent: Descriptive test names and explicit assertions clearly communicate the expected duration behavior, though fixture objects require external context. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one clear action. Reading flow: Both tests naturally progress from setup to execution to assertion. Minor readability issues include tightly packed date arguments and inconsistent continuation indentation.
Run 2
Code Structure: Two focused test methods clearly separate distinct scenarios. Nesting: Both methods are flat, with no unnecessary control flow. Clarity of intent: Descriptive test names and straightforward assertions make the expected behavior clear, although task/composite relationships depend on unseen setup. Code length: Concise, with no redundant statements. Action granularity: Each statement performs one primary action; the wrapped constructor remains understandable. Reading flow: Both tests naturally progress from arranging data to adding effort and checking duration. Minor readability issues include tightly packed datetime arguments, inconsistent continuation formatting, and reliance on fixture attributes defined elsewhere.
Run 3
Code Structure: Two focused test methods logically separate distinct duration behaviors. Nesting: Flat statements with no nested control flow make both tests easy to follow. Clarity of intent: Descriptive method and variable names convey the scenarios, though fixture definitions are needed to fully understand self.composite and the relevant period. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action; the effort constructor combines task and timestamp setup appropriately. Reading flow: Both tests follow a natural setup-and-assert sequence. Minor readability issues include tightly packed date arguments, positional timestamp parameters, and inconsistent-looking continuation indentation.