Sample
Schnappinger/argoUML/org.argouml.uml.cognitive.critics.CrMissingOperName
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 45.2Δ 13.8 |
| Scalabrino | 0.601 | 0–1; higher is more readable | 23.3Δ 8.1 |
| Dorn | 0.332 | 0–1; higher is more readable | 50.5Δ 19.1 |
| Mi | 0.557 | 0–1; higher is more readable | 43.9Δ 12.5 |
| LLOC | 35 | Logical lines; fewer is more readable | 47.0Δ 15.7 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 15.5Δ 15.8 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 25.7Δ 5.6 |
| BTTF | 0.469 | 0–1; higher is more readable | 41.9Δ 10.6 |
| Human | 3.05 | 1–4; original rating | 31.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. | 2850.623 | −94.071 |
| Source linesThe number of non-empty source lines. | 129 | +51.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.268 | −7.903 |
Intercept 8.87 + feature contributions = -41.503 (log-odds).
Score = sigmoid(-41.503) = 0.
| Score | 0.601 |
|---|
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. | 130 | −3.567 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 80 | +2.03 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 80 | −1.415 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 128.885 | +1.392 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.969 | +0.728 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.422 |
| 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. | 94.992 | −0.358 |
Intercept 0.07 + feature contributions = -0.698 (log-odds).
Score = sigmoid(-0.698) = 0.332.
| Score | 0.557 |
|---|
| Score | 35 |
|---|
Run 1
The code has a mostly logical structure and clear purpose: it defines a critic to flag operations missing names. The class is short and method lengths are reasonable. However, readability is hurt by inconsistent indentation and brace style, especially in predicate2 and initWizard, where mixed tabs and spaces create visual clutter. Nesting is moderate, with two-level ifs in initWizard making the flow slightly tangled. Magical numbers or magic strings like "oper" add minor ambiguity, but they are limited. Action granularity is generally fine, one logical action per line, but some lines like Model.getFacade().getFeatures(...).size() chain multiple calls which could be split for clarity. Reading flow is interrupted by inconsistent formatting and redundant checks (e.g., myName == null and length == 0). Overall, the code is understandable for a developer familiar with the framework but needs polish for consistency.
Run 2
The code structure is logical, with a clear class definition and overridden methods, but readability is significantly hampered by several issues. The licensing header is excessively long and disrupts the reading flow before reaching the actual code. Nesting is mostly flat, which is good, but the predicate2 method contains redundant checks (myName == null || myName.equals("") and myName.length() == 0) that obscure intent. Action granularity is inconsistent: some lines combine multiple actions, while others are well-separated. The clarity of intent suffers from generic variable names like 'a', 'me', and 'dm', and the initWizard method mixes logic with type casting without clear separation. Code length is reasonable, but the redundant conditionals and verbose setup make it unnecessarily longer than needed. The reading flow is natural in method order but is disrupted by outdated comments and inconsistent indentation style.
Run 3
The code is generally readable but has some issues. The structure is logical, with clear separation of methods and overrides, and the class has a single responsibility. Nesting is mostly flat, though initWizard has a few levels. The intent is fairly clear from method names and comments. However, there are readability problems: inconsistent indentation (tabs vs spaces), redundant checks in predicate2 (myName == null, myName.equals(""), and myName.length() == 0 all test the same condition), and some unnecessary local variable assignments (e.g., Object oper = dm; Object a = me;). Action granularity is acceptable but could be improved. The long license header consumes significant space before the actual code. Overall, the code is understandable but would benefit from cleaner formatting, simpler naming, and elimination of redundant logic for better clarity.
Run 1
Code Structure: Methods logically separate configuration, validation, wizard initialization, and metadata. Nesting: Validation uses clear early returns, but wizard initialization has three nested conditionals. Clarity of intent: The class documentation and API calls convey its purpose; abbreviated variables such as dm, me, ins, and sug obscure details. Code length: Methods are short, but duplicate empty-name checks, unnecessary aliases, and extensive boilerplate add clutter. Action granularity: Statements generally perform one action per line, although chained facade calls require extra parsing. Reading flow: Execution is straightforward, but inconsistent tab/space indentation and verbose framework comments interrupt visual consistency.
Run 2
Code Structure: Methods separate initialization, validation, wizard setup, and supported model types logically. Nesting: Validation uses clear early returns, but wizard setup has three levels of conditional nesting. Clarity of intent: The class documentation and method calls convey the purpose, while abbreviated names such as dm, me, ins, sug, and a obscure details. Code length: The implementation is reasonably short, but duplicate empty-name checks, unnecessary object aliases, and a redundant cast add clutter; the lengthy license header delays reaching the implementation. Action granularity: Statements generally perform one action per line, although chained facade calls require extra parsing. Reading flow: Method ordering is natural and control flow is straightforward, but inconsistent indentation and repetitive boilerplate comments interrupt scanning.
Run 3
Code Structure: Methods are logically separated into initialization, name validation, wizard configuration, and metadata retrieval. Nesting: Validation uses clear early returns, but wizard initialization reaches three conditional levels. Clarity of intent: The class documentation and API calls establish the purpose, while abbreviated variables such as dm, me, a, ins, and sug obscure details. Code length: Methods are reasonably short, but redundant empty-name checks, unnecessary object aliases, and extensive boilerplate comments add reading overhead. Action granularity: Statements generally perform one action per line, although chained facade calls require extra parsing. Reading flow: Method ordering and straightforward control flow are easy to follow; inconsistent tab/space indentation and repeated casts mildly disrupt readability.