Sample
Schnappinger/argoUML/org.argouml.notation.providers.ActionStateNotation
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.14 | 0–1; higher is more readable | 74.6Δ 34.6 |
| Scalabrino | 0.593 | 0–1; higher is more readable | 21.2Δ 18.7 |
| Dorn | 0.779 | 0–1; higher is more readable | 80.5Δ 40.6 |
| Mi | 0.599 | 0–1; higher is more readable | 62.7Δ 22.8 |
| LLOC | 13 | Logical lines; fewer is more readable | 68.2Δ 28.2 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 73.9Δ 34.0 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 55.3Δ 15.3 |
| BTTF | 0.683 | 0–1; higher is more readable | 75.6Δ 35.6 |
| Human | 3.58 | 1–4; original rating | 39.9 |
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. | 1097.186 | −36.207 |
| Source linesThe number of non-empty source lines. | 83 | +33.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.119 | −7.678 |
Intercept 8.87 + feature contributions = -1.816 (log-odds).
Score = sigmoid(-1.816) = 0.14.
| Score | 0.593 |
|---|
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. | 84 | −1.938 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 82.797 | +0.748 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.029 | +0.662 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 38 | +0.577 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 73.393 | +0.38 |
| 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. | 77.964 | +0.363 |
Intercept 0.07 + feature contributions = 1.259 (log-odds).
Score = sigmoid(1.259) = 0.779.
| Score | 0.599 |
|---|
| Score | 13 |
|---|
Run 1
The code is highly readable with clear structure, minimal nesting, and explicit intent. The class has a single responsibility, methods are short, and validation is clear. The constructor throws a specific exception, improving debuggability. Listener initialization uses flat logic with well-named variables (entry, c, i, st). Long copyright headers are historical noise but not part of the code's operational readability. The score is slightly reduced because the header is disproportionately long, and some variable names ('c', 'i') are less descriptive, although acceptable for loop locals.
Run 2
The code is well-structured with a clear purpose and clean organization. The class has a single responsibility, and the constructor validates input properly. Nesting is minimal, with only one level in the while loop. Variable names are descriptive (e.g., 'entry', 'stereotypes', 'modelElement'). However, the method `initialiseListener` performs multiple related but distinct actions, making it longer than necessary. The `while` loop could be a for-each loop for improved readability. The string array on one line is acceptable but slightly reduces readability. Overall, the code is clear, but could benefit from breaking `initialiseListener` into smaller helper methods.
Run 3
The code is highly readable. It has a clear, logical structure with a single class that has a focused purpose. The nesting is flat: only one if-statement and one while-loop, both with minimal inner logic. The intent of each method is plainly expressed through naming and a concise Javadoc. The code is not unnecessarily long, and the majority of the lines are license headers and comments, which, while verbose for this specific task, do not affect the actual logic's readability. Action granularity is good, typically one statement per line with clear method calls. The reading flow is natural, moving from validation to listener setup. The only minor deductions are for the multi-line `addElementListener` call due to an awkward array formatting and the heavy license header that could obscure the actual code when first opening the file.
Run 1
Code Structure: The class is logically organized into a validating constructor and a listener-initialization method, with clear separation of responsibilities. Nesting: Control flow is shallow, using only simple conditionals and a single loop. Clarity of intent: Descriptive method names and explicit event names convey the purpose, although abbreviated variables c, i, and st and raw collection types reduce clarity. Code length: The implementation is concise; extensive license headers and a trivial constructor comment add reading overhead without explaining behavior. Action granularity: Statements generally perform one action per line, making execution easy to follow. Reading flow: Initialization proceeds naturally from the model element to its entry and stereotypes, though repeated facade access and minor formatting inconsistencies slightly interrupt the flow.
Run 2
Code Structure: The class is logically organized, separating constructor validation from listener initialization. Nesting: A single conditional and a simple loop keep nesting shallow. Clarity of intent: Class documentation and descriptive method names explain the purpose, although Object types, raw collections, and abbreviated variables c, i, and st obscure model details. Code length: Executable code is concise; the extensive license header and generic constructor documentation add reading overhead. Action granularity: Statements generally perform one action per line, with validation, retrieval, and listener registration clearly separated. Reading flow: Initialization proceeds naturally from the model element to its entry and stereotypes. Minor spacing inconsistencies and repeated facade calls slightly interrupt an otherwise straightforward flow.
Run 3
Code Structure: The class is logically organized into validation and listener initialization, with clear separation of responsibilities. Nesting: A single conditional and a simple loop keep nesting shallow. Clarity of intent: Descriptive method names, event names, and class documentation explain the purpose, although abbreviated variables c, i, and st and raw collection types reduce clarity. Code length: The executable code is concise; lengthy license headers and a redundant constructor comment add scanning overhead. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Listener registration proceeds naturally from the model element to its entry and stereotypes, supported by consistent indentation and spacing.