Sample
Scalabrio122
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 46.2Δ 18.8 |
| Scalabrino | 0.467 | 0–1; higher is more readable | 44.7Δ 17.3 |
| Dorn | 0.817 | 0–1; higher is more readable | 93.5Δ 66.1 |
| Mi | 0.463 | 0–1; higher is more readable | 74.9Δ 47.5 |
| LLOC | 15 | Logical lines; fewer is more readable | 44.5Δ 17.1 |
| DeepSeek V4 Pro | 10.67 | 0–20; mean of three runs | 23.4Δ 4.0 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 9.5Δ 17.8 |
| BTTF | 0.46 | 0–1; higher is more readable | 27.6Δ 0.3 |
| Human | 3.22 | 1–5; original rating | 27.4 |
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. | 835.543 | −27.573 |
| Source linesThe number of non-empty source lines. | 25 | +10 |
| 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.847 | −7.271 |
Intercept 8.87 + feature contributions = -15.974 (log-odds).
Score = sigmoid(-15.974) = 0.
| Score | 0.467 |
|---|
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. | 57.92 | +1.212 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.136 | −0.383 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 25 | +0.151 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 58 | +0.131 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 23.881 | −0.076 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 21 | −0.011 |
Intercept 0.07 + feature contributions = 1.493 (log-odds).
Score = sigmoid(1.493) = 0.817.
| Score | 0.463 |
|---|
| Score | 15 |
|---|
Run 1
The code has a clear overall structure and natural flow but has issues with inconsistent indentation, mixed brace styles, and repeated method calls. Nesting is moderately deep (up to four levels) with some nested conditions. Action granularity is generally good, but some lines contain multiple condition checks. The commented-out code adds minor clutter, though it provides historical context. Clarity of intent is adequate but could be improved by extracting a helper method for the tooltip logic. The variable name 'c' is slightly ambiguous; 'component' would be clearer. The repeated 'getJComponent()' calls could be stored in a local variable. Overall, the code is understandable but suffers from formatting inconsistencies and could benefit from small refactoring to reduce nesting and improve readability.
Run 2
The code scores 8/20 due to significant readability issues. Structure is moderately logical but hampered by inconsistent indentation, mixed comment styles, and commented-out code. Nesting reaches three levels deep with multiple null checks, making the tooltip logic difficult to follow. Clarity of intent suffers from confusing variable names like 'currentFig' and unclear relationships between UI components. Code length is acceptable but could be reduced by early returns. Action granularity is mostly one-per-line, which is good, but reading flow is disrupted by inconsistent spacing, alignment inconsistencies (mix of tabs/spaces), and logical branches that are hard to track. The nested if-else with multiple tooltip checks particularly hurts comprehension. Refactoring the tooltip handling into a separate method with early returns would significantly improve readability.
Run 3
The code has a logical overall structure but suffers from several readability issues. It contains deeply nested conditionals (up to 4 levels), multiple actions on single lines, and repeated calls to getJComponent() that clutter the logic. The commented-out lines add noise and suggest unfinished refactoring. Variable naming is mostly clear (currentFig, tip), but the tooltip logic is hard to follow due to the dense conditionals and negated checks. The flow is somewhat natural but interrupted by the complex tooltip handling block. Action granularity is inconsistent - some lines do one thing, others combine multiple calls.
Run 1
Code Structure: Logically groups mouse-event preparation, tooltip updates, and event delegation, though tooltip handling dominates the method. Nesting: Three nested conditionals make the update path harder to scan; guard clauses could simplify it. Clarity of intent: Method and variable names communicate the purpose, but commented-out operations and the historical comment add distracting ambiguity. Code length: Reasonably short, although repeated getJComponent() and getToolTipText() calls introduce avoidable verbosity. Action granularity: Each statement generally performs one action, making individual operations easy to follow. Reading flow: Execution proceeds naturally from setup through tooltip handling to manager notification, but inconsistent indentation, multiline conditions, and redundant parentheses interrupt readability.
Run 2
Code Structure: Logically separates mouse-state updates, tooltip handling, and event delegation, but tooltip logic could be extracted. Nesting: Three nested conditionals make the main branch somewhat cumbersome. Clarity of intent: Method names clearly convey mouse tracking and tooltip updates; commented-out redraw calls and the historical comment add noise. Code length: Reasonably short, though repeated getJComponent() and getToolTipText() calls introduce redundancy. Action granularity: Each statement generally performs one action, making individual steps easy to follow. Reading flow: Execution proceeds naturally from preparation to tooltip updates to delegation, but inconsistent indentation, multiline conditions, and unnecessary parentheses reduce visual consistency.
Run 3
Code Structure: Logically groups mouse-event setup, tooltip updates, and manager notifications, but tooltip handling dominates the method. Nesting: Three nested conditionals make the update path harder to follow. Clarity of intent: Descriptive method and variable names convey the purpose, though commented-out redraw operations and the historical comment add noise. Code length: Reasonably short, but repeated getJComponent() and getToolTipText() calls introduce avoidable verbosity. Action granularity: Each statement generally performs one action, making individual operations easy to scan. Reading flow: The sequence is natural, but inconsistent indentation, wrapped conditions, and a negated equality check interrupt readability.