Sample
Schnappinger/argoUML/org.argouml.uml.diagram.ui.FigEdgePort
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 64.5Δ 16.2 |
| Scalabrino | 0.866 | 0–1; higher is more readable | 79.8Δ 31.4 |
| Dorn | 0.356 | 0–1; higher is more readable | 51.8Δ 3.5 |
| Mi | 0.566 | 0–1; higher is more readable | 48.2Δ 0.2 |
| LLOC | 30 | Logical lines; fewer is more readable | 49.2Δ 0.8 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 43.9Δ 4.5 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 55.3Δ 6.9 |
| BTTF | 0.351 | 0–1; higher is more readable | 27.4Δ 21.0 |
| Human | 3.89 | 1–4; original rating | 48.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. | 2172.346 | −71.687 |
| Source linesThe number of non-empty source lines. | 154 | +61.6 |
| 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.036 | −7.553 |
Intercept 8.87 + feature contributions = -8.771 (log-odds).
Score = sigmoid(-8.771) = 0.
| Score | 0.866 |
|---|
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. | 155 | −4.452 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 86 | +2.238 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 153.875 | +1.741 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 86 | −1.553 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.034 | +0.613 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76.458 | +0.429 |
| 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. | 78.981 | +0.32 |
Intercept 0.07 + feature contributions = -0.594 (log-odds).
Score = sigmoid(-0.594) = 0.356.
| Score | 0.566 |
|---|
| Score | 30 |
|---|
Run 1
The code is generally well-structured and readable. Class organization is logical, with fields, constructor, and overridden methods clearly separated. Nesting is minimal except for a slightly deeper if-else in getOwner(), but it remains understandable. Intent is mostly clear through Javadoc comments and method names. Code length is concise, avoiding unnecessary verbosity. Action granularity is good, with one primary operation per line. Reading flow is natural, with overrides grouped near the end of the class. Minor deductions: the getOwner() method contains a nested conditional that could be flattened for slightly better clarity, and a few comments are redundant (e.g., placing @Override above a method with a Javadoc note). Overall, it is clean and professional.
Run 2
The code is well-structured and readable overall. It follows standard Java conventions with a logical organization: copyright headers, package declaration, imports, class documentation, fields, constructor, and methods. Nesting is minimal, with only one while loop and a simple if-else block in getOwner()—no deep nesting issues. Intent is clear through descriptive method names (hit, getOwner, isSelectable) and Javadoc comments documenting non-obvious behavior. The class is concise, with each method performing a single action or short sequence. Action granularity is appropriate—most logical operations occupy single lines, and method chaining in classNameAndBounds() is formatted across multiple lines for readability. Reading flow is natural, following a consistent ordering of related methods and including explanatory comments for unusual design decisions. Minor deductions: the indentation in getOwner() uses tabs inconsistently with the rest of the file, the serialVersionUID is placed at the end rather than near the top, and some comments reference external documentation rather than explaining the rationale inline. These are minor style inconsistencies that don't significantly impact readability.
Run 3
The code is generally readable, with clear class purpose and organized methods. The structure is logical: fields, initialization, constructor, then overrides. Nesting is minimal except for the while loop in getOwner(), which is easy to follow. Intent is clear from the Javadoc and method names. Code length is moderate and appropriate for the functionality. However, readability is reduced by inconsistent indentation (e.g., mix of tabs/spaces in getOwner()), a long boilerplate license header, and inconsistent Javadoc formatting. The initialize() method does multiple actions per line (creates FigCircle, adds it), which slightly reduces action granularity. The getOwner() method contains a slightly convoluted fallback loop but is still understandable. Overall, the code is maintainable but could benefit from formatting cleanup.
Run 1
Code Structure: Small, focused methods and clearly separated initialization, ownership lookup, and interaction overrides provide logical organization. Nesting: Shallow conditionals and one simple loop keep control flow easy to follow. Clarity of intent: The class documentation explains its unusual edge-to-edge connection role, although bigPort is vague and constant-return overrides lack explanations. Code length: The implementation is concise; extensive license text and repetitive @see comments add visual bulk without complicating the logic. Action granularity: Statements generally perform one action per line, with only straightforward expression composition. Reading flow: Method boundaries and spacing support scanning, but mixed indentation in getOwner, initialization preceding the constructor, and placement of serialVersionUID at the end slightly disrupt consistency.
Run 2
Code Structure: A focused class with small, logically separated methods, although initialization before the constructor and the serialization field at the end slightly fragment organization. Nesting: Shallow conditionals and a simple loop make control flow easy to follow. Clarity of intent: Class documentation clearly explains the edge-to-edge connection workaround, and method names convey their roles; terse variable names and constructor documentation labeling forwarded parameters as ignored introduce ambiguity. Code length: Implementation is concise, but extensive licensing text and repetitive override comments add reading overhead. Action granularity: Statements generally perform one action per line, with no compressed multi-statement logic. Reading flow: Mostly natural and consistent, though mixed indentation in getOwner(), a redundant else after return, and legacy comments slightly disrupt it.
Run 3
Code Structure: The class is logically organized into initialization, construction, and small behavioral overrides, though placing the constructor before the helper would be more conventional. Nesting: Control flow is shallow, with a straightforward loop and simple conditionals in getOwner(). Clarity of intent: Class documentation explains the unusual edge-to-edge connection mechanism, and most methods have clear purposes. However, bigPort is vague, and constructor documentation labels parameters ignored despite passing them to the superclass. Code length: Implementation is concise, but extensive license text and repetitive reference comments add visual bulk. Action granularity: Statements generally perform one action per line; the multiline string construction remains understandable. Reading flow: Small methods and consistent separation support easy scanning, but mixed indentation in getOwner(), repeated superclass access, and an unnecessary else after an early return slightly disrupt flow.