Sample
Schnappinger/argoUML/org.argouml.core.propertypanels.ui.UMLTemplateParameterParameterComboBoxModel
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Δ 10.8 |
| Scalabrino | 0.773 | 0–1; higher is more readable | 56.2Δ 20.9 |
| Dorn | 0.247 | 0–1; higher is more readable | 44.6Δ 9.2 |
| Mi | 0.479 | 0–1; higher is more readable | 31.0Δ 4.3 |
| LLOC | 32 | Logical lines; fewer is more readable | 48.5Δ 13.2 |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs | 41.3Δ 5.9 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 38.9Δ 3.6 |
| BTTF | 0.521 | 0–1; higher is more readable | 45.9Δ 10.6 |
| Human | 3.27 | 1–4; original rating | 35.3 |
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. | 2975.902 | −98.205 |
| Source linesThe number of non-empty source lines. | 146 | +58.4 |
| 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.061 | −7.592 |
Intercept 8.87 + feature contributions = -38.526 (log-odds).
Score = sigmoid(-38.526) = 0.
| Score | 0.773 |
|---|
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. | 147 | −4.168 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 98 | +2.653 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 98 | −1.828 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 145.833 | +1.629 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 106.946 | +0.921 |
| 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. | 106.946 | −0.865 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.048 | +0.475 |
Intercept 0.07 + feature contributions = -1.113 (log-odds).
Score = sigmoid(-1.113) = 0.247.
| Score | 0.479 |
|---|
| Score | 32 |
|---|
Run 1
The code is moderately readable. Structure is clear with standard Java class organization and logical method grouping. Nesting is shallow, with only a few if-statements and loops. Intent is mostly clear, though some methods like isValidElement remain ambiguous without context. Length is reasonable, though the long copyright header adds noise. Action granularity is acceptable—one main action per line. Reading flow is natural with straightforward method names, but the code lacks modern Java features (generics, streams) and contains redundant null checks and logging that could be simplified. Consistency is good, but minor issues like repeated `element != null` checks and unused imports slightly reduce clarity. Overall, it's readable but could be improved with small refactoring.
Run 2
The code is well-structured and readable, with clear separation of methods, logical imports, and consistent formatting. The class has a single responsibility and methods are concise, performing focused tasks. Nesting is low, with only a few conditional blocks. Method names and variable names are descriptive, making intent clear. The code includes some redundancy, such as duplicate null checks in buildMinimalModelList(), and unnecessary logging that adds minor clutter. The long license header slightly reduces readability but is standard practice. Overall, the code is easy to follow, maintain, and understand, with only minor areas for improvement.
Run 3
The code is well-structured with clear method separation, consistent naming, and standard Java logging. Nesting is shallow (max 2 levels), and each line performs a single logical action. Intent is generally clear, especially in buildModelList and getSelectedModelElement. However, buildMinimalModelList contains redundant logging and a duplicated null check, which slightly hurts readability. The lengthy license header adds noise. Overall, the code follows good OO practices and is easy to follow.
Run 1
Code Structure: Well organized into small, focused methods with clear separation between validation, list construction, and selection retrieval. Nesting: Shallow conditionals and a single loop keep complexity low; an early return simplifies project handling. Clarity of intent: Descriptive method names and framework calls convey purpose, but generic variables (p, o, list), raw collection types, and an incorrect constructor comment reduce clarity. Code length: The implementation is reasonably concise, though extensive license headers, repetitive logging, and duplicate null checks add bulk. Action granularity: Statements generally perform one action per line; chained API calls remain understandable despite wrapping. Reading flow: Consistent formatting and predictable method boundaries support natural reading, but redundant checks and uneven annotation/comment conventions introduce minor distractions.
Run 2
Code Structure: Well-organized class with small, focused methods and clearly separated responsibilities. Nesting: Shallow conditionals and a single loop keep complexity low; the early return helps. Clarity of intent: Descriptive method names and straightforward model operations communicate purpose, but generic Object types, terse variables (p, o), an incorrect constructor comment, and an unexplained null action reduce clarity. Code length: Implementation is reasonably concise, although extensive license text, duplicate null checks, and repetitive logging add reading overhead. Action granularity: Statements generally perform one action per line; chained API calls remain understandable despite awkward wrapping. Reading flow: Conventional Java layout and method ordering support natural reading, but inconsistent indentation, raw collection types, and redundant comments slightly interrupt the flow.
Run 3
Code Structure: Well-organized class with small, focused methods and clear separation of list construction, selection, and validation. Nesting: Shallow conditionals and a single loop make control flow easy to follow; the early return helps. Clarity of intent: Descriptive method names explain the combobox model's purpose, but the incorrect constructor comment, abbreviated variables, raw Collection, and unexplained null action reduce clarity. Code length: Implementation is reasonably concise, though extensive license boilerplate, redundant null checks, and repeated logging add reading overhead. Action granularity: Statements generally perform one action per line; chained model API calls are somewhat dense but consistently formatted. Reading flow: Methods follow a coherent progression and formatting is consistent, although verbose API chains and duplicated checks interrupt the flow.