Sample
Dorn/python/40
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 47.9Δ 20.3 |
| Scalabrino | 0.616 | 0–1; higher is more readable | 62.0Δ 6.2 |
| Dorn | 0.915 | 0–1; higher is more readable | 95.8Δ 27.6 |
| Mi | 0.398 | 0–1; higher is more readable | 38.7Δ 29.5 |
| LLOC | 17 | Logical lines; fewer is more readable | 41.2Δ 27.0 |
| DeepSeek V4 Pro | 5.67 | 0–20; mean of three runs | 13.9Δ 54.3 |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs | 24.4Δ 43.9 |
| BTTF | 0.645 | 0–1; higher is more readable | 84.7Δ 16.4 |
| Human | 3.56 | 1–5; original rating | 68.2 |
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. | 782.665 | −25.828 |
| 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.425 | −6.638 |
Intercept 8.87 + feature contributions = -11.596 (log-odds).
Score = sigmoid(-11.596) = 0.
| Score | 0.616 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 66.935 | +0.83 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 21 | +0.293 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 66.968 | +0.276 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.072 | +0.241 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.882 | +0.008 |
Intercept 0.07 + feature contributions = 2.382 (log-odds).
Score = sigmoid(2.382) = 0.915.
| Score | 0.398 |
|---|
| Score | 17 |
|---|
Run 1
The code fragment is difficult to read due to several factors. The structure is incomplete and lacks context; the first line references undefined variables, making the logic hard to follow. Nesting is moderate, but the flow is disorganized. The intent of the drawing operations is not clearly documented, with magic numbers and unclear variable names (e.g., 'out_button_rect'). Length is concise, but the action granularity is inconsistent, mixing multiple operations per line while leaving others separated. The reading flow is disrupted by unexplained indentation and clipping operations. The second class is clearer but trivial. Overall, missing context, vague naming, and disjointed logic make this code challenging to parse.
Run 2
The code is a partial snippet that begins abruptly with a dangling indentation and unexplained variables, making it difficult to understand in isolation. The initial block is disconnected from any clear function definition, with unclear variable names like `out_button_rect` and `x_extent`. The `FF2TabArt` class has a reasonable structure but is overly verbose; methods like `__init__` and `Clone` are straightforward but add little complexity. Nesting is minimal, and action granularity is mostly one action per line. However, the overall clarity is hurt by missing context, inconsistent indentation, and the fact that the snippet appears to be cut off mid-file. The code's intent is only partly discernible—drawing tabs and buttons—but the fragmented nature and unexplained magic values reduce readability significantly.
Run 3
The code snippet is difficult to read due to several structural issues. It begins mid-function with parameters (close_button_width, tab_height) and an indented block that suggests preceding context is missing, breaking reading flow. Nesting is evident with multiple indentation levels. Action granularity is acceptable, but the overall clarity of intent suffers because variable names and flow are ambiguous without surrounding code. The class definition itself is readable, but the preceding fragment dominates and lacks context. Code length is concise, but the structure appears tangled due to the abrupt start. Reading flow is disrupted by unexplained variables (out_button_rect, out_tab_rect) and operations like DestroyClippingRegion with no setup. Overall, the fragment is only partially readable and would be clearer with complete context and restructuring.
Run 1
Code Structure: The class and methods are logically organized, but the fragment begins mid-expression and ends during Clone, obscuring completeness. Nesting: Visible nesting is shallow and manageable, although the initial indentation lacks context. Clarity of intent: Descriptive names, comments, and docstrings make tab rendering and font copying understandable; the missing surrounding code limits certainty. Code length: The visible operations are concise, though boilerplate docstrings and excess blank lines add little value. Action granularity: Each statement performs one clear action. Reading flow: The drawing sequence and font-setting sequence read naturally, but the abrupt opening, transition from an unidentified method, and truncated ending interrupt the flow.
Run 2
Code Structure: The visible drawing cleanup and FF2TabArt class are logically separated, but the snippet begins mid-expression and ends before Clone is complete. Nesting: Visible nesting is shallow and manageable, although the opening block lacks context. Clarity of intent: Descriptive names and comments make drawing operations and font copying understandable; the incomplete Clone method leaves its outcome unclear. Code length: The code is concise, but trivial constructor and method docstrings add little information. Action granularity: Each statement performs one clear action. Reading flow: Operations follow a natural sequence from rendering to cleanup and class definition, but truncated boundaries, excessive blank lines, and trailing whitespace disrupt readability.
Run 3
Code Structure: The class and methods are logically organized, but the snippet begins mid-expression and ends without completing Clone, making the overall structure harder to assess. Nesting: Visible nesting is shallow and easy to follow, though the initial indentation lacks context. Clarity of intent: Descriptive names, comments, and docstrings communicate tab drawing and font copying clearly; the apparent omission of a return from Clone leaves its behavior uncertain. Code length: The code is concise, although trivial docstrings and extra blank lines add some clutter. Action granularity: Each statement performs a single clear operation. Reading flow: The drawing cleanup and font-copying sequences flow naturally, but the truncated boundaries and transition from an unidentified method into a new class interrupt continuity.