Sample
Scalabrio181
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 16.6Δ 13.3 |
| Scalabrino | 0.376 | 0–1; higher is more readable | 32.2Δ 28.9 |
| Dorn | 0.457 | 0–1; higher is more readable | 51.8Δ 48.5 |
| Mi | 0.019 | 0–1; higher is more readable | 9.5Δ 6.3 |
| LLOC | 22 | Logical lines; fewer is more readable | 19.3Δ 16.1 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 38.7Δ 35.4 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 55.3 |
| BTTF | 0.473 | 0–1; higher is more readable | 30.2Δ 26.9 |
| Human | 2.56 | 1–5; original rating | 3.3 |
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. | 1427.529 | −47.108 |
| Source linesThe number of non-empty source lines. | 35 | +14 |
| 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.769 | −7.153 |
Intercept 8.87 + feature contributions = -31.392 (log-odds).
Score = sigmoid(-31.392) = 0.
| Score | 0.376 |
|---|
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. | 118.971 | −1.374 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 119 | +1.116 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 34 | −0.359 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 31 | +0.335 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 35 | −0.203 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.078 | +0.183 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 33.783 | +0.062 |
Intercept 0.07 + feature contributions = -0.17 (log-odds).
Score = sigmoid(-0.17) = 0.457.
| Score | 0.019 |
|---|
| Score | 22 |
|---|
Run 1
The code is generally readable but has some issues. The structure is logical, with clear variable setup and test execution, but the method is somewhat long and repetitive. Nesting is shallow, which is good. Intent is clear: verify pre-order traversal of entity inheritance. However, the repetitive iterator checks and assertions in the if/else blocks reduce clarity and increase length. Action granularity is mostly one action per line, but some lines are dense (e.g., chained method calls and iterator.next() inside assertions). Reading flow is natural, though the comment about indeterminate order helps. Overall, the code is understandable but could be improved by extracting helper methods or using a loop to reduce repetition.
Run 2
The code is structurally organized but suffers from verbose naming and repetitive assertion blocks. The nested if/else with duplicated iterator assertions makes the flow harder to follow. Each line generally contains one action, which is good, but the iterator checks (`assertTrue(hasNext())` before each `next()`) add noise. The comment about indeterminate subclass order helps but the long variable/class names reduce readability. Overall moderate clarity.
Run 3
The code has a clear test purpose and logical structure, but readability is reduced by several factors. The method is long with repeated assertion patterns, and the conditional branching creates moderate nesting and duplicated logic. Action granularity is mixed: some lines contain multiple actions (e.g., iterator creation with chained calls), while others are simple. Variable names are long but descriptive. The comment about indeterminate ordering is helpful, but the branching to handle it makes the flow harder to follow naturally. Overall, it is understandable but verbose, with room to simplify by extracting repeated assertion sequences or parameterizing expected order.
Run 1
Code Structure: Clearly organized into entity setup, ordering detection, traversal assertions, and exhaustion verification, though visual separation would help. Nesting: Only one if/else level, making control flow easy to follow. Clarity of intent: The test name, descriptive variables, and comment explain the preorder traversal check and indeterminate sibling ordering; lengthy identifiers slightly hinder scanning. Code length: Reasonable for the test, but duplicated assertions across branches add verbosity. Action granularity: Each statement performs one main action or assertion, although iterator advancement within assertions combines consumption and verification. Reading flow: Setup naturally leads into validation, with explicit hasNext checks clarifying traversal progress. Repeated assertions and long lines modestly interrupt the otherwise straightforward flow.
Run 2
Code Structure: Logically organized into entity setup, order detection, traversal assertions, and exhaustion checking. Nesting: Only one if/else level, making control flow easy to follow. Clarity of intent: Descriptive names, the test name, and a useful comment clearly communicate the preorder traversal requirement and indeterminate sibling order, though long identifiers add visual weight. Code length: Reasonably compact, but duplicated assertions across branches introduce repetition. Action granularity: Each statement occupies its own line; iterator advancement inside assertions is conventional and understandable. Reading flow: Setup naturally leads into verification, with consistent formatting, although repeated hasNext checks and long lines slightly interrupt the flow.
Run 3
Code Structure: Logically organized into entity setup, traversal-order detection, and assertions, although blank lines would better distinguish these phases. Nesting: Only one if/else level, making control flow easy to follow. Clarity of intent: The test name, descriptive variables, and comment clearly explain preorder traversal verification and indeterminate sibling ordering; lengthy identifiers slightly increase reading effort. Code length: Reasonably concise, but both branches repeat iterator checks and similar assertions. Action granularity: Each statement performs one main action; iterator advancement within assertions is conventional and understandable. Reading flow: Setup naturally leads into order-dependent checks and a final exhaustion assertion, though repetitive assertions and long lines mildly interrupt scanning.