Sample
Buse/15
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable | 6.1Δ 6.1 |
| Dorn | 0.196 | 0–1; higher is more readable | 11.1Δ 11.1 |
| Mi | 0.281 | 0–1; higher is more readable | 14.1Δ 14.1 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 88.9 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 92.4Δ 92.4 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 84.8Δ 84.8 |
| BTTF | 0.315 | 0–1; higher is more readable | 12.1Δ 12.1 |
| Human | 1.83 | 1–5; original rating | 0.0 |
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. | 347.833 | −11.478 |
| 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.553 | −6.829 |
| Source linesThe number of non-empty source lines. | 5 | +2 |
Intercept 8.87 + feature contributions = -7.438 (log-odds).
Score = sigmoid(-7.438) = 0.001.
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. | 6 | +0.824 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 5 | −0.564 |
| 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. | 98 | −0.486 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.139 | −0.412 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 4.747 | −0.343 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 5 | +0.306 |
Intercept 0.07 + feature contributions = -1.409 (log-odds).
Score = sigmoid(-1.409) = 0.196.
| Score | 0.281 |
|---|
| Score | 3 |
|---|
Run 1
The code is generally well-structured and readable. It clearly separates logical steps across three lines: calculating a step size, constructing a spinner model, and setting a tooltip. Nesting is minimal, mainly within method arguments, which is acceptable. The intent of each line is fairly clear, though the magic numbers '10' and '1000' lack context but are understandable. Code length is concise and avoids unnecessary verbosity. Each line performs a distinct action, adhering to good action granularity. Reading flow is natural, progressing from calculation to construction to configuration. Minor deductions: the first line's calculation could be slightly harder to parse due to combined min/max arithmetic and the absence of explanatory constants. Overall, it is clean, purposeful, and readable code.
Run 2
The code is clear and concise. It calculates a step size bounded by 1000, creates a spinner with a numeric model that respects min/max and a positive step size, and sets a tooltip. Each line performs one logical action, and the nesting is flat. Variable names are descriptive, and the use of Math.min and Math.max makes the intent explicit. The only minor issue is the magic numbers 10 and 1000, which could be extracted to constants for improved maintainability.
Run 3
The code is highly readable. It is flat with no nesting. Each line performs a clear, single action: calculating a step size, constructing a spinner, and setting a tooltip. The logic is concise, using Math.min and Math.max to safely clamp values. The variable names are descriptive, and the structure follows a natural flow from calculation to object creation to configuration, making intent immediately clear.
Run 1
Code Structure: Logically organized into step-size calculation, spinner creation, and tooltip configuration. Nesting: Flat statements with only shallow nesting of constructor and method calls. Clarity of intent: Descriptive names make the purpose clear, though the constants 10 and 1000 lack explanations. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one main action, although spinner creation also constructs its number model. Reading flow: Natural progression from calculating a parameter to creating and configuring the component; the wrapped constructor arguments remain easy to follow.
Run 2
Code Structure: Logically groups step-size calculation, spinner creation, and tooltip configuration. Nesting: Flat statements with only modest nesting of constructor and method calls. Clarity of intent: Clearly creates a bounded numeric spinner, although the constants 10 and 1000 lack explanation. Code length: Concise without unnecessary statements. Action granularity: Each statement performs one main action; the constructor arguments appropriately combine related configuration. Reading flow: Natural progression from calculating the increment to initializing and annotating the control, with a readable line break for the constructor.
Run 3
Code Structure: Logically organized into step-size calculation, spinner initialization, and tooltip configuration. Nesting: No control-flow nesting; nested constructor and method calls are shallow and manageable. Clarity of intent: Names and API calls clearly convey creation of a bounded numeric spinner, although the constants 10 and 1000 lack explanation. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action, though initialization combines model construction and minimum step-size enforcement. Reading flow: Natural progression from calculation to construction to configuration; the wrapped constructor arguments remain easy to follow.