Sample
Schnappinger/argoUML/org.argouml.ui.explorer.rules.GoStateToDoActivity
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.609 | 0–1; higher is more readable | 81.3Δ 41.0 |
| Scalabrino | 0.754 | 0–1; higher is more readable | 50.3Δ 10.1 |
| Dorn | 0.505 | 0–1; higher is more readable | 61.1Δ 20.8 |
| Mi | 0.567 | 0–1; higher is more readable | 49.5Δ 9.2 |
| LLOC | 14 | Logical lines; fewer is more readable | 66.8Δ 26.6 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 53.1Δ 12.9 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 55.3Δ 15.0 |
| BTTF | 0.659 | 0–1; higher is more readable | 68.6Δ 28.4 |
| Human | 3.62 | 1–4; original rating | 40.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. | 1145.83 | −37.812 |
| Source linesThe number of non-empty source lines. | 93 | +37.2 |
| 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.209 | −7.813 |
Intercept 8.87 + feature contributions = 0.444 (log-odds).
Score = sigmoid(0.444) = 0.609.
| Score | 0.754 |
|---|
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. | 94 | −2.292 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.913 | +0.889 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 46 | +0.854 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 90.936 | +0.663 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.029 | +0.66 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 46 | −0.635 |
| 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. | 90.957 | −0.187 |
Intercept 0.07 + feature contributions = 0.022 (log-odds).
Score = sigmoid(0.022) = 0.505.
| Score | 0.567 |
|---|
| Score | 14 |
|---|
Run 1
The code is generally readable with clear logical organization, a flat structure, and concise methods. Intent is evident from method names and the straightforward logic. Each method performs a single, well-defined action. Minor issues include inconsistent indentation in getDependencies (spaces vs tabs), verbose multi-line license headers that add visual noise, and the use of Collections.EMPTY_SET (raw type) rather than generics. These slightly reduce clarity but do not significantly hinder understanding.
Run 2
The code has good structure with clear class and method separation. Overall nesting is shallow (single-level conditionals). Intent is mostly clear: methods retrieve children, dependencies, and rule name. The getChildren and getDependencies methods are concise, but could be slightly cleaner by returning early instead of using if/return/return. Action granularity is adequate: one or two actions per line. Reading flow is natural and method order follows rule interface convention. The main readability issues are the very long copyright header (not part of executable code but still adds noise) and some minor inconsistency in indentation (mixed tabs/spaces in getDependencies). Also, the repeated Model.getFacade() calls inside a single condition slightly reduce clarity. The code is overall quite readable for a small utility class, but not perfectly consistent.
Run 3
The code is well-structured and readable. It has a clear class purpose, logical method organization, and shallow nesting with simple if statements. Each method performs one action per line, and the reading flow is natural. The main readability issue is the excessive copyright header (not code logic), which adds clutter but does not affect functional clarity. The code is concise, uses meaningful method names, and follows consistent formatting. Minor deductions for duplicated condition checks and the use of Collections.EMPTY_SET without generic typing, which slightly reduces modern clarity.
Run 1
Code Structure: Three small, focused methods provide clear logical organization. Nesting: Only single-level conditionals appear, keeping control flow easy to follow. Clarity of intent: Descriptive class and method names, documentation, and straightforward model queries clearly express the navigation rule; generic local names and raw collection types slightly reduce clarity. Code length: The implementation is concise, although extensive license headers dominate the file and the do-activity lookup is repeated. Action granularity: Each statement performs one clear action, with collection creation, insertion, and return separated. Reading flow: Methods follow a natural sequence and use simple conditional returns, but inconsistent tab/space indentation in getDependencies disrupts visual consistency.
Run 2
Code Structure: Three small, clearly separated methods organize navigation, dependencies, and naming logically. Nesting: Each conditional has only one level, making control flow easy to follow. Clarity of intent: Class and method names, plus the class documentation, communicate the purpose; raw collection types and the generic variable name 'set' reduce precision slightly. Code length: Functional code is concise, though extensive license headers dominate the file and collection construction could be shorter. Action granularity: Statements generally perform one action per line, with clear separation of creation, insertion, and return. Reading flow: Methods follow a natural sequence and use straightforward fallback returns, but inconsistent tabs and spaces in getDependencies disrupt visual consistency. Repeated facade calls add minor reading overhead.
Run 3
Code Structure: Three small, clearly separated methods organize navigation, dependencies, and naming logically. Nesting: Only a single conditional level per relevant method keeps control flow simple. Clarity of intent: Descriptive class and method names and the class comment explain the purpose, though raw collection types and the generic variable name 'set' reduce precision. Code length: The implementation is concise, but extensive licensing text dominates the file, and repeated facade calls add minor redundancy. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: Straightforward condition-check, collection-building, and return sequences support natural reading; inconsistent indentation in getDependencies slightly disrupts visual consistency.