Sample
Dorn/python/30
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 14.5Δ 79.7 |
| Scalabrino | 0.623 | 0–1; higher is more readable | 64.3Δ 29.8 |
| Dorn | 0.569 | 0–1; higher is more readable | 49.6Δ 44.6 |
| Mi | 0.712 | 0–1; higher is more readable | 86.9Δ 7.2 |
| LLOC | 33 | Logical lines; fewer is more readable | 6.7Δ 87.5 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 53.6Δ 40.5 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 28.1 |
| BTTF | 0.424 | 0–1; higher is more readable | 27.9Δ 66.3 |
| Human | 4.1 | 1–5; original rating | 94.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. | 1929.394 | −63.67 |
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| 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.755 | −7.133 |
Intercept 8.87 + feature contributions = -42.333 (log-odds).
Score = sigmoid(-42.333) = 0.
| Score | 0.623 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 44 | +0.785 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97 | +0.761 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 43 | −0.566 |
| 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. | 96.96 | −0.442 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.969 | +0.275 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.128 |
Intercept 0.07 + feature contributions = 0.277 (log-odds).
Score = sigmoid(0.277) = 0.569.
| Score | 0.712 |
|---|
| Score | 33 |
|---|
Run 1
The code is partially readable due to fairly clear method names in the VBoxTestCase class and a logical grouping of VM control operations. However, there are several issues that reduce readability: an unexplained commented-out debug line, unused/ambiguous attributes, excessive blank lines, minimal docstrings or comments explaining the lockup reproduction, and a monolithic loop at module level. The nesting is flat, but intent is unclear because the purpose of fields like nics, udp, capture, and guestcontrol_* is not stated. The import of os and time is fine, but the loop’s sleep and print logic is isolated from any function, mixing setup, execution, and output. Action granularity is reasonable, but overall structure and lack of context make the script harder to follow than necessary.
Run 2
The code is simple and mostly flat, with clear method definitions and one action per line for core operations. However, readability is undermined by several issues: unused imports and dead code comments, ambiguous initialization of attributes, and a monolithic loop that mixes orchestration, I/O, and sleeping. The class lacks a clear purpose beyond a thin wrapper, and the controller abstraction hides critical behavior, making the intent less obvious. Naming is inconsistent (mgr, vbc, vmobj1), and the test script is not separated from the class definition. Overall, it is readable enough to follow, but the mixed responsibilities, hidden complexity, and clutter prevent it from scoring higher.
Run 3
The code has a straightforward top-level structure with a clear class-based organization and short, readable methods. However, several issues reduce its readability. There is an unnecessary comment block and commented-out code in __init__, which distracts from intent. The class initializer mixes many attribute assignments with no logical grouping or explanation of their purpose. The loop at the bottom performing 'startvm' repeatedly is not abstracted into a function and lacks error handling, making the test's purpose unclear. Variable names like 'vbc' and 'mgr' are cryptic, and the repeated 'vmobj1.' calls in the loop reduce line clarity. The code is relatively flat and concise but would benefit from better naming, documentation of the test scenario, and extraction of the loop into a named function.
Run 1
Code Structure: The class groups VM configuration and lifecycle methods logically, though the test runs at module scope without a main guard. Nesting: Very shallow, with only a simple loop, making control flow easy to follow. Clarity of intent: The opening comment explains the reproduction goal, and lifecycle method names are clear; abbreviated attributes, unused state, and unexplained configuration values reduce clarity. Code length: Compact overall, but unused wrapper methods, attributes, and a commented-out debug statement add distractions. Action granularity: Most lines perform one action; the combined imports and print expression are minor exceptions. Reading flow: Initialization, lifecycle operations, and test execution appear in a natural order. Legacy Python syntax and inconsistent spacing slightly hinder readability, but the central behavior—repeatedly starting a VM with a delay—is readily understandable.
Run 2
Code Structure: The class groups VM configuration and controller operations logically, followed by a simple test loop, though a main function or entry-point guard would separate execution more clearly. Nesting: Shallow throughout, making control flow easy to follow. Clarity of intent: The opening comment and start/sleep loop communicate the lockup reproduction goal, but abbreviated names, unused attributes, and an obsolete commented-out debug statement add ambiguity. Code length: Short overall, although unused wrapper methods and configuration fields distract from the minimal test. Action granularity: Almost every line performs one action; the combined import and compound print expression are minor exceptions. Reading flow: Initialization, operation wrappers, and execution appear in a natural order. Inconsistent naming and unexplained configuration values slightly hinder readability.
Run 3
Code Structure: The class cleanly groups VM configuration and controller operations, followed by a simple test loop, though execution lacks a main guard. Nesting: Very shallow, with no complex branching. Clarity of intent: The opening comment explains the lockup reproduction goal, but abbreviated names, unexplained configuration values, and unused attributes obscure details. Code length: Short overall, although unused wrapper methods and stale commented-out debugging add clutter. Action granularity: Most lines perform one action; the combined imports and print expression are minor exceptions. Reading flow: Initialization, operation wrappers, and repeated VM starts follow a natural sequence. Consistent indentation helps, while legacy syntax and inconsistent naming slightly reduce readability.