Sample
Schnappinger/argoUML/org.argouml.uml.ui.foundation.core.UMLGeneralizableElementLeafCheckBox
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.999 | 0–1; higher is more readable | 91.0Δ 41.8 |
| Scalabrino | 0.703 | 0–1; higher is more readable | 39.0Δ 10.1 |
| Dorn | 0.628 | 0–1; higher is more readable | 69.6Δ 20.5 |
| Mi | 0.552 | 0–1; higher is more readable | 42.9Δ 6.3 |
| LLOC | 6 | Logical lines; fewer is more readable | 79.7Δ 30.5 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 59.9Δ 10.7 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 62.2Δ 13.0 |
| BTTF | 0.725 | 0–1; higher is more readable | 87.8Δ 38.6 |
| Human | 3.9 | 1–4; original rating | 49.2 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 73 | +29.2 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 707.016 | −23.332 |
| 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.26 | −7.89 |
Intercept 8.87 + feature contributions = 6.848 (log-odds).
Score = sigmoid(6.848) = 0.999.
| Score | 0.703 |
|---|
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. | 74 | −1.584 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.024 | +0.713 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 72.857 | +0.609 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82.905 | +0.533 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 30 | +0.301 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 30 | −0.268 |
| 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.986 | +0.15 |
Intercept 0.07 + feature contributions = 0.525 (log-odds).
Score = sigmoid(0.525) = 0.628.
| Score | 0.552 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It is well-structured: package declaration, imports, class definition, constructor, and a single overridden method are clearly organized. Nesting is minimal—there is only one conditional with a flat if/else. Intent is clear: the class represents a checkbox that reflects whether a UML element is a leaf. The constructor succinctly wires the label, action, and property. The buildModel method is concise, performing a target fetch, validation, and setSelected in a logical sequence. Action granularity is appropriate, with one meaningful operation per line. Reading flow is natural, moving from setup to runtime behavior. The only minor drawbacks are the lengthy historical license header and the slightly redundant null-plus-type check, but these do not meaningfully impair readability.
Run 2
The code is well-structured and readable. It has a clear class hierarchy, a concise constructor, and a single method with straightforward logic. The nesting is minimal (one if-else block), and the intent of each part is evident. The method performs one logical action per line, and the reading flow is natural. The lengthy license header is the main drawback, but it is standard practice and does not affect the core code readability. Overall, the implementation is clean and maintainable.
Run 3
The code follows a clear and logical structure with a single class and two simple methods. It is mostly flat with only one level of nesting inside buildModel(), and the condition briefly checks null and type validity. Intent is obvious: a checkbox for the 'isLeaf' property of a UML element. The constructor delegates localization and action setup cleanly. Length is minimal and appropriate, though the large license header inflates the file size without adding readability to the logic itself. Action granularity is good—one meaningful action per line. Reading flow is natural: imports, class declaration, constructor, then buildModel(). Minor readability improvements could include a guard clause to avoid the else branch, but overall the code is clear, concise, and well organized.
Run 1
Code Structure: Clearly organized into imports, a class, a constructor, and a model-update method. Nesting: Only one simple if/else, making control flow easy to follow. Clarity of intent: Descriptive class and method names convey the checkbox's purpose, though framework-specific calls and the string "isLeaf" require some context; documentation adds little explanation. Code length: Executable code is concise, but the lengthy license header dominates the file and extra blank lines add minor clutter. Action granularity: Each statement performs a single clear action; the constructor's wrapped superclass call remains readable. Reading flow: Conventional Java layout and straightforward top-to-bottom logic support natural reading, with only the header and chained facade calls adding friction.
Run 2
Code Structure: The class is logically organized into imports, a constructor, and a focused model-update method. Nesting: A single if/else keeps control flow shallow and easy to follow. Clarity of intent: Descriptive class and method names make the checkbox's purpose clear, although framework-specific calls require some context. Code length: The executable code is concise; the extensive license header and redundant constructor documentation add visual bulk. Action granularity: Statements generally perform one action per line, with the wrapped superclass call remaining readable. Reading flow: Consistent formatting and a straightforward target-validation-to-selection sequence support natural reading; extra blank lines and minimal explanatory class documentation slightly reduce polish.
Run 3
Code Structure: The class is logically organized, with imports, a constructor, and a focused model-update method. Nesting: A single if/else keeps control flow shallow and easy to follow. Clarity of intent: Descriptive class and method names, along with isLeaf and setSelected, make the checkbox's purpose clear, although framework behavior requires some external knowledge. Code length: The implementation is concise; the extensive license header and largely redundant comments add visual bulk without clarifying behavior. Action granularity: Statements generally perform one action per line, and the multiline constructor call is formatted clearly. Reading flow: Execution proceeds naturally from obtaining the target to validating it and updating selection, with consistent indentation and only minor extra whitespace.