Sample
Schnappinger/aoi/artofillusion.animation.VerticalAxis
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 32.8Δ 5.1 |
| Scalabrino | 0.629 | 0–1; higher is more readable | 25.7Δ 2.0 |
| Dorn | 0.318 | 0–1; higher is more readable | 49.2Δ 21.5 |
| Mi | 0.634 | 0–1; higher is more readable | 70.0Δ 42.2 |
| LLOC | 54 | Logical lines; fewer is more readable | 38.0Δ 10.2 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 47.4Δ 19.6 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 38.9Δ 11.2 |
| BTTF | 0.152 | 0–1; higher is more readable | 8.3Δ 19.5 |
| Human | 3 | 1–4; original rating | 27.7 |
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. | 4465.459 | −147.36 |
| 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. | 4.981 | −7.472 |
Intercept 8.87 + feature contributions = -102.762 (log-odds).
Score = sigmoid(-102.762) = 0.
| Score | 0.629 |
|---|
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. | 98 | +2.653 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 98 | −1.828 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 107.716 | +1.096 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100.982 | +0.825 |
| 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. | 100.862 | −0.607 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.112 | −0.146 |
Intercept 0.07 + feature contributions = -0.761 (log-odds).
Score = sigmoid(-0.761) = 0.318.
| Score | 0.634 |
|---|
| Score | 54 |
|---|
Run 1
The code is generally well-structured and readable. It is organized into logical methods with clear purposes, uses descriptive variable names, and maintains a reasonable level of nesting—mostly one or two levels deep. The intent of each method is easy to understand, and the action granularity is mostly good, though a few lines combine multiple operations (e.g., `int num = (int) Math.ceil(...)+1;`). The reading flow is natural, with a clear top-down traversal from field declarations to constructors, methods, and painting logic. Overall the code is concise but not terse, and the license header, while lengthy, does not significantly affect readability of the actual implementation. The tick-position calculation block could be slightly refactored for clarity, but it is still understandable with some effort.
Run 2
The code is generally well-structured and readable. It has clear field declarations, a concise constructor, and focused methods (setGraphRange, showLineAtBottom, paint). Nesting is mostly shallow; the only deeper logic is the tick-selection block in setGraphRange, which remains understandable. Intent is mostly clear from method names and comments, though the tick-increment algorithm could use a brief explanatory comment. Code length is reasonable, but setGraphRange mixes calculations with state updates, and paint mixes layout checks with drawing, slightly reducing cohesion. Action granularity is mostly one action per line, improving clarity. Reading flow is natural: setup, range selection, then painting. Minor issues: the unused `lastBounds` field is puzzling, a stray blank line/comment near 'Select the vertical tick positions' is awkward, and some variable names (dim, vscale) are abbreviated but acceptable. Overall, clean and maintainable for a custom widget.
Run 3
The code is generally well-structured and readable. Class and method responsibilities are clear, with descriptive names (setGraphRange, paint). Formatting is consistent, and helper comments explain non-obvious logic. However, some issues reduce readability: magic numbers (20.0, 4.0, 3) lack named constants or explanation; the tick-position calculation contains several nested conditional branches and a while loop that require careful reading. The paint method handles layout, formatting, and drawing in one block, which slightly reduces action granularity and reading flow. Despite this, the code is concise, avoids deep nesting, and maintains a logical flow from setup to drawing.
Run 1
Code Structure: The class is logically divided into initialization, range calculation, configuration, and painting, though painting also updates range state. Nesting: Mostly shallow, with only a modestly nested tick-spacing loop and useful early returns. Clarity of intent: Class documentation and section comments explain the purpose, but abbreviated names such as nf, dim, and num, unexplained spacing constants, and dense mathematical expressions obscure details. The lastBounds field is checked but never updated, making its intended role confusing. Code length: Compact and generally proportionate to its task, although tick-spacing calculations could benefit from a named helper. Action granularity: Most statements perform one action per line; combined field declarations slightly reduce clarity. Reading flow: Methods follow a natural sequence, and rendering proceeds clearly from setup to ticks, labels, and the optional bottom line. Inconsistent whitespace, omitted braces on short branches, and tightly packed arithmetic modestly hinder scanning.
Run 2
Code Structure: The class is logically organized into initialization, range calculation, configuration, and rendering methods. Nesting: Control flow is mostly flat, with only a shallow nested loop in tick-spacing calculation. Clarity of intent: The class documentation, method names, and section comments explain its purpose, but abbreviated names such as nf, dim, and num, unexplained numeric thresholds, and dense mathematical expressions require interpretation. Code length: The implementation is compact without significant duplication, though extra blank lines add minor visual noise. Action granularity: Statements generally perform one action per line; grouped field declarations slightly reduce clarity. Reading flow: Methods follow a natural sequence and rendering steps are easy to trace. However, inconsistent omission of braces and lastBounds being checked but never assigned make the intended resize-tracking behavior less clear.
Run 3
Code Structure: The class is logically organized into initialization, range calculation, configuration, and painting, though tick calculation could be extracted. Nesting: Mostly shallow, with only a small nested loop in tick-spacing adjustment. Clarity of intent: Class documentation, method names, and comments explain the purpose, but abbreviated names such as nf, dim, and s, unexplained numeric thresholds, and dense logarithmic expressions obscure details. The lastBounds field is checked but never updated, making the resize-handling intent less clear. Code length: Compact and generally appropriate, with some excess blank lines. Action granularity: Most lines perform one action, although combined field declarations and complex arithmetic reduce scanability. Reading flow: Methods follow a natural progression, and painting proceeds from setup to labels to the bottom line; inconsistent brace usage and tightly spaced operators slightly interrupt readability.