Sample
Schnappinger/argoUML/org.argouml.uml.cognitive.critics.WizMEName
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 54.8Δ 1.6 |
| Scalabrino | 0.891 | 0–1; higher is more readable | 87.0Δ 30.6 |
| Dorn | 0.307 | 0–1; higher is more readable | 47.9Δ 8.6 |
| Mi | 0.598 | 0–1; higher is more readable | 61.7Δ 5.3 |
| LLOC | 39 | Logical lines; fewer is more readable | 43.9Δ 12.5 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 24.1Δ 32.3 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 25.7Δ 30.7 |
| BTTF | 0.54 | 0–1; higher is more readable | 47.9Δ 8.6 |
| Human | 3.91 | 1–4; original rating | 56.4 |
Views
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. | 2636.652 | −87.01 |
| Source linesThe number of non-empty source lines. | 159 | +63.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.134 | −7.7 |
Intercept 8.87 + feature contributions = -22.24 (log-odds).
Score = sigmoid(-22.24) = 0.
| Score | 0.891 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 160 | −4.629 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 96 | +2.583 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 158.807 | +1.81 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 95 | −1.759 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.388 | +0.589 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.042 | +0.537 |
| 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. | 86.938 | −0.017 |
Intercept 0.07 + feature contributions = -0.815 (log-odds).
Score = sigmoid(-0.815) = 0.307.
| Score | 0.598 |
|---|
| Score | 39 |
|---|
Run 1
The code has an adequate structure with clear class and method separation, but readability is diminished by inconsistent formatting. Nesting is reasonably flat, though the switch statements and conditional checks add complexity. Intent is mostly clear thanks to Javadocs and method names, but some methods (like doAction) mix levels of abstraction and contain broad exception handling. Code length is reasonable, though verbose comments and licensing headers add noise. Action granularity is inconsistent—some lines perform multiple operations (e.g., step1 initialization) while others are single-action. Reading flow suffers from mixing tabs/spaces, inconsistent brace styles, and scattered logging. Overall, understandable but not polished.
Run 2
The code is moderately readable but has issues. The overall structure is logical with clear class and method separation, and the intent is generally apparent from method names and Javadoc. However, there are significant readability problems: consistent use of 4-space vs 8-space indentation creates visual inconsistency, switch statements add unnecessary nesting, and some methods (makePanel, canGoNext) have awkward flow. The `changed` variable in canGoNext is misleadingly named (it actually means 'not changed'), making intent ambiguous. Action granularity is mostly good with one action per line, but nested if statements in canGoNext could be flattened with early returns. The lengthy copyright header (30+ lines) hurts initial readability. Some methods like setInstructions and setMustEdit are trivial but acceptable. The try-catch with broad Exception is acceptable for a wizard but could be more specific. Mixed brace styles and inconsistent whitespace further reduce clarity.
Run 3
The code is generally readable and well-structured. It has a clear purpose (wizard for renaming UML elements) and follows a logical organization with fields, constructor, setters, and method overrides. It uses a flat nesting structure with only one-level switch statements and no deeply nested conditionals. Action granularity is mostly one action per line. However, the score is reduced by some issues: the switch statement in makePanel uses older-style formatting with tabs that makes indentation inconsistent; the canGoNext method uses an unnecessary intermediate boolean variable 'changed' that could be simplified; the doAction method has a try-catch block that catches a generic Exception rather than specific exceptions, which slightly obscures intent. The license header is lengthy but standard for the project. Overall, the code is clear and maintainable but has minor style inconsistencies and could be more concise in a few places.
Run 1
Code Structure: Small, focused methods logically separate panel creation, navigation checks, and renaming. Nesting: Generally shallow, although switches and conditionals introduce some avoidable nesting. Clarity of intent: The wizard's purpose and most method names are clear, but abbreviated identifiers such as origSuggest and me reduce clarity. More importantly, changed stores an equality result, making the editing requirement confusing and apparently inverted. Code length: Implementation is reasonably concise; extensive license headers and redundant documentation add reading overhead. Action granularity: Statements generally perform one action each, though inline setters compress method structure. Reading flow: Method organization and early returns support natural reading, but mixed indentation, inconsistent brace placement, and single-case switches interrupt the flow.
Run 2
Code Structure: Small, focused methods logically separate panel creation, navigation validation, and renaming. Nesting: Generally shallow, although switch statements containing conditionals and exception handling add modest depth. Clarity of intent: Class documentation and most method names clearly describe the wizard's purpose; however, 'changed' actually represents equality with the original suggestion, contradicting its name and making validation confusing. Abbreviations such as 'me', 's', and 'pve' also weaken clarity. Code length: Implementation is reasonably concise, but extensive license headers, boilerplate comments, and single-case switches add reading overhead. Action granularity: Most statements perform one action per line, though inline setter bodies compress declarations and assignments. Reading flow: Methods follow a sensible progression, but inconsistent tab/space indentation, awkward wrapping, and uneven comment styles interrupt visual consistency.
Run 3
Code Structure: The class is logically organized into fields, configuration methods, panel creation, navigation validation, and action execution. Nesting: Mostly shallow, although switch, conditional, and try/catch blocks add some indentation. Clarity of intent: Documentation and method names explain the naming wizard well, but abbreviations such as me, s, and b are less descriptive. The variable changed is misleading because equals indicates unchanged text, contradicting the validation comment. Code length: Functional code is reasonably concise; extensive license headers and boilerplate comments increase scanning effort. Action granularity: Most lines contain one action, though inline setters compress method declarations and assignments together. Reading flow: Method ordering and early returns support straightforward reading, but mixed indentation, inconsistent brace formatting, and implicit superclass behavior reduce smoothness.