Sample
Buse/90
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable | 8.1Δ 41.4 |
| Scalabrino | 0.389 | 0–1; higher is more readable | 9.1Δ 40.4 |
| Dorn | 0.281 | 0–1; higher is more readable | 15.2Δ 34.3 |
| Mi | 0.5 | 0–1; higher is more readable | 40.4Δ 9.1 |
| LLOC | 7 | Logical lines; fewer is more readable | 4.0Δ 45.5 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 47.5Δ 2.0 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 11.1Δ 38.4 |
| BTTF | 0.345 | 0–1; higher is more readable | 16.2Δ 33.3 |
| Human | 3.36 | 1–5; original rating | 49.5 |
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. | 388.418 | −12.818 |
| 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.399 | −6.598 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = -6.946 (log-odds).
Score = sigmoid(-6.946) = 0.001.
| Score | 0.389 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 8 | +0.753 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| 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. | 97 | −0.443 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.714 | −0.288 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.114 | −0.164 |
Intercept 0.07 + feature contributions = -0.939 (log-odds).
Score = sigmoid(-0.939) = 0.281.
| Score | 0.5 |
|---|
| Score | 7 |
|---|
Run 1
The code snippet demonstrates some readability but suffers from incomplete context and nesting. The method name is clear, and the logic for checking view mode and selected tile is reasonably structured with flat conditional nesting (two levels deep). Action granularity is good, with one action per line. However, the snippet ends abruptly with multiple unclosed braces and an unused 'cursor' variable that never performs an action, making the intent ambiguous. The unused parameters 'canvasX' and 'canvasY' also raise questions. The 'currentMode' reference comes from an unseen class context, and the code lacks error handling or explanatory comments. While the initial checks are logical, the presence of dangling code suggests the method is incomplete or poorly refactored. The readability is moderately good for the visible portion but would likely decrease when viewing the full method with deeper nesting and unclear termination.
Run 2
The code demonstrates good readability with clear structure and logical organization. It uses flat nesting (only two levels deep) and each action is on its own line. The method name and variable names clearly convey intent. The early returns for invalid states are good practice. The boolean expression comparing tile coordinates is clear. However, the code snippet is incomplete, making it difficult to fully evaluate overall structure. Minor improvements could include extracting the coordinate comparison into a named method for even clearer intent, and consistent brace style (opening brace on same line as if statement would match the method brace style). The code is concise, avoids unnecessary complexity, and follows good Java conventions.
Run 3
The code demonstrates reasonable structure with clear early returns and flat nesting, keeping the logic easy to follow. The method name and parameters are descriptive, and the intent—displaying a tile cursor in terrain mode—is fairly clear. However, several issues hurt readability. The method appears incomplete (the opening brace for the first if-block is never closed in the provided snippet), making it impossible to assess the full logic. The nesting is only two levels deep, which is good, but the final if condition is long and mixes multiple comparisons on one line, reducing clarity. Action granularity is mixed: early returns are clean, but the combined boolean expression does too much at once. The naming of `currentMode` and `ViewMode.VIEW_TERRAIN_MODE` adds minor redundancy, and the lack of a null check for `tile` is risky. Overall, the code is readable but would benefit from breaking the condition into a named boolean variable, completing the method, and ensuring defensive null handling.
Run 1
Code Structure: The visible logic is organized around terrain mode and tile selection, but the incomplete snippet prevents assessment of the full method. Nesting: Two nested conditions add moderate depth; the null-check early return helps limit nesting. Clarity of intent: Descriptive names make the cursor-display purpose and selected-tile comparison clear, though the actual display behavior is missing. Code length: The visible code is concise without obvious redundancy. Action granularity: Each statement performs one action, and the compound condition expresses a single coordinate match. Reading flow: The sequence from mode check to selection validation to cursor retrieval is natural. Missing closing braces and a final return leave the control flow unresolved, while omitting braces around the null check slightly reduces consistency.
Run 2
Code Structure: The visible logic is organized around view mode and tile selection, but the snippet is incomplete, with unclosed blocks and no complete return path. Nesting: Two nested conditions add moderate complexity, partly offset by an early return. Clarity of intent: Descriptive method, variable, and API names suggest displaying a cursor on the selected terrain tile, though the actual display operation is missing. Code length: The visible portion is concise without unnecessary repetition. Action granularity: Each statement performs a single action; the coordinate comparison is reasonably combined in one condition. Reading flow: The sequence from mode check to selection validation to coordinate matching is natural, but the abrupt ending and inconsistent use of braces reduce readability.
Run 3
Code Structure: The visible logic is organized around terrain mode and tile selection, but the snippet is incomplete, preventing assessment of the full method. Nesting: Two conditional levels are manageable, though an early mode guard could flatten the flow. Clarity of intent: Descriptive method and variable names make the cursor-display purpose apparent; the missing remainder leaves the result unclear. Code length: The visible code is concise without unnecessary operations. Action granularity: Each statement performs one action, and the coordinate comparison forms a coherent condition. Reading flow: The sequence from mode check to selection validation to tile matching is natural. However, the unbraced null check introduces stylistic inconsistency, the long coordinate condition slightly impedes scanning, and the abrupt ending lacks closing braces and return behavior.