Sample
Schnappinger/argoUML/org.argouml.uml.diagram.deployment.ui.SelectionComponentInstance
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 61.2Δ 3.4 |
| Scalabrino | 0.827 | 0–1; higher is more readable | 69.9Δ 12.1 |
| Dorn | 0.853 | 0–1; higher is more readable | 92.4Δ 34.7 |
| Mi | 0.589 | 0–1; higher is more readable | 58.1Δ 0.3 |
| LLOC | 21 | Logical lines; fewer is more readable | 58.4Δ 0.7 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 53.1Δ 4.6 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 45.9Δ 11.9 |
| BTTF | 0.657 | 0–1; higher is more readable | 68.3Δ 10.6 |
| Human | 3.92 | 1–4; original rating | 57.8 |
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. | 1970.841 | −65.038 |
| Source linesThe number of non-empty source lines. | 123 | +49.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.106 | −7.659 |
Intercept 8.87 + feature contributions = -14.627 (log-odds).
Score = sigmoid(-14.627) = 0.
| Score | 0.827 |
|---|
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. | 124 | −3.354 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 80 | +2.03 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 122.911 | +1.308 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.04 | +0.558 |
| 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.613 | +0.383 |
| 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.976 | +0.362 |
Intercept 0.07 + feature contributions = 1.756 (log-odds).
Score = sigmoid(1.756) = 0.853.
| Score | 0.589 |
|---|
| Score | 21 |
|---|
Run 1
The code is generally readable with clear structure and organization. The class has a logical layout: fields, constructor, then overridden methods. Nesting is minimal, with only one if-statement in getIcons() and one in isReverseEdge(). Intent is clear through descriptive method names like getNewEdgeType() and isReverseEdge(). Code length is appropriate - it's concise without being overly verbose. Action granularity is good with one action per line in most cases, though the return statements in isReverseEdge() could be simplified to a single boolean expression. The main readability drawbacks are the large copyright header (which is boilerplate), the cryptic 'BASE' reference in getInstructions() that isn't defined in this class, and the inconsistent array formatting. The magic number reliance on index positions and null array entries makes the code slightly harder to understand without inspecting parent class constants. Overall, it's a well-structured, readable class with minor clarity issues.
Run 2
The code is generally well-structured and readable. It follows a clear, logical organization with class fields grouped at the top, a simple constructor, and overridden methods that are focused and concise. Nesting is minimal, with only a simple if-else in one method. Each method performs a single, clear action, and the reading flow is natural. The excessive copyright header, while legally required, detracts from immediate readability at the top of the file but is not part of the actual logic. Minor issues include the unused `instructions` array being larger than needed and some redundant methods like `getNewEdgeType` and `getNewNodeType` that add slight noise. Overall, the code is clean, maintainable, and easy to follow.
Run 3
The code is highly readable. It has clear logical structure with a single class, fields, constructor, and overridden methods separated by blank lines. Nesting is minimal, with only one if statement that is short and clear. The intent of each method is obvious from its name and the overriding annotation. Code length is concise—no redundant logic or unnecessary comments. Action granularity is one action per line, which improves clarity. Reading flow is natural: fields are declared first, then constructor, then overridden methods in a logical order. Minor issues include the unused 'index' parameter in some methods and slight inconsistency in icon array formatting, but these are very minor. Overall, the code is well-organized, easy to follow, and maintainable.
Run 1
Code Structure: Logically organized into static resources, a constructor, and small overridden methods. Nesting: Very shallow, with only simple conditionals. Clarity of intent: Class and method names communicate component-instance selection behavior, but abbreviated names such as dep and positional arrays require framework knowledge; the constructor documentation also contains a naming typo. Code length: Implementation is concise, although repeated instruction strings and the verbose boolean conditional could be simplified; the lengthy license header adds scanning overhead. Action granularity: Most lines perform one action, with the compact constructor slightly reducing consistency. Reading flow: Natural top-to-bottom organization and consistent method formatting make navigation easy, though irregular array formatting and unexplained index relationships interrupt the flow.
Run 2
Code Structure: The class is logically organized into icon resources, instruction data, a constructor, and focused overrides. Nesting: Control flow is shallow, with only simple conditionals. Clarity of intent: Descriptive class and method names communicate the purpose, but abbreviated fields such as dep, positional arrays, and the unexplained index - BASE mapping require contextual knowledge. Code length: Implementation methods are concise, although repeated instruction strings and the verbose boolean return pattern add avoidable length; extensive license text delays reaching the implementation. Action granularity: Most statements perform one action, but the inline constructor slightly compresses presentation. Reading flow: The method sequence is coherent and easy to follow, though inconsistent array formatting and a constructor documentation typo reduce polish.
Run 3
Code Structure: Well-organized class with fields, constructor, and short, focused overrides. Nesting: Very shallow, with only simple conditional branches. Clarity of intent: Method names and model factory calls communicate purpose clearly, but abbreviated icon names, positional arrays, null entries, and index-offset conventions require framework knowledge. The constructor documentation also contains a naming typo. Code length: Implementation is concise, although repeated instruction strings and the verbose boolean return could be simplified; lengthy license headers add visual overhead without complicating the logic. Action granularity: Most lines contain a single action, but the constructor places its declaration and superclass call on one line. Reading flow: Methods follow a natural progression and formatting is mostly consistent, though unusual array formatting and implicit relationships between icons, instructions, and direction constants slightly interrupt comprehension.