Sample
Schnappinger/argoUML/org.argouml.cognitive.ui.PriorityNode
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.98 | 0–1; higher is more readable | 90.0Δ 51.4 |
| Scalabrino | 0.911 | 0–1; higher is more readable | 92.5Δ 53.9 |
| Dorn | 0.823 | 0–1; higher is more readable | 89.4Δ 50.8 |
| Mi | 0.634 | 0–1; higher is more readable | 69.6Δ 31.0 |
| LLOC | 23 | Logical lines; fewer is more readable | 55.9Δ 17.3 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 44.4 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 35.1 |
| BTTF | 0.714 | 0–1; higher is more readable | 84.8Δ 46.2 |
| Human | 3.45 | 1–4; original rating | 38.6 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 122 | +48.8 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 1399.894 | −46.196 |
| 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.037 | −7.556 |
Intercept 8.87 + feature contributions = 3.917 (log-odds).
Score = sigmoid(3.917) = 0.98.
| Score | 0.911 |
|---|
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. | 123 | −3.319 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 70 | +1.684 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 121.975 | +1.295 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.029 | +0.659 |
| 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.707 | +0.385 |
| 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.535 (log-odds).
Score = sigmoid(1.535) = 0.823.
| Score | 0.634 |
|---|
| Score | 23 |
|---|
Run 1
The code is highly readable with clear structure and organization. It follows standard Java conventions, separates constants, fields, constructor, and methods logically. Nesting is minimal, with only a lazy initialization block, and that block is small and well-commented. The intent of each method is obvious from its name and Javadoc, and all methods are short and single-purpose. Action granularity is mostly one statement per line, except for slightly compact object creation calls. Reading flow is natural and linear. The only minor deductions are for the long license header and the constructor's lack of 'this.' prefix, which could slightly improve clarity, but these do not significantly impact readability.
Run 2
The code is highly readable. It has a clear, logical class structure with well-separated fields, constructor, and methods. Nesting is minimal—only a single if block for lazy initialization. Intent is obvious: represent a priority level. Code length is concise and appropriate for the problem. Action granularity is mostly one action per line, though constructor assignments share lines. Reading flow is natural: constants, then constructor, then static accessor, then getters, then toString override. Well-written Javadoc comments explain each method’s purpose. Minor deductions: constructor assignments on the same line slightly reduce granularity, and the lazy initialization pattern could be slightly clearer. Overall, the code is easy to scan, understand, and maintain.
Run 3
The code is generally readable. It has clear class structure with well-named methods and fields. Nesting is minimal—only one level in the lazy initialization block. The intent is clear: a priority node with a cached list of priorities. Lines are concise, with one action per line, and reading flow is natural from fields to constructor, methods, and toString. However, the lengthy copyright header (not code) slightly interrupts readability at the top, and the lazy initialization block could be simplified, but these are minor. Overall, it is well-organized and maintainable.
Run 1
Code Structure: Constants, fields, constructor, initialization method, and accessors are logically organized. Nesting: Only one shallow conditional makes control flow easy to follow. Clarity of intent: Class documentation, descriptive method names, and named priority constants clearly communicate purpose, although abbreviated variables n, pri, and p are less expressive. Code length: Implementation is concise; extensive license text and repetitive accessor documentation add scanning overhead. Action granularity: Statements generally perform one action per line, with clear separation between list creation, population, and assignment. Reading flow: Methods follow a natural sequence, but inconsistent indentation, extra blank lines, and unnecessary line wrapping slightly disrupt the presentation.
Run 2
Code Structure: Fields, constructor, initialization method, and accessors are logically organized with clear separation. Nesting: Only one conditional level makes the logic easy to follow. Clarity of intent: Class documentation, descriptive constants, and straightforward methods communicate purpose well; abbreviated names n, pri, and p slightly reduce clarity. Code length: Implementation is concise, though the lengthy license header and routine accessor comments add scanning overhead. Action granularity: Each statement performs a single action, with no compressed multi-action lines. Reading flow: Conventional Java organization supports natural reading, but mixed indentation, extra blank lines, and unnecessary wrapping of short constructor calls slightly interrupt it.
Run 3
Code Structure: Fields, constructor, initialization method, getters, and toString are logically organized and clearly separated. Nesting: Only one conditional level makes control flow easy to follow. Clarity of intent: Descriptive class, constant, and method names communicate the purpose well; abbreviated variables n, pri, and p are less expressive. The comment claiming correct lazy initialization is potentially misleading because initialization is not synchronized. Code length: Implementation is concise, although extensive license headers and routine documentation increase scanning effort. Action granularity: Each statement performs a single action, with no dense compound expressions. Reading flow: Conventional Java organization supports natural reading, but mixed indentation, extra blank lines, and unnecessary wrapping of short constructor calls introduce minor visual friction.