Sample
Dorn/java/137
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable | 59.1Δ 3.2 |
| Scalabrino | 0.799 | 0–1; higher is more readable | 86.8Δ 31.0 |
| Dorn | 0.812 | 0–1; higher is more readable | 79.1Δ 23.3 |
| Mi | 0.365 | 0–1; higher is more readable | 35.7Δ 20.2 |
| LLOC | 10 | Logical lines; fewer is more readable | 59.5Δ 3.6 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 93.5Δ 37.6 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 10.2 |
| BTTF | 0.601 | 0–1; higher is more readable | 73.5Δ 17.7 |
| Human | 3.4 | 1–5; original rating | 55.8 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 627.669 | −20.713 |
| Source linesThe number of non-empty source lines. | 29 | +11.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.603 | −6.905 |
Intercept 8.87 + feature contributions = -7.148 (log-odds).
Score = sigmoid(-7.148) = 0.001.
| Score | 0.799 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 91 | +0.664 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.064 | +0.323 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 28 | +0.231 |
| 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. | 90.933 | −0.186 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.761 | −0.008 |
Intercept 0.07 + feature contributions = 1.466 (log-odds).
Score = sigmoid(1.466) = 0.812.
| Score | 0.365 |
|---|
| Score | 10 |
|---|
Run 1
The code is well-structured and readable. It has a clear class hierarchy, logical organization of fields and methods, and flat nesting. The method `moveToFrontAndSelectAliasFrame` has one action per line, making intent explicit. The try-catch is concise and handles a specific exception with localized logging. Minor issues: field naming uses legacy `s_` prefix and uses `DeleteAliasAction.class` for logging context in a class named `AliasAction`, which could confuse. Overall, the code is clean, maintainable, and easy to follow.
Run 2
The code is highly readable. It follows a logical structure with clear separation of concerns: logger setup, string manager initialization, constructor, and a single protected method. Nesting is minimal, with only one try-catch block used appropriately for handling a checked exception. Intent is clear — the method moves an aliases frame to the front and attempts to select it, with error logging. Code length is concise yet sufficient. Each statement generally performs one action, aiding granularity. Reading flow is natural: initialize resources, define methods, perform actions sequentially. Minor drawbacks: the class name `AliasAction` is slightly generic, and the variable name `tw` is cryptic. The hardcoded comment for i18n could be a named constant. Overall, very maintainable and easy to follow.
Run 3
The code is well-structured and follows clean coding principles. It has a clear class hierarchy with inheritance from SquirrelAction, and the methods are focused and concise. The nesting is minimal (only one try-catch block), and the reading flow is natural from top to bottom. Each line performs a single action, making the code easy to follow. The intent is clear - the class handles alias-related actions and provides window management functionality. However, there are minor issues: the logger and string manager reference DeleteAliasAction.class instead of AliasAction.class, suggesting a copy-paste error that could confuse readers. The method name accurately describes its behavior, and the error handling is appropriate for the vetoable change operation. The code could benefit from a brief class-level Javadoc explaining its abstract purpose, but the method-level documentation through string manager references provides sufficient context for understanding.
Run 1
Code Structure: Fields, constructor, and helper method are logically organized, although the class lacks a closing brace in the supplied snippet. Nesting: Shallow nesting and a straightforward try/catch make the method easy to follow. Clarity of intent: The method name clearly describes its purpose, but the variable name 'tw' is vague, and references to DeleteAliasAction inside AliasAction create confusion. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one main action; the chained window lookup remains understandable. Reading flow: Execution proceeds naturally from obtaining the application and frame to bringing it forward and selecting it. Uneven indentation and the implementation-oriented internationalization comment slightly disrupt readability.
Run 2
Code Structure: Fields, constructor, and helper method are logically organized, although the snippet lacks the class's closing brace. Nesting: Minimal nesting, with a straightforward try/catch. Clarity of intent: The method name clearly describes its purpose, but the variable name 'tw' is vague, and references to DeleteAliasAction within AliasAction are confusing. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs a distinct action on its own line. Reading flow: Execution proceeds naturally from obtaining the frame to bringing it forward and selecting it, with localized exception handling. Inconsistent indentation and a long logging statement slightly reduce readability.
Run 3
Code Structure: The class has a straightforward organization, separating fields, construction, and window-selection behavior, though the displayed class lacks its closing brace. Nesting: Minimal nesting, limited to a clear try/catch block. Clarity of intent: The method name clearly describes its purpose, but the variable name 'tw' is vague, and references to DeleteAliasAction in AliasAction are confusing. Code length: Short and focused, with little unnecessary code. Action granularity: Each statement performs a distinct action, making individual steps easy to follow. Reading flow: Execution proceeds naturally from retrieving the application and frame to bringing it forward, selecting it, and handling failure. Inconsistent indentation and the awkwardly formatted internationalization comment slightly interrupt readability.