Sample
Scalabrio155
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 28.1Δ 16.3 |
| Scalabrino | 0.552 | 0–1; higher is more readable | 54.8Δ 43.0 |
| Dorn | 0.821 | 0–1; higher is more readable | 95.0Δ 83.2 |
| Mi | 0.115 | 0–1; higher is more readable | 38.2Δ 26.4 |
| LLOC | 23 | Logical lines; fewer is more readable | 15.8Δ 4.0 |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs | 5.5Δ 6.3 |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs | 1.5Δ 10.3 |
| BTTF | 0.406 | 0–1; higher is more readable | 16.6Δ 4.8 |
| Human | 2.89 | 1–5; original rating | 11.8 |
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. | 1392.448 | −45.951 |
| Source linesThe number of non-empty source lines. | 42 | +16.8 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 3.835 | −5.753 |
Intercept 8.87 + feature contributions = -26.033 (log-odds).
Score = sigmoid(-26.033) = 0.
| Score | 0.552 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 37 | +0.543 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 81.976 | +0.518 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 42 | −0.451 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 81.929 | +0.195 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 40.759 | +0.16 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.088 | +0.091 |
Intercept 0.07 + feature contributions = 1.524 (log-odds).
Score = sigmoid(1.524) = 0.821.
| Score | 0.115 |
|---|
| Score | 23 |
|---|
Run 1
The code has poor readability due to deep nesting (5 levels), unclear intent, and mixed concerns. The structure is tangled: setting an enclosing figure intertwines with layer reordering and edge manipulation. The nested conditionals lack clarity — for instance, the `else if (encloser == null)` branch is redundant and adds confusion. Multiple actions are embedded within conditions, reducing action granularity. A commented-out method call and a TODO suggest unresolved design issues, further obscuring intent. Reading flow is disrupted by the abrupt shift to layer contents iteration. While method names are somewhat descriptive, the overall logic is hard to follow without external context. Refactoring into smaller, well-named methods with early returns would significantly improve clarity and maintainability.
Run 2
The code suffers from significant readability issues. The method has deeply nested conditional logic (up to 4 levels), making the control flow difficult to follow. Multiple actions and side effects are packed into single branches, obscuring intent. The logic for handling 'encloser' is convoluted with redundant checks (e.g., checking both 'encloser != null' and 'encloser == null'). There's an empty comment block and a TODO that suggests unclear design, further muddying purpose. The second half about layer/edge ordering appears unrelated to the method's name, violating single responsibility. Variable names like 'nod' and 'comp' are cryptic. However, the code uses consistent indentation and separates the two main blocks, which slightly aids navigation. Overall, it requires careful trace-reading to understand behavior, indicating poor readability.
Run 3
The code's structure is tangled, with deeply nested conditionals (up to 5 levels) and mixed responsibilities. The first part handles ownership logic, while the second part iterates over layers and manipulates edge figures—unrelated concerns combined in one method. Nesting severely impacts readability. Intent is unclear; variable names like 'nod' and 'comp' are cryptic, and the logic lacks explanatory structure except for a single TODO comment. Code length is moderate but unnecessarily long due to verbose null checks and nested blocks. Action granularity is acceptable—most lines perform one action—but the reading flow is disorganized, forcing the reader to backtrack to understand conditions. The `else if (encloser == null)` is redundant after `if (encloser != null)`. Overall, the method is hard to follow and requires mental stacking of multiple conditions, making it unreadable by modern clean-code standards.
Run 1
Code Structure: Two distinct tasks—updating enclosure relationships and reordering edges—are separated, but combining them in one method weakens cohesion. Nesting: Several layers of conditionals make the enclosure logic difficult to follow; guard clauses could flatten it. Clarity of intent: API names communicate domain operations, but names such as nod, comp, and o are vague, and the conditional superclass calls require careful interpretation. Code length: Moderate, with avoidable repetition, a redundant else-if null check, and a commented-out statement. Action granularity: Generally one action per line, with readable separation of assignments and method calls. Reading flow: The main branches are logically ordered, but inconsistent indentation, a long comment embedded within a condition, and the transition to edge reordering interrupt the flow.
Run 2
Code Structure: Two distinct responsibilities—updating enclosure relationships and reordering edges—are separated into blocks but would be clearer as helper methods. Nesting: Several levels of nested conditionals make the main logic difficult to follow; guard clauses could flatten it. Clarity of intent: API names convey domain operations, but abbreviated variables such as nod, comp, and o obscure meaning, and conditional superclass calls require careful interpretation. Code length: Moderate, but the redundant 'else if (encloser == null)', repeated calls, and obsolete commented-out code add noise. Action granularity: Generally good, with individual assignments and operations on separate lines. Reading flow: Broadly sequential, but inconsistent indentation, comments embedded within a condition, and the transition to edge ordering interrupt the flow.
Run 3
Code Structure: Two recognizable phases handle enclosure changes and edge ordering, but combining them in one method weakens cohesion. Nesting: Up to four conditional levels make execution paths difficult to track; guard clauses would improve readability. Clarity of intent: API names indicate purpose, but abbreviated variables such as nod, comp, and o obscure meaning, and conditional superclass calls require careful interpretation. Code length: Moderately compact, though the redundant else-if null check, repeated calls, and obsolete commented-out statement add noise. Action granularity: Most statements perform one action per line, with reasonably readable method chaining. Reading flow: The overall sequence is understandable, but uneven indentation, comments embedded within a condition, and deeply nested branches interrupt scanning.