Sample
Schnappinger/argoUML/org.argouml.model.euml.UMLUtil
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 26.8Δ 17.2 |
| Scalabrino | 0.608 | 0–1; higher is more readable | 23.6Δ 14.1 |
| Dorn | 0.035 | 0–1; higher is more readable | 26.1Δ 16.5 |
| Mi | 0.204 | 0–1; higher is more readable | 15.5Δ 5.9 |
| LLOC | 59 | Logical lines; fewer is more readable | 35.3Δ 25.7 |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs | 17.2Δ 7.6 |
| GPT-6.1 Sol | 15.67 | 0–20; mean of three runs | 32.3Δ 22.8 |
| BTTF | 0.299 | 0–1; higher is more readable | 20.1Δ 10.6 |
| Human | 2.17 | 1–4; original rating | 9.6 |
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. | 6863.4 | −226.492 |
| Source linesThe number of non-empty source lines. | 199 | +79.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. | 4.645 | −6.968 |
Intercept 8.87 + feature contributions = -144.99 (log-odds).
Score = sigmoid(-144.99) = 0.
| Score | 0.608 |
|---|
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. | 200 | −6.045 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 127 | +3.656 |
| 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. | 151.98 | −2.772 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 126 | −2.47 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 198.922 | +2.371 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 151.995 | +1.648 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.237 |
Intercept 0.07 + feature contributions = -3.306 (log-odds).
Score = sigmoid(-3.306) = 0.035.
| Score | 0.204 |
|---|
| Score | 59 |
|---|
Run 1
The code is generally readable but has inconsistencies. Structure is straightforward with clear method separation and JavaDoc, but comments like '$Id$' are outdated. Nesting is moderate: the copy() method has a deeply nested if-else block with long chained calls, reducing clarity. Intent is mostly clear, though the copy method's use of clipboard commands to copy elements is not immediately obvious. Code length is reasonable but some lines are excessively long (e.g., getMostRecentCommand().getAffectedObjects() chains), hurting readability. Action granularity is mixed: many lines are single-action, but several long lines perform multiple operations. Reading flow is natural for utility methods, but dense command-stack manipulation breaks it. Overall, the code is functional but would benefit from refactoring long expressions and flattening the copy() logic.
Run 2
The code has some positive aspects like clear method names and Javadoc comments, but suffers from major readability issues. The 'copy' method is deeply nested with multiple long method chains on single lines, violating the action granularity criterion. Lines exceed reasonable length with calls like 'modelImplementation.getModelEventPump().getRootContainer().setHoldEvents(true)'. The if-else structure in 'copy' creates complex nesting and poor reading flow. Several methods have multiple actions per line, particularly in the toString method. While the class structure is logical and imports are organized, the implementation details in the copy method make the intent hard to follow. The use of anonymous inner class with instance initializer block is an unusual pattern that reduces clarity. Overall, the code requires significant vertical scrolling and care to understand, especially in the copy method which handles multiple concerns without breaking them into smaller helper methods.
Run 3
The code demonstrates generally good structure: clear package and imports, Javadoc comments, and methods organized by purpose. However, readability is reduced by long method chains, especially in the copy() method, where multiple deeply nested calls with repeated access to editing domain and command stack hinder clarity. Nesting levels are moderate overall, but the copy() logic contains several nested if/else branches. Action granularity suffers in places—multiple operations are packed into single long lines. Variable names like 'r' are overly terse, and some methods lack inline comments explaining non-obvious logic. The getResource() method has reasonable flow, but the copy() method feels tangled and would benefit from extraction of helper methods. Javadoc is helpful, but the code's density and repetitive verbosity reduce reading flow.
Run 1
Code Structure: Well-separated utility methods with consistent formatting and useful documentation, though copy mixes command setup, execution, event management, and rollback. Nesting: Generally shallow; copy has modest nested branching, while early returns simplify toString. Clarity of intent: Descriptive method names and comments explain most behavior, but terse variables such as o, sb, and r and the anonymous initializer reduce clarity. Code length: Mostly concise, although repeated framework access chains and verbose boilerplate add visual weight. Action granularity: Usually one action per statement, but long chained expressions make some lines difficult to parse. Reading flow: Methods generally progress naturally from validation to operation and return; copy interrupts this flow with duplicated event-management calls and lengthy expressions. Overall, readable and logically organized, with localized complexity rather than pervasive confusion.
Run 2
Code Structure: Methods are logically separated by utility task, although copy combines command construction, execution, event handling, and rollback. Nesting: Generally shallow; copy has moderately nested branching and an unusual anonymous-class initializer. Clarity of intent: Descriptive method names and Javadoc explain most purposes, but short names such as o, r, and sb, repeated casts, and undocumented checkArgs reduce clarity. Code length: Mostly concise, though repeated access chains and verbose documentation add bulk. Action granularity: Most statements perform one action, but long chained expressions pack several retrieval steps into single lines. Reading flow: Consistent formatting and early returns support natural reading; excessively long lines, repeated event-management calls, and inline localization markers interrupt it.
Run 3
Code Structure: Methods are logically separated by utility function, with helpful documentation. Nesting: Most methods are shallow; copy has moderately nested execution and rollback branches plus an unusual anonymous-class initializer. Clarity of intent: Descriptive method names and comments explain most behavior, but short names such as o, r, and sb, repeated casts, and undocumented checkArgs reduce clarity. Code length: Generally concise, although repeated access chains in copy and verbose boilerplate add unnecessary reading effort. Action granularity: Statements generally perform one action per line, but long chained calls and complex expressions obscure intermediate steps. Reading flow: Consistent formatting and early returns support natural reading; unusually long lines, repeated event-management calls, and inline localization markers interrupt the flow.