Sample
Scalabrio61
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 31.2Δ 34.9 |
| Scalabrino | 0.437 | 0–1; higher is more readable | 40.2Δ 25.9 |
| Dorn | 0.554 | 0–1; higher is more readable | 63.3Δ 2.8 |
| Mi | 0.39 | 0–1; higher is more readable | 65.8Δ 0.3 |
| LLOC | 24 | Logical lines; fewer is more readable | 14.1Δ 52.0 |
| DeepSeek V4 Pro | 10.67 | 0–20; mean of three runs | 23.4Δ 42.7 |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs | 6.5Δ 59.5 |
| BTTF | 0.486 | 0–1; higher is more readable | 34.7Δ 31.4 |
| Human | 3.89 | 1–5; original rating | 66.1 |
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. | 1313.842 | −43.357 |
| Source linesThe number of non-empty source lines. | 40 | +16 |
| 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.659 | −5.488 |
Intercept 8.87 + feature contributions = -23.975 (log-odds).
Score = sigmoid(-23.975) = 0.
| Score | 0.437 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 40 | +0.646 |
| 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. | 40 | −0.38 |
| 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. | 79 | +0.319 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.114 | −0.162 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 38.538 | +0.129 |
Intercept 0.07 + feature contributions = 0.216 (log-odds).
Score = sigmoid(0.216) = 0.554.
| Score | 0.39 |
|---|
| Score | 24 |
|---|
Run 1
The code has a clear overall intent but suffers from repetitive blocks and moderate nesting. The structure is logical, but the repeated 'p.setAddress(null); if (old != null) old.getPersons().remove(p);' sequence in three separate branches (NULL input, unknown id, and NumberFormatException) suggests a lack of consolidation. Nesting depth reaches three levels in the else branch, which is acceptable but not ideal. The empty 'else if' block for blank input is an unnecessary branch that could be handled with a single check. Clarity is hindered by the duplicated logic, making it less obvious that all three error paths lead to the same result. While actions are mostly one per line, the repeated block increases length and reduces maintainability. The flow is somewhat disorganized because the reader must scan multiple branches to confirm the identical cleanup logic.
Run 2
The code's intent is mostly clear, but it suffers from significant repetition and moderate nesting. The same 'set address to null and remove old association' block appears three times, which harms readability and maintainability. An empty else-if branch for empty input is confusing. Action granularity is acceptable, but the nested if-else within the try block increases complexity. The reading flow is natural but interrupted by duplicated logic. Refactoring the duplicated cleanup into a helper method and eliminating the empty branch would substantially improve structure, reduce nesting, and make the logic more concise.
Run 3
The method attempts a linear flow but suffers from duplicated logic, particularly the block for clearing the old address which appears three times. The empty string branch is a no-op, which is unclear. Mixed levels of abstraction (parsing, entity lookup, relationship management) are handled in one method, and the action granularity varies, with multiple actions on several lines. The reading flow is interrupted by the duplicated cleanup and nested conditionals. Naming is acceptable, and the code is not deeply nested, but the repetition and ambiguity reduce clarity and maintainability.
Run 1
Code Structure: Input cases are logically grouped, but repeated address-clearing and relationship-removal logic adds clutter. Nesting: The conditional chain, try/catch, and inner null checks create moderately deep nesting. Clarity of intent: The method name and messages communicate its purpose, but terse variables ('p', 'a', 'old') and an unexplained empty-input branch reduce clarity. Code length: The method is manageable, though duplicated cleanup makes it unnecessarily long. Action granularity: Statements generally perform one action per line, supporting readability. Reading flow: Processing follows a natural input-to-lookup-to-update sequence, but the empty branch and repeated cleanup interrupt the flow; guard clauses and a shared update helper would simplify it.
Run 2
Code Structure: Input cases are logically separated, but address assignment and relationship cleanup are duplicated. Nesting: The try block, address lookup branches, and null checks create moderately deep nesting. Clarity of intent: The method name and error messages communicate its purpose, but short names such as p and a and the unexplained empty-input branch reduce clarity. Code length: Reasonably short overall, though repeated cleanup makes it unnecessarily verbose. Action granularity: Each statement performs one action, making individual operations easy to follow. Reading flow: The progression from input to lookup to update is natural, but the empty branch and repeated state changes interrupt the flow. Guard clauses and a shared update helper would improve readability.
Run 3
Code Structure: Input handling is logically organized, but repeated address clearing and relationship cleanup obscure the central operation. Nesting: Several nested conditionals within a try/catch increase reading effort. Clarity of intent: The method name and messages communicate its purpose, but terse variables and an empty branch make some behavior less explicit. Code length: Reasonably short, although duplicated cleanup could be consolidated. Action granularity: Each statement performs a single clear action, with useful spacing between steps. Reading flow: The input-to-update progression is natural, but repeated branches and scattered relationship updates interrupt it. An explicit early return for empty input and a shared update helper would improve readability.