Sample
Schnappinger/argoUML/org.argouml.uml.diagram.ui.FigKeyword
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.959 | 0–1; higher is more readable | 88.6Δ 0.2 |
| Scalabrino | 0.805 | 0–1; higher is more readable | 63.7Δ 25.1 |
| Dorn | 0.497 | 0–1; higher is more readable | 60.4Δ 28.4 |
| Mi | 0.513 | 0–1; higher is more readable | 36.3Δ 52.5 |
| LLOC | 20 | Logical lines; fewer is more readable | 59.7Δ 29.0 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 66.8Δ 21.9 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 15.0 |
| BTTF | 0.696 | 0–1; higher is more readable | 80.5Δ 8.3 |
| Human | 3.99 | 1–4; original rating | 88.8 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 114 | +45.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 1323.722 | −43.683 |
| 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.092 | −7.638 |
Intercept 8.87 + feature contributions = 3.149 (log-odds).
Score = sigmoid(3.149) = 0.959.
| Score | 0.805 |
|---|
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. | 115 | −3.035 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 113.899 | +1.182 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 55 | +1.165 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 55 | −0.841 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.028 | +0.673 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 75.304 | +0.411 |
| 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.974 | +0.363 |
Intercept 0.07 + feature contributions = -0.013 (log-odds).
Score = sigmoid(-0.013) = 0.497.
| Score | 0.513 |
|---|
| Score | 20 |
|---|
Run 1
The code is generally readable and well-structured. The class has a clear single responsibility, with logical grouping of fields, constructor, initialization, and overridden methods. The copyright header, while lengthy, is standard legal boilerplate and not part of the actual logic. Nesting is minimal, and each method performs a single clear action, giving good action granularity. The intent is clearly expressed through meaningful names and Javadoc comments explaining non-obvious behavior. However, the reading flow is slightly disrupted by the placement of the setLineWidth override between initialization and setText methods, and the empty initialize() method adds minor indirection. The assert in setText also introduces a subtle runtime dependency that could be clearer. Overall, the code is concise and maintainable, but these minor organizational issues prevent a higher score.
Run 2
The code is highly readable with clear structure and organization. It follows logical class organization with fields, constructors, and methods in sensible order. Nesting is minimal—only one method contains an assertion, and there are no deep conditional blocks. Intent is clearly expressed through descriptive method names like `initialize()` and comments explaining non-obvious decisions (e.g., forcing line-width to 0). Code length is concise and appropriate; the class is focused and doesn't contain unnecessary boilerplate. Action granularity is good—most lines perform a single clear action, particularly in the `initialize()` method. Reading flow is natural: the constructor calls initialization, sets the keyword, and updates text in logical sequence. Minor deductions: the dual license header is verbose but standard; the `setText()` assertion could be clearer with an error message. Overall, well-structured, maintainable code that follows clean code principles.
Run 3
The code is highly readable. It has a clear, logical class structure with a single purpose, well-organized imports, and concise Javadoc that explains intent. Nesting is minimal—methods are flat and straightforward. Each method performs one cohesive action, with one action per line and good use of whitespace. The reading flow is natural, from constructor to initialization to overridden methods. The only minor weakness is some redundant code: the constructor calls setText(keyword) after assigning keywordText, and initialize() sets line width via super.setLineWidth(0), while the overridden setLineWidth also forces 0. This slight redundancy does not significantly harm readability but could confuse maintainers. Overall, the code is clean, expressive, and easy to follow.
Run 1
Code Structure: A focused class with logically separated construction, initialization, and overrides. Nesting: Almost entirely flat, with no nested control flow. Clarity of intent: Descriptive names and documentation clearly explain the noneditable keyword display and guillemet formatting; the ignored line-width parameter is explicitly justified. The assertion and reliance on superclass behavior require slightly more attention. Code length: Implementation is concise, although extensive licensing comments dominate the file. Action granularity: Statements generally perform one action per line; the chained settings lookup adds minor density. Reading flow: Imports, class documentation, field, constructor, and methods follow a natural order, with consistent formatting and helpful comments.
Run 2
Code Structure: A focused class with clearly separated construction, initialization, and rendering overrides. Nesting: Almost entirely flat, with no nested control flow. Clarity of intent: Descriptive names and documentation explain the noneditable keyword and guillemet formatting; the ignored line-width parameter is explicitly justified. The overloaded setText methods and constructor initialization order require some attention. Code length: Implementation is concise, although the lengthy license header adds substantial visual overhead. Action granularity: Statements generally perform one action per line; the chained settings lookup is slightly denser but still readable. Reading flow: Consistent formatting and a natural progression from setup to behavior make the class easy to follow.
Run 3
Code Structure: A focused class with logically separated construction, initialization, and overrides. Nesting: Almost entirely flat, with no nested control flow. Clarity of intent: Descriptive names and useful documentation explain the noneditable keyword display and guillemet formatting; overloaded setText methods and the assertion require some attention. Code length: Implementation is concise, although the extensive license header delays reaching the functional code. Action granularity: Each statement performs one clear action, and initialization settings are individually listed. Reading flow: Methods follow a natural progression from setup to behavior customization, with consistent formatting. Minor readability costs include unexplained numeric margins, the ignored setLineWidth parameter, and dependencies on inherited behavior.