Sample
Schnappinger/argoUML/org.argouml.core.propertypanels.ui.UMLMessageActivatorComboBoxModel
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 62.5Δ 21.6 |
| Scalabrino | 0.746 | 0–1; higher is more readable | 47.6Δ 6.7 |
| Dorn | 0.462 | 0–1; higher is more readable | 58.4Δ 17.5 |
| Mi | 0.575 | 0–1; higher is more readable | 52.8Δ 11.9 |
| LLOC | 21 | Logical lines; fewer is more readable | 58.4Δ 17.5 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 47.4Δ 6.4 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 38.9Δ 2.0 |
| BTTF | 0.434 | 0–1; higher is more readable | 37.3Δ 3.6 |
| Human | 3.66 | 1–4; original rating | 40.9 |
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. | 1795.906 | −59.265 |
| Source linesThe number of non-empty source lines. | 115 | +46 |
| 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.04 | −7.561 |
Intercept 8.87 + feature contributions = -11.955 (log-odds).
Score = sigmoid(-11.955) = 0.
| Score | 0.746 |
|---|
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. | 116 | −3.071 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 66 | +1.546 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 114.802 | +1.195 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 66 | −1.094 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 84.922 | +0.566 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.041 | +0.541 |
| 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. | 84.259 | +0.096 |
Intercept 0.07 + feature contributions = -0.151 (log-odds).
Score = sigmoid(-0.151) = 0.462.
| Score | 0.575 |
|---|
| Score | 21 |
|---|
Run 1
The code is well-structured and readable. It uses clear naming conventions, logical organization, and appropriate comments. Indentation and braces are consistent. The methods are short and focused, with generally one action per line. The class hierarchy and overridden methods are clear. Minor deductions: the isValidElement method contains a long conditional expression that could benefit from being broken into named boolean variables for improved readability. The getAction() method returning null is unclear without context, but this may be an override requirement. Long copyright headers are boilerplate and not part of code readability per se, though they do push the actual code down the file. Overall, this is clean, maintainable Java code with only minor opportunities for improvement in expression clarity.
Run 2
The code is generally well-structured and readable. It has a clear class purpose, logical organization, and minimal nesting. Methods are short and focused, with one primary action per line in most cases. Naming is descriptive (e.g., getSelectedModelElement, isValidElement). The buildModelList method is flat and straightforward. However, readability suffers slightly from redundant local variable (Object mes = target;), some overly long boolean expressions in isValidElement, and extraneous comments. The constructor mixes setup logic with conditional listener registration, but remains understandable. Overall, a clean implementation with minor clarity issues.
Run 3
The code is generally well-structured with clear separation of methods and logical organization. It uses standard Java conventions, meaningful method names, and follows a consistent pattern. Nesting is minimal (maximum 2-3 levels), and each line typically performs one action. The intent is mostly clear - it's a combo box model for UML message activators. However, there are some readability issues: the isValidElement method contains a complex boolean expression that could be broken down or extracted into helper methods for better clarity. The buildModelList method has an unnecessary variable reassignment (Object mes = target) that adds confusion. The comments are sporadic and could better explain non-obvious business logic. The reading flow is generally natural, though the boolean expression in isValidElement disrupts flow. Overall, it's readable but could benefit from simplifying complex conditions and removing redundant variable assignments.
Run 1
Code Structure: A small, focused class with clearly separated constructor, list-building, validation, and selection methods. Nesting: Mostly flat, with only two nested checks in the constructor. Clarity of intent: Class and method names explain the purpose, but generic Object types, abbreviated names such as mes and m, and an unexplained null-returning getAction reduce clarity. Code length: Implementation is concise, although extensive license boilerplate, redundant comments, and the unnecessary target alias add reading overhead. Action granularity: Statements generally perform one action per line; the validation expression combines several related conditions but formats them separately. Reading flow: Consistent formatting and short methods support natural reading, while repeated facade calls and redundant parentheses make the validation logic slightly harder to scan.
Run 2
Code Structure: A small, focused class with clearly separated constructor, list-building, validation, and selection methods. Nesting: Mostly shallow; the constructor has only two nested conditions. Clarity of intent: Descriptive class and method names convey purpose, but generic Object types, abbreviated variables such as mes and m, and unexplained validation rules reduce clarity. Code length: Implementation is concise, though the lengthy license header, redundant comments, and unnecessary target alias add reading overhead. Action granularity: Statements generally perform one action each; the validation expression combines several checks but remains manageable. Reading flow: Conventional Java organization and consistent formatting support natural reading, while repeated facade calls, extra parentheses, and uneven expression wrapping slightly disrupt it.
Run 3
Code Structure: The class is logically organized into construction, list building, validation, and selection methods. Nesting: Mostly shallow, with only two nested conditions in the constructor. Clarity of intent: Class and method names convey their purposes, but generic Object types, abbreviated variables such as mes and m, and an unexplained null-returning getAction reduce clarity. Code length: Methods are concise, though the extensive license header, redundant comments, and unnecessary target alias add reading overhead. Action granularity: Statements generally perform one action each; the validation expression combines several related checks appropriately. Reading flow: Consistent formatting and method separation support natural reading, but repeated facade calls, extra parentheses, and the multiline validation chain make some expressions harder to scan.