Sample
Dorn/python/116
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 57.7Δ 33.7 |
| Scalabrino | 0.48 | 0–1; higher is more readable | 39.5Δ 51.8 |
| Dorn | 0.834 | 0–1; higher is more readable | 82.5Δ 8.9 |
| Mi | 0.301 | 0–1; higher is more readable | 28.7Δ 62.7 |
| LLOC | 20 | Logical lines; fewer is more readable | 32.5Δ 58.9 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 84.5Δ 6.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 11.0 |
| BTTF | 0.595 | 0–1; higher is more readable | 72.4Δ 18.9 |
| Human | 3.97 | 1–5; original rating | 91.4 |
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. | 667.431 | −22.025 |
| 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.356 | −6.534 |
Intercept 8.87 + feature contributions = -7.689 (log-odds).
Score = sigmoid(-7.689) = 0.
| Score | 0.48 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.04 | +0.556 |
| 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. | 77 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 72.129 | +0.359 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 18 | −0.115 |
| 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.59 | +0.004 |
Intercept 0.07 + feature contributions = 1.615 (log-odds).
Score = sigmoid(1.615) = 0.834.
| Score | 0.301 |
|---|
| Score | 20 |
|---|
Run 1
The code is generally readable with clear method names, docstrings explaining intent, and mostly flat nesting. Each method performs a single action per line and follows a logical structure. However, readability is slightly reduced by inline comments, some redundant phrasing in docstrings, and minor verbosity. The while loop introduces mild nesting but remains understandable. Overall, the code is maintainable but could be tightened slightly.
Run 2
The code demonstrates clear structure with cohesive methods and minimal nesting. Each method has a focused responsibility, and docstrings explain intent effectively. However, readability is reduced by inconsistent naming conventions (camelCase methods vs snake_case methods), the cryptic 'AI' abbreviation, and mixed import/style patterns. Some methods like hasSameArgs use concise logic, while updateAllArgsFinal relies on assertions that could benefit from explanatory comments. Overall the flow is logical, but naming inconsistencies slightly hinder natural comprehension.
Run 3
The code is well-structured, with clear method separation and logical organization. Nesting is minimal, with only one while loop and a conditional inside it, keeping the flow flat and understandable. Intent is clearly expressed through descriptive method names and docstrings that explain behavior, including edge cases like order-insensitive argument comparison. Code length is concise, avoiding unnecessary verbosity while maintaining clarity. Action granularity is appropriate, with one logical action per line, such as assignments, assertions, and method calls. Reading flow is natural and sequential, with methods progressing from simpler to more complex logic. Minor areas for improvement include the assertion in updateAllArgsFinal, which could include an explanatory message, and the comment about weakref dereferencing could be clearer. Overall, the code is highly readable and maintainable.
Run 1
Code Structure: Methods are logically separated by responsibility, although the opening return is an incomplete fragment. Nesting: Mostly flat, with only a simple loop and conditional in getCompleteAI. Clarity of intent: Descriptive method names and useful docstrings explain behavior; abbreviations such as AI and argsInfo, plus external dependencies, require some context. Code length: Concise implementations with proportionate documentation. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Straightforward control flow and spacing make the code easy to follow, though inconsistent formatting and naming slightly reduce polish.
Run 2
Code Structure: Methods are logically separated by responsibility, although the leading return lacks its surrounding context. Nesting: Shallow nesting; only getCompleteAI uses a loop with one conditional. Clarity of intent: Descriptive method names and useful docstrings explain behavior, but AI, argsInfo, and topicDefn require domain knowledge. Code length: Implementations are concise, with slightly verbose documentation. Action granularity: Each statement performs one clear action. Reading flow: Straightforward sequential logic and spacing between methods support easy reading; inconsistent whitespace, mixed naming conventions, and the incomplete opening slightly disrupt it.
Run 3
Code Structure: Methods are logically separated and each has a focused responsibility, though the initial orphaned return lacks context. Nesting: Shallow nesting makes the traversal easy to follow. Clarity of intent: Descriptive method names and useful docstrings explain behavior; abbreviations such as AI and argsInfo, plus the unseen private setter, require some context. Code length: Implementations are concise, with documentation proportionate to their purpose. Action granularity: Each statement performs one clear action, without compressed multi-action lines. Reading flow: Consistent method layout and straightforward control flow support natural reading, although inconsistent spacing and capitalization slightly reduce polish.