Sample
Schnappinger/argoUML/org.argouml.uml.cognitive.critics.CrCircularInheritance
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 62.9Δ 20.3 |
| Scalabrino | 0.647 | 0–1; higher is more readable | 28.8Δ 13.8 |
| Dorn | 0.471 | 0–1; higher is more readable | 58.7Δ 16.2 |
| Mi | 0.584 | 0–1; higher is more readable | 56.4Δ 13.9 |
| LLOC | 19 | Logical lines; fewer is more readable | 61.6Δ 19.0 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 47.4Δ 4.8 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 38.9Δ 3.6 |
| BTTF | 0.686 | 0–1; higher is more readable | 77.2Δ 34.7 |
| Human | 3.73 | 1–4; original rating | 42.6 |
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. | 1695.717 | −55.959 |
| Source linesThe number of non-empty source lines. | 108 | +43.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.283 | −7.924 |
Intercept 8.87 + feature contributions = -11.813 (log-odds).
Score = sigmoid(-11.813) = 0.
| Score | 0.647 |
|---|
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. | 109 | −2.823 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 55 | +1.165 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 107.828 | +1.097 |
| 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.034 | +0.615 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 85.807 | +0.58 |
| 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. | 86 | +0.023 |
Intercept 0.07 + feature contributions = -0.114 (log-odds).
Score = sigmoid(-0.114) = 0.471.
| Score | 0.584 |
|---|
| Score | 19 |
|---|
Run 1
The code is generally readable with clear class structure and purpose. It has a logical organization, beginning with documentation, then fields, constructor, and overridden methods. Nesting is minimal—only one if statement and a try-catch block. The intent is mostly clear: detect circular inheritance in UML models. Action granularity is mostly one action per line, though some method calls are combined. The reading flow is natural, with methods arranged in a typical order. However, several issues reduce readability: excessive license headers (28+ lines) before reaching actual code, inconsistent indentation (mixed tabs/spaces), and terse variable names like 'dm' and 'dsgr' that obscure meaning. The predicate2 method catches an exception to set a boolean, which is a somewhat unclear pattern. The setupHeadAndDesc method call without definition in this snippet adds minor ambiguity. Overall, the code is understandable but could be improved with cleaner formatting and more descriptive variable names.
Run 2
The code is generally well-structured and readable. It has a clear class purpose, good use of comments and Javadoc, and a flat, logical organization. The methods are concise and each line typically represents one action. The reading flow is natural, with imports and class definition properly ordered. However, readability is slightly reduced by inconsistent indentation (mix of tabs and spaces) and the extensive copyright header, which adds length before reaching the actual code. The predicate2 method has a nested if-try-catch structure, but it remains understandable. Overall, the code is maintainable and clear, with minor formatting inconsistencies preventing a higher score.
Run 3
The code is relatively readable with a clear class purpose and logical organization. The structure is standard: copyright header, package, imports, Javadoc, class definition, constructor, and overridden methods. Nesting is minimal with only one conditional and one try-catch. The intent is clear from the class name and documentation, though the predicate2 method's actual circular inheritance check is missing (it only catches exceptions), which slightly obscures the purpose. Code length is appropriate but the extensive license header adds noise. Action granularity is generally one action per line, though the constructor could be more consistently indented. Reading flow is natural overall, but the mixed indentation styles (tabs vs spaces) in the constructor and methods reduce fluidity. Variable names like 'dm' and 'dsgr' are cryptic. The use of constants like NO_PROBLEM and PROBLEM_FOUND improves clarity. Overall, the code is understandable but could benefit from consistent formatting and clearer naming.
Run 1
Code Structure: The class is logically organized into logger setup, constructor configuration, predicate evaluation, and supported material types. Nesting: The predicate has modest nesting through an if and try/catch, remaining easy to follow. Clarity of intent: Class and method names indicate circular-inheritance checking, but detecting cycles indirectly through getChildren throwing IllegalStateException is not explained; abbreviated names such as dm and ret also reduce clarity. Code length: Executable code is concise, although extensive licensing text and boilerplate comments add scanning overhead. Action granularity: Each statement performs one action, with no crowded multi-action lines. Reading flow: Methods follow a natural order, but mixed tabs and spaces disrupt visual consistency, and the exception-driven detection requires knowledge of the model API.
Run 2
Code Structure: The class is logically organized into logger setup, initialization, validation, and supported material types. Nesting: The validation method has modest nesting through an if statement and try/catch, remaining easy to follow. Clarity of intent: The class name and UML references establish its purpose, but detecting circular inheritance through an exception from getChildren is implicit rather than explained. Generic names such as dm and ret also reduce clarity. Code length: Executable code is concise; extensive licensing text and boilerplate comments add scanning overhead. Action granularity: Statements generally perform one action per line, with no compressed sequences. Reading flow: Method ordering is natural, but inconsistent tab/space indentation disrupts visual consistency. Overall, readable and compact, with room for clearer naming and an explanation of the exception-based detection mechanism.
Run 3
Code Structure: The class is logically organized into a logger, constructor, predicate, and metadata method with clear responsibilities. Nesting: Nesting is modest, although the conditional containing a try/catch slightly complicates the predicate. Clarity of intent: The class name and UML references establish the purpose, but detecting circular inheritance through an exception from getChildren is implicit and deserves an explanatory comment; names such as dm and ret are vague. Code length: Implementation is concise, though extensive license headers and boilerplate comments add reading overhead. Action granularity: Each statement generally performs one action, with no compressed multi-statement lines. Reading flow: Method ordering and spacing are sensible, but mixed tabs and spaces disrupt visual consistency, and understanding the predicate requires knowledge of the model API's exception behavior.