Sample
Schnappinger/argoUML/org.argouml.model.euml.CollaborationsFactoryEUMLImpl
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 33.1Δ 47.3 |
| Scalabrino | 0.752 | 0–1; higher is more readable | 49.3Δ 31.0 |
| Dorn | 0.955 | 0–1; higher is more readable | 97.7Δ 17.3 |
| Mi | 0.571 | 0–1; higher is more readable | 51.5Δ 28.9 |
| LLOC | 76 | Logical lines; fewer is more readable | 28.1Δ 52.3 |
| DeepSeek V4 Pro | 13.67 | 0–20; mean of three runs | 26.9Δ 53.5 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 38.9Δ 41.4 |
| BTTF | 0.625 | 0–1; higher is more readable | 61.7Δ 18.6 |
| Human | 3.96 | 1–4; original rating | 80.4 |
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. | 5497.064 | −181.403 |
| Source linesThe number of non-empty source lines. | 198 | +79.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. | 4.729 | −7.094 |
Intercept 8.87 + feature contributions = -100.427 (log-odds).
Score = sigmoid(-100.427) = 0.
| Score | 0.752 |
|---|
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. | 199 | −6.01 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 169 | +5.108 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 197.923 | +2.357 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76.548 | +0.431 |
| 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. | 76.95 | +0.406 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.3 |
Intercept 0.07 + feature contributions = 3.06 (log-odds).
Score = sigmoid(3.06) = 0.955.
| Score | 0.571 |
|---|
| Score | 76 |
|---|
Run 1
The code demonstrates good structure with clear separation of methods and logical organization, but several factors reduce readability. The class is well-documented with Javadoc comments and follows consistent naming conventions. Method lengths are generally appropriate, with most methods being short and focused. However, there are multiple TODO stubs returning null, which create ambiguity about intent. The deprecated method with Boolean wrapper parameter adds unnecessary complexity. Some methods contain commented-out code, which clutters the implementation. The buildAssociationRole method has poor parameter naming (agg1, agg2) that doesn't clearly convey meaning. Action granularity is mostly good with one action per line, though the method chaining in buildMessage could be clearer. The code lacks deep nesting, which is positive. Overall, while the structure is sound, the incomplete implementations and unclear parameter names prevent higher readability scores.
Run 2
The code has a clear, logical structure with well-placed method groupings and helpful comments, making navigation straightforward. Nesting is generally flat, and most methods are concise with clear intent — especially the typed `buildAssociationRole` and `buildLifeline` methods. However, readability suffers in places: several methods have empty or stub implementations (e.g., `createAssociationEndRole`, `createAssociationRole`, `createCollaborationInstanceSet`) with only TODO comments, which introduces ambiguity about intended functionality. Some deprecated or overloaded methods add length without much value, and the commented-out code (`// lifeline.setRepresents(prop);`) is distracting. Reading flow is mostly natural, but the mix of public, private, and deprecated members interrupts smooth scanning. Action granularity is mostly one action per line, which is good. Overall, the code is fairly readable but would benefit from removing dead code and clarifying stub methods.
Run 3
The code is generally readable but has some issues. The structure is logical, with clear separation of methods, but many methods are auto-generated stubs with TODO comments, which hurts clarity of intent. Nesting is mostly flat, with only one conditional block. Method names are descriptive, but the presence of deprecated methods and multiple overloaded versions adds ambiguity. Code length is moderate, but the many stub methods returning null or throwing exceptions feel unnecessarily long. Action granularity is mostly one action per line, which is good, but some lines are overly long (e.g., the deprecated method body). Reading flow is natural, moving from simple constructors to more complex methods. The commented-out code and TODOs disrupt readability. Overall, it is understandable but not polished, with significant portions of unfinished or placeholder code.
Run 1
Code Structure: Small, focused factory methods and a typed helper provide logical organization, though implemented methods are interspersed with stubs and legacy overloads. Nesting: Almost entirely flat, with only simple conditionals. Clarity of intent: Descriptive method names and straightforward UML operations communicate purpose, but Object parameters, casts, abbreviated variables (l1, l2, prop), and createClassifierRole returning a Lifeline weaken clarity. Code length: Implementations are concise; boilerplate comments, repeated stubs, and commented-out code add clutter. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: Consistent formatting and sequential construction steps support natural reading, although uneven spacing, compatibility methods, and unfinished implementations interrupt the flow.
Run 2
Code Structure: Small, focused factory methods and adjacent overloads provide logical organization, although implemented methods are mixed with stubs. Nesting: Almost entirely flat, with only simple conditionals, making control flow easy to follow. Clarity of intent: Descriptive method names and explicit UML types explain most operations; generic Object parameters, abbreviated variables such as l1, l2, and prop, and legacy terminology obscure some meaning. Code length: Implementations are concise, but repetitive stubs, boilerplate documentation, and a commented-out statement add noise. Action granularity: Statements generally perform one action per line; chained calls remain manageable. Reading flow: Creation, configuration, and return steps follow a natural sequence, with whitespace separating stages. Minor formatting inconsistencies, sparse behavioral documentation, and mixed approaches to unsupported operations interrupt an otherwise straightforward reading experience.
Run 3
Code Structure: Factory responsibilities are organized into short methods, with related overloads grouped together; unfinished stubs add clutter. Nesting: Almost entirely flat, with only simple conditionals, making control flow easy to follow. Clarity of intent: Descriptive method names and UML types communicate purpose, but generic Object parameters, abbreviated variables such as l1, l2, and prop, and legacy role terminology reduce clarity. Code length: Implemented methods are concise, though repetitive stubs, boilerplate comments, and commented-out code increase noise. Action granularity: Statements generally perform one action per line; chained calls remain understandable. Reading flow: Creation, configuration, and return steps follow a natural sequence, but inconsistent whitespace and the mixture of implemented, unsupported, and unfinished methods interrupt the flow.