Sample
Dorn/python/62
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.002 | 0–1; higher is more readable | 62.1Δ 0.8 |
| Scalabrino | 0.691 | 0–1; higher is more readable | 74.8Δ 11.9 |
| Dorn | 0.357 | 0–1; higher is more readable | 29.0Δ 34.0 |
| Mi | 0.444 | 0–1; higher is more readable | 44.0Δ 18.9 |
| LLOC | 7 | Logical lines; fewer is more readable | 67.7Δ 4.7 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 18.1Δ 44.8 |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs | 34.7Δ 28.3 |
| BTTF | 0.415 | 0–1; higher is more readable | 26.5Δ 36.5 |
| Human | 3.48 | 1–5; original rating | 63.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. | 385 | −12.705 |
| 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.089 | −6.134 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = -6.369 (log-odds).
Score = sigmoid(-6.369) = 0.002.
| Score | 0.691 |
|---|
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. | 10 | +0.682 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.84 | −0.286 |
| 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. | 93 | −0.274 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.092 | +0.052 |
Intercept 0.07 + feature contributions = -0.588 (log-odds).
Score = sigmoid(-0.588) = 0.357.
| Score | 0.444 |
|---|
| Score | 7 |
|---|
Run 1
The code excerpt is difficult to read and evaluate fully. It begins mid-method, mixing unrelated logic and indentation. The first line assigns a ternary result, but the variable names are similar, adding ambiguity. The second line is a multi-line method call that goes against the 'one action per line' guideline. The function definition appears mid-file, and the loop at the end is cut off, creating confusion. There's a lack of clear structure and context, with no comments explaining intent. Nesting isn't deep, but the overall disorganization and missing code make reading flow poor. The readability suffers significantly from these issues, although the lines themselves are syntactically simple.
Run 2
The code snippet is fragmented and lacks context, making it hard to evaluate fully. It begins with an indented line outside a visible function, breaking structural coherence. The conditional expression is readable but combines multiple status assignments in one line, reducing clarity. The function 'testMutualPrerequisites' is incomplete, showing only a few lines, which harms understanding of intent. Nesting is minimal, which is positive, but the fragment ends abruptly with a loop that has no visible body, leaving the action granularity and reading flow unresolved. Overall, the code as presented is disjointed and ambiguous, lacking sufficient surrounding structure to be considered readable.
Run 3
The code snippet is difficult to evaluate fully as it is incomplete and appears to be a fragment from a larger unit test. The structure is tangled: there is an indentation issue with the first line, and the code jumps abruptly from a conditional assertion to a method definition without clear separation. Nesting is minimal but the flow is disorganized, making the intent ambiguous—especially with the unresolved variables 'self', 'planned', and 'task' used without context. The code length is concise, but at the cost of clarity. Action granularity is mixed: the first line packs multiple operations, while the rest is fragmented. The reading flow is unnatural due to missing context and incomplete logic (e.g., the for loop has no body). Overall, the snippet lacks clear structure and meaningful intent, making it hard to follow.
Run 1
Code Structure: The test setup is logically organized, but the snippet starts mid-method and ends with an unfinished loop, limiting context. Nesting: Visible nesting is shallow and easy to follow. Clarity of intent: testMutualPrerequisites and the task relationships clearly communicate a circular-prerequisite test; the preceding status assertion is understandable but disconnected. Code length: Concise, with no obvious unnecessary statements. Action granularity: Each statement performs one clear action; the conditional status assignment is compact without being obscure. Reading flow: Task creation and prerequisite assignment flow naturally, but the abrupt opening, continuation-line alignment, and missing loop body interrupt readability.
Run 2
Code Structure: The test method logically creates two tasks and establishes mutual prerequisites, but the snippet begins mid-method and ends with an unfinished loop. Nesting: Shallow indentation is easy to follow, although the missing loop body prevents assessing its contents. Clarity of intent: Descriptive method and variable names communicate the test's purpose; the conditional status assignment is understandable, but surrounding context is absent. Code length: Concise, with no obvious unnecessary statements. Action granularity: Most lines perform one action; the conditional expression compactly combines selection and assignment without obscuring meaning. Reading flow: Task creation and prerequisite setup proceed naturally, but the abrupt transition from the preceding test fragment and incomplete ending interrupt readability.
Run 3
Code Structure: The visible test setup is logically organized, but the fragment begins mid-block and ends with an unfinished loop. Nesting: Visible nesting is shallow, although the initial indentation lacks context. Clarity of intent: Descriptive method and variable names clearly suggest status checks and mutual prerequisite testing; missing surrounding code limits understanding. Code length: Concise, with no obvious redundancy. Action granularity: Each statement performs a single primary action; the conditional expression remains readable. Reading flow: Task creation and prerequisite linking follow naturally, but the abrupt transition between partial tests and missing loop body interrupt the flow.