Sample
Scalabrio9
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.013 | 0–1; higher is more readable | 82.4Δ 23.4 |
| Scalabrino | 0.806 | 0–1; higher is more readable | 84.4Δ 25.4 |
| Dorn | 0.743 | 0–1; higher is more readable | 84.4Δ 25.4 |
| Mi | 0.581 | 0–1; higher is more readable | 79.9Δ 20.9 |
| LLOC | 9 | Logical lines; fewer is more readable | 72.6Δ 13.6 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 49.2Δ 9.8 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 34.7Δ 24.4 |
| BTTF | 0.639 | 0–1; higher is more readable | 78.9Δ 19.8 |
| Human | 3.78 | 1–5; original rating | 59.0 |
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. | 594.688 | −19.625 |
| Source linesThe number of non-empty source lines. | 32 | +12.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. | 4.253 | −6.379 |
Intercept 8.87 + feature contributions = -4.334 (log-odds).
Score = sigmoid(-4.334) = 0.013.
| Score | 0.806 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 78.938 | +0.469 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.062 | +0.336 |
| 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. | 78.938 | +0.322 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 22 | −0.084 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 22 | +0.024 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.85 | +0.021 |
Intercept 0.07 + feature contributions = 1.061 (log-odds).
Score = sigmoid(1.061) = 0.743.
| Score | 0.581 |
|---|
| Score | 9 |
|---|
Run 1
The code is generally readable with a clear purpose and logical structure. It follows a common listener notification pattern and includes helpful comments explaining the lazy event creation and reverse iteration. However, readability is hindered by inconsistent indentation, especially in the method signature, TreeModelEvent constructor call, and the if-block, which disrupts the natural reading flow. The method signature is overly long and could be formatted more cleanly. The loop logic (i -= 2) requires domain knowledge of EventListenerList's internal structure, making intent slightly ambiguous without the comment. Nesting is shallow, which is positive, but action granularity could be improved by breaking the event construction into a separate line. Overall, the code is functional but lacks consistent formatting and could benefit from minor refactoring for clarity.
Run 2
The code demonstrates good structure with a clear method purpose and standard event-listener pattern. The logic is reasonably flat, with only two levels of nesting. Intent is well documented via Javadoc and inline comments. The method is concise and actions are mostly one per line, though the constructor call includes multiple arguments on separate lines, which slightly impacts reading flow. Variable names are clear. However, the indentation is inconsistent and excessive in some places (e.g., parameters, constructor call), which hurts readability. The lazy event creation and reverse iteration are standard but not immediately obvious without the comments. Overall, it is readable but could benefit from cleaner formatting.
Run 3
The code has some positive aspects: it uses descriptive names, includes comments explaining the logic, and separates actions onto different lines. However, readability is hampered by inconsistent and excessive indentation, particularly in the method signature and constructor call. The nested if-statements create moderate depth, though the logic remains understandable. The action granularity is generally good, with one action per line in most places, but parameter alignment is disorganized and disrupts natural reading flow. The comments help clarify intent but feel verbose for what is a straightforward iteration pattern. Overall, the code is functional but visually inconsistent, making it harder to scan quickly than necessary.
Run 1
Code Structure: Logically organized into listener retrieval, lazy event creation, and notification. Nesting: Moderate nesting of a loop and two conditionals remains manageable, though braces around the innermost conditional would improve readability. Clarity of intent: The method name, documentation, and comments clearly explain its purpose; the abbreviated variable e and alternating listener-array entries require some interpretation. Code length: Concise overall, although the event constructor and assignment are spread across more lines than necessary. Action granularity: Each statement performs a distinct action, making execution easy to follow. Reading flow: The sequence is natural, but inconsistent indentation, excessive parameter alignment, and the split assignment interrupt scanning.
Run 2
Code Structure: Logically organized into listener retrieval, reverse traversal, lazy event creation, and notification. Nesting: Three control-flow levels are manageable, though the unbraced inner conditional slightly reduces readability. Clarity of intent: The method name, documentation, and comments clearly explain its purpose; the alternating listener-array layout and short variable name 'e' require some interpretation. Code length: Concise overall, although the event constructor and assignment are spread across more lines than necessary. Action granularity: Each statement performs a distinct action, with no crowded multi-statement lines. Reading flow: Execution follows a natural sequence, but inconsistent indentation and awkward parameter alignment interrupt visual scanning.
Run 3
Code Structure: Logically organized into listener retrieval, reverse iteration, lazy event creation, and notification. Nesting: Three control-flow levels are manageable, though the unbraced inner conditional slightly reduces readability. Clarity of intent: The method name and comments explain the purpose well; the short variable name 'e' and alternating listener-array entries require some interpretation. Code length: Concise overall, although excessive line breaks in the constructor call add visual clutter. Action granularity: Statements generally perform one action each, making execution easy to follow. Reading flow: The sequence is natural, but inconsistent indentation, awkward parameter alignment, and the split assignment interrupt scanning.