Sample
Schnappinger/argoUML/org.argouml.uml.ui.UMLComboBox2
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 41.8Δ 3.9 |
| Scalabrino | 0.812 | 0–1; higher is more readable | 65.4Δ 27.5 |
| Dorn | 0.097 | 0–1; higher is more readable | 32.7Δ 5.3 |
| Mi | 0.568 | 0–1; higher is more readable | 50.8Δ 12.9 |
| LLOC | 56 | Logical lines; fewer is more readable | 37.3Δ 0.7 |
| DeepSeek V4 Pro | 14.67 | 0–20; mean of three runs | 34.8Δ 3.1 |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs | 30.7Δ 7.3 |
| BTTF | 0.411 | 0–1; higher is more readable | 35.6Δ 2.3 |
| Human | 3.42 | 1–4; original rating | 38.0 |
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. | 4165.539 | −137.463 |
| Source linesThe number of non-empty source lines. | 217 | +86.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.952 | −7.428 |
Intercept 8.87 + feature contributions = -49.221 (log-odds).
Score = sigmoid(-49.221) = 0.
| Score | 0.812 |
|---|
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. | 218 | −6.682 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 137 | +4.002 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 137 | −2.723 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 216.857 | +2.621 |
| 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. | 110.945 | −1.034 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 110.972 | +0.986 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.043 | +0.525 |
Intercept 0.07 + feature contributions = -2.235 (log-odds).
Score = sigmoid(-2.235) = 0.097.
| Score | 0.568 |
|---|
| Score | 56 |
|---|
Run 1
The code is generally readable but has some issues. Structure is logical with clear method separation, but the long license header and deprecated constructs add clutter. Nesting is acceptable, with only one level in the key selection loop. Intent is mostly clear via Javadoc, though some methods like 'doIt' are vague. Code length is reasonable; the main method is somewhat long but not bloated. Action granularity is mixed - some lines combine multiple operations. Reading flow is decent but could be improved with more consistent formatting and line breaks. Overall, it is maintainable but not exemplary.
Run 2
The code is generally well-structured and readable. It is organized into clear sections (constructors, action listener, key selection manager, target listener methods) with Javadoc comments explaining purpose. Nesting is minimal; the `selectionForKey` method has one `if-else` block and a `for` loop, but the logic remains reasonably flat. Intent is mostly clear, especially for deprecated constructors and the keyboard navigation logic. However, the `selectionForKey` method is somewhat long and mixes concerns: building the search string, iterating through the model, and rendering cell text. This reduces clarity slightly. Action granularity is good, with one main operation per line. Reading flow is natural, though the method signature formatting with the `implements` clause is a bit awkward. Overall, it is maintainable code with only minor issues regarding method length and focus.
Run 3
The code is moderately readable. It has clear class structure and Javadoc comments, but suffers from long legacy license headers that obscure the actual code. The class implements too many interfaces and mixes concerns (view, listener, key manager). Nesting is mostly shallow. The 'selectionForKey' method is the weakest part: it has multiple responsibilities, multiple local variables with non-descriptive names (e.g., 'index', 'now'), and an awkward if-else structure. The 'targetAdded' method contains logic that is not obvious (removing action listener conditionally). Several methods are deprecated but still heavily documented, adding noise. Action granularity is acceptable but inconsistent. Overall the intention is understandable, but clarity is reduced by deprecated superclass responsibilities and legacy boilerplate.
Run 1
Code Structure: Well-organized class with focused constructors, keyboard selection logic, and target-event handlers; constructor setup is slightly duplicated. Nesting: Mostly shallow, though selectionForKey contains nested conditionals that could be flattened. Clarity of intent: Descriptive method names, a named timeout constant, and useful documentation explain the purpose; doIt, arg0, and implicit listener-management behavior are less clear. Code length: Most methods are concise, but extensive boilerplate comments and some redundant initialization add visual bulk. Action granularity: Generally one action per line, with only conventional loop initialization combining declarations. Reading flow: Methods follow a sensible sequence and the keyboard-search algorithm is understandable, but inconsistent brace placement, indentation, legacy raw types, and a commented-out statement interrupt an otherwise natural flow.
Run 2
Code Structure: Constructors, keyboard selection, and target-listener methods are logically separated, although the class combines several responsibilities. Nesting: Generally shallow, with moderately nested conditionals in selectionForKey that could be flattened. Clarity of intent: Documentation, descriptive field names, and the timeout constant explain the main purpose; doIt, arg0, and implicit listener-management behavior are less clear. Code length: Most methods are concise, but extensive boilerplate comments, duplicated constructor setup, and a commented-out statement add clutter. Action granularity: Statements generally perform one action per line; the loop initializer combines two declarations but remains understandable. Reading flow: Method ordering and straightforward control flow support reading, while inconsistent indentation, brace placement, raw types, and repeated casts create minor friction.
Run 3
Code Structure: Fields, constructors, keyboard selection, and target-listener methods are logically grouped, though the class combines several responsibilities. Nesting: Mostly shallow; keyboard-search handling reaches moderate nesting and could be flattened. Clarity of intent: Descriptive identifiers, a named timeout constant, and documentation explain the main purpose, but doIt, arg0, and listener-registration behavior are less explicit. Code length: Implementation is reasonably compact, although extensive headers, repetitive documentation, and a commented-out statement add visual bulk. Action granularity: Statements generally perform one action per line; the loop initializer is slightly denser. Reading flow: Methods follow a sensible sequence, but inconsistent indentation and brace placement, raw types, casts, and mixing search-state updates with item matching interrupt otherwise straightforward reading.