Sample
Schnappinger/argoUML/org.argouml.core.propertypanels.ui.UMLExpressionPanel
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 58.2Δ 3.4 |
| Scalabrino | 0.693 | 0–1; higher is more readable | 36.6Δ 24.9 |
| Dorn | 0.824 | 0–1; higher is more readable | 89.8Δ 28.2 |
| Mi | 0.591 | 0–1; higher is more readable | 59.1Δ 2.5 |
| LLOC | 24 | Logical lines; fewer is more readable | 54.3Δ 7.3 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 21.5 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 55.3Δ 6.3 |
| BTTF | 0.706 | 0–1; higher is more readable | 83.5Δ 21.9 |
| Human | 3.93 | 1–4; original rating | 61.6 |
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. | 1861.236 | −61.421 |
| Source linesThe number of non-empty source lines. | 106 | +42.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.2 | −7.8 |
Intercept 8.87 + feature contributions = -17.951 (log-odds).
Score = sigmoid(-17.951) = 0.
| Score | 0.693 |
|---|
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. | 107 | −2.752 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 65 | +1.511 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 105.893 | +1.07 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.037 | +0.583 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 81.439 | +0.51 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 82.953 | +0.152 |
Intercept 0.07 + feature contributions = 1.541 (log-odds).
Score = sigmoid(1.541) = 0.824.
| Score | 0.591 |
|---|
| Score | 24 |
|---|
Run 1
The code is well-structured: fields are clearly declared, the constructor is logically organized into setup steps, and methods are concise. Nesting is minimal—only one conditional block, which contains a single action per branch. Intent is clear from class and method names (UMLExpressionPanel, stateChanged, removeNotify). Code length is appropriate; there is no unnecessary verbosity. Most lines perform a single action, maintaining good action granularity. The reading flow is natural, with constructor steps in a logical order. Minor deductions: inconsistent indentation in removeNotify and stateChanged (tabs vs spaces) slightly disrupts visual flow, and the boolean flag in UMLExpressionBodyField(model, true) is less clear without context. Overall, the code is highly readable and maintainable.
Run 2
The code is highly readable due to its logical organization, clear naming conventions, and minimal nesting. The class has a focused purpose—building an expression panel—with fields, constructor, and overridden methods neatly ordered. Nesting is shallow; the only conditional (isReadOnly) contains a simple two-line if/else, which preserves clarity. Intent is unambiguous: class, method, and variable names accurately describe their roles, and the logger messages reinforce flow. Code length is concise without being overly terse; comments are limited to a useful class-level Javadoc and license header. Action granularity is mostly one logical step per line, though a few lines combine operations (e.g., `add(new JScrollPane(bodyField))`), slightly reducing granularity. Reading flow is natural: constructor initializes components, configures listeners, and confirms state changes. Minor deductions: the `stateChanged` method body could be indented consistently, and the `removeNotify` override lacks a Javadoc, but these are trivial. Overall, the code is clean, maintainable, and a strong example of readable Java UI code.
Run 3
The code is well-structured and readable. It has a clear class organization with logical field declarations, a straightforward constructor, and concise methods. Nesting is minimal—only one simple if/else block. The intent of each component (model, language field, body field, listener) is clear from naming and field types. Code length is appropriate for the class's responsibility. Most lines perform one action, contributing to a natural reading flow. Minor issues include inconsistent indentation in the stateChanged and removeNotify methods, where tabs and spaces are mixed. The extensive license header, while legally necessary, interrupts the initial reading flow before the package declaration. The constructor's conditional logic for read-only mode is reasonably clear but could be slightly more explicit by grouping setup steps. Overall, the code is maintainable and easy to follow.
Run 1
Code Structure: The class is logically organized into fields, constructor setup, lifecycle cleanup, and event handling. Nesting: Only one simple if/else keeps control flow easy to follow. Clarity of intent: Descriptive class, field, and method names make the expression panel's purpose clear, although boolean constructor arguments lack explanation. Code length: The implementation is concise; the lengthy license header adds scanning overhead without complicating the logic. Action granularity: Statements generally perform one action per line, with no compressed operations. Reading flow: Initialization proceeds naturally from layout and fields to editability, component placement, and listener registration. Mixed tabs and spaces, awkward line wrapping, and slightly unclear documentation reduce polish and readability.
Run 2
Code Structure: Fields, constructor, and lifecycle/event methods are logically organized with clear separation of responsibilities. Nesting: Only one shallow if/else block makes control flow easy to follow. Clarity of intent: Descriptive class, field, and method names convey the panel's purpose, although boolean constructor arguments lack explanation and the read-only language-field omission is not documented. Code length: Implementation is concise; the extensive license header adds scanning overhead but is not unnecessary implementation complexity. Action granularity: Each statement generally performs one action, with no crowded multi-statement lines. Reading flow: Initialization, component configuration, layout assembly, and listener registration follow a natural sequence. Inconsistent tabs/spaces and awkward line wrapping slightly disrupt visual consistency.
Run 3
Code Structure: The class is logically organized into fields, constructor initialization, lifecycle cleanup, and change handling. Nesting: Only one shallow if/else keeps control flow easy to follow. Clarity of intent: Descriptive class, field, and method names clearly convey an expression-editing panel, although boolean constructor arguments are unexplained. Code length: The implementation is concise, but extensive license comments dominate the file and a temporary border variable adds minor verbosity. Action granularity: Statements generally perform one action per line, with no compressed multi-statement lines. Reading flow: Initialization proceeds naturally from layout and fields to editability, component placement, and listener registration. Inconsistent tabs/spaces and awkward line wrapping slightly disrupt the otherwise straightforward presentation.