Sample
Schnappinger/argoUML/org.argouml.core.propertypanels.ui.UMLModelElementSourceFlowListModel
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 1 | 0–1; higher is more readable | 94.6Δ 47.6 |
| Scalabrino | 0.76 | 0–1; higher is more readable | 52.7Δ 5.7 |
| Dorn | 0.684 | 0–1; higher is more readable | 73.9Δ 26.9 |
| Mi | 0.581 | 0–1; higher is more readable | 55.4Δ 8.4 |
| LLOC | 6 | Logical lines; fewer is more readable | 79.7Δ 32.7 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 59.9Δ 12.9 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 55.3Δ 8.3 |
| BTTF | 0.72 | 0–1; higher is more readable | 86.1Δ 39.1 |
| Human | 3.87 | 1–4; original rating | 47.0 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 74 | +29.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 580.09 | −19.143 |
| 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.232 | −7.848 |
Intercept 8.87 + feature contributions = 11.479 (log-odds).
Score = sigmoid(11.479) = 1.
| Score | 0.76 |
|---|
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. | 75 | −1.619 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 98.947 | +0.792 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.021 | +0.737 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 73.85 | +0.622 |
| 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. | 98.987 | −0.527 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 30 | +0.301 |
Intercept 0.07 + feature contributions = 0.773 (log-odds).
Score = sigmoid(0.773) = 0.684.
| Score | 0.581 |
|---|
| Score | 6 |
|---|
Run 1
The code is generally well-structured and readable. It has a clear class hierarchy, concise methods, and flat nesting. Intent is evident from method names and the 'sourceFlow' string. Action granularity is mostly one action per line, though the isValidElement method chains two conditions on one line, slightly reducing clarity. The main readability issue is the excessive license header, which is not code logic but adds significant length and interrupts flow before the package declaration. The class itself is compact. Indentation and spacing are consistent. Overall, the code is easy to understand with minimal nesting and clear purpose.
Run 2
The code is generally readable: the class has a clear single purpose, methods are short, and intent is mostly clear. Structure is logical with a simple class hierarchy. Nesting is minimal, and most code lines perform one action. However, readability is reduced by several issues. The copyright header is excessively long and distracts from the actual source code, dominating the file. Indentation is inconsistent: the line inside buildModelList uses a tab mixed with spaces, breaking visual alignment. Naming is slightly vague—'getTarget()', 'setAllElements()', and 'isValidElement()' are inherited methods that require external knowledge of the superclass to fully understand context. The use of 'Model.getFacade()' repeated in isValidElement is slightly cumbersome. The one-line if body without braces, though simple, reduces robustness and clarity. Overall, the logic itself is straightforward, but these stylistic issues lower the readability score.
Run 3
The code is well-structured and follows clear conventions. It has a logical organization with a class definition, constructor, and overridden methods. Nesting is minimal - only one level in the if statement. Intent is clear: the class models source flows for a UML element. Code length is appropriate and concise. Action granularity is good, with one main action per line. Reading flow is natural - the class name, constructor, and methods follow a logical order. The code is generally readable, with minor points deducted for the lengthy copyright header (which is standard but adds noise before the actual code) and the use of tabs for indentation in one spot, which could affect consistency. The method names and variables are descriptive, enhancing clarity. Overall, this is clean, maintainable code that would be easy for another developer to understand quickly.
Run 1
Code Structure: The class is logically organized into a constructor, list-building method, and validation method. Nesting: Only one shallow conditional appears, keeping control flow simple. Clarity of intent: Class and method names communicate the source-flow purpose, although the parameter name 'o' is vague and framework dependencies require context. Code length: Executable code is concise; extensive license text and redundant comments increase scanning effort. Action granularity: Each statement performs one clear action, and the validation expression cleanly combines two related checks. Reading flow: Methods follow a natural order, but inconsistent indentation and outdated-looking @see references slightly disrupt readability.
Run 2
Code Structure: A small, focused class cleanly separates construction, list population, and element validation. Nesting: Only one shallow conditional; validation uses a straightforward boolean expression. Clarity of intent: Class and method names clearly indicate source-flow handling, although the parameter name 'o' is vague and inherited behavior requires external context. Code length: The implementation is concise, but extensive license headers and mostly boilerplate comments dominate the file. Action granularity: Each statement performs one clear action, with the chained facade calls remaining understandable. Reading flow: Methods follow a natural order and use consistent spacing overall, though the tab-indented statement and outdated superclass references in comments slightly disrupt readability.
Run 3
Code Structure: The class is logically organized into a constructor and two focused methods. Nesting: Only one shallow conditional appears, making control flow easy to follow. Clarity of intent: Class and method names clearly indicate source-flow list management, although the parameter name 'o' is vague and facade behavior requires external context. Code length: The executable code is concise; extensive license headers and mostly redundant comments increase reading overhead. Action granularity: Each statement performs a single clear operation, and the compound validation expression remains readable. Reading flow: Methods follow a natural sequence, but inconsistent indentation and outdated superclass references in comments slightly disrupt readability.