Sample
Schnappinger/argoUML/org.argouml.ui.explorer.rules.AbstractPerspectiveRule
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 1 | 0–1; higher is more readable | 98.0Δ 6.1 |
| Scalabrino | 0.897 | 0–1; higher is more readable | 88.0Δ 3.9 |
| Dorn | 0.969 | 0–1; higher is more readable | 99.0Δ 7.1 |
| Mi | 0.612 | 0–1; higher is more readable | 65.0Δ 26.9 |
| LLOC | 4 | Logical lines; fewer is more readable | 87.0Δ 5.0 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 73.9Δ 18.0 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 18.2 |
| BTTF | 0.745 | 0–1; higher is more readable | 90.4Δ 1.5 |
| Human | 4 | 1–4; original rating | 91.9 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 66 | +26.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 262.331 | −8.657 |
| 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.207 | −7.811 |
Intercept 8.87 + feature contributions = 18.802 (log-odds).
Score = sigmoid(18.802) = 1.
| Score | 0.897 |
|---|
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. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.008 | +0.86 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.94 | +0.598 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 65.864 | +0.511 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 22 | +0.024 |
| 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. | 87 | −0.02 |
Intercept 0.07 + feature contributions = 3.443 (log-odds).
Score = sigmoid(3.443) = 0.969.
| Score | 0.612 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly readable overall. The structure is logical: license headers are clearly separated from the package declaration and class definition, and the class implements a single, clear responsibility via the PerspectiveRule interface. Nesting is effectively flat—there are no conditional blocks or nested method bodies. Intent is clear: this is an abstract base class defining a contract for rule naming and child retrieval, with a sensible toString override. The code is concise and avoids unnecessary length, though the extensive license header adds significant preamble before the actual code. Action granularity is clean, with one statement per line. Reading flow is natural, with imports, Javadoc comments, method declarations, and implementation ordered conventionally. Minor deductions come from the verbose multi-license header and the lack of Javadoc descriptions (only @see tags), but these do not materially harm comprehension.
Run 2
The code is highly readable. It has a clear, logical structure with a single class implementing an interface and minimal dependencies. Nesting is flat—there are no conditional blocks or loops. The intent is evident: it provides an abstract base for perspective rules with a rule name and children collection. Code length is concise and appropriate for an abstract class. Action granularity is clean, with each method containing one simple action. Reading flow is natural, from package declaration and imports to the class definition and straightforward method implementations. The only minor drawbacks are the lengthy legal header and redundant Javadoc comments, but these do not significantly hinder readability.
Run 3
The code is very readable. Structure is logical with a clear package declaration, imports, and a single abstract class implementing an interface. Nesting is flat—there is only one method with a body, and it contains a single return statement. Intent is clear: the class provides a base implementation of PerspectiveRule, delegating toString() to getRuleName(). Code length is concise, though the lengthy license headers slightly impact initial readability before reaching the actual code. Action granularity is good, with one operation per line. Reading flow is natural, with abstract methods annotated by comments indicating their origin. Deductions are mainly due to the verbose copyright blocks, which add noise, and the somewhat redundant Javadoc comments that do not add much value. Overall, the code is clean and maintainable.
Run 1
Code Structure: Clearly organized into package, import, class, and three related methods. Nesting: Minimal, with no nested control flow. Clarity of intent: Descriptive class and method names make the abstraction understandable, and toString clearly delegates to getRuleName; however, the empty class documentation and raw Collection type leave some details unspecified. Code length: The implementation is concise, though the extensive license header dominates the file visually. Action granularity: Each declaration or return statement occupies its own line. Reading flow: Consistent formatting and straightforward method ordering make the code easy to follow; repetitive reference comments provide limited additional context.
Run 2
Code Structure: Clearly organized into package, import, class declaration, and three focused methods. Nesting: Minimal, with no conditional or loop nesting. Clarity of intent: Descriptive class and method names make the purpose understandable, and toString() plainly delegates to getRuleName(); however, class documentation lacks a meaningful description and the raw Collection leaves child types unspecified. Code length: The implementation is concise, though the extensive license header dominates the file and repeated abstract declarations add some boilerplate. Action granularity: Each declaration or statement occupies its own line, with a single action in toString(). Reading flow: Conventional Java ordering and consistent formatting make the code easy to follow, with only minor distraction from verbose header comments and sparse explanatory documentation.
Run 3
Code Structure: The class is logically organized, with abstract rule methods followed by a simple toString implementation. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: Class and method names communicate their roles, and toString clearly delegates to getRuleName; however, the class lacks a meaningful description, and the raw Collection type leaves child types unspecified. Code length: The implementation is concise, although the extensive license header dominates the file visually. Action granularity: Each declaration or statement expresses a single action. Reading flow: Package, import, class declaration, and methods appear in a conventional, natural order. Sparse explanatory documentation and lengthy boilerplate slightly reduce otherwise strong readability.