Sample
Scalabrio3
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 21.6Δ 23.9 |
| Scalabrino | 0.813 | 0–1; higher is more readable | 84.9Δ 39.4 |
| Dorn | 0.688 | 0–1; higher is more readable | 77.9Δ 32.4 |
| Mi | 0.42 | 0–1; higher is more readable | 69.3Δ 23.9 |
| LLOC | 23 | Logical lines; fewer is more readable | 15.8Δ 29.6 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 85.7Δ 40.2 |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs | 93.0Δ 47.5 |
| BTTF | 0.678 | 0–1; higher is more readable | 89.4Δ 44.0 |
| Human | 3.56 | 1–5; original rating | 45.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. | 1339.388 | −44.2 |
| Source linesThe number of non-empty source lines. | 33 | +13.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.401 | −6.602 |
Intercept 8.87 + feature contributions = -28.731 (log-odds).
Score = sigmoid(-28.731) = 0.
| Score | 0.813 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 72.97 | +0.575 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 70.818 | +0.338 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.076 | +0.206 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 33 | −0.132 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 31.932 | +0.037 |
Intercept 0.07 + feature contributions = 0.789 (log-odds).
Score = sigmoid(0.789) = 0.688.
| Score | 0.42 |
|---|
| Score | 23 |
|---|
Run 1
The code is highly readable due to its simple, flat structure and clear intent. The method has a single responsibility: deserializing paint attributes. Each line performs one action (assigning a deserialized paint to a field), which aids granularity. The Javadoc explains the parameters and exceptions. However, the repetitive nature of 22 nearly identical calls is slightly verbose and could benefit from a loop or helper method to reduce length. Nesting is minimal, and the reading flow is natural, though the long list of assignments makes it dense. Overall, it is clear and maintainable but slightly monotonous.
Run 2
The code is highly readable due to its flat structure, consistent pattern, and clear intent. Each line performs a single deserialization action for a distinct paint property, demonstrating excellent action granularity. The method's purpose is immediately understandable from the Javadoc and the sequential assignments. While the method is somewhat long, the repetition is justified by the serialization protocol and actually improves readability by maintaining a predictable, scannable pattern. The code avoids unnecessary nesting and complexity. The reading flow is logical—defaultReadObject first, followed by field-by-field restoration. Minor improvements could include using a loop with reflection or a list, but that would reduce clarity and type safety. Overall, this is an excellent example of simple, maintainable serialization code.
Run 3
The code is highly readable. It follows a clear, flat structure with no nesting. Each line performs a single, well-defined action: deserializing a specific paint attribute from the input stream. The method's purpose is explicit from its name and Javadoc. The only minor drawback is the repetitive nature of the 21 nearly identical assignment lines; a loop or helper mapping could reduce length, but this repetition actually aids clarity by explicitly naming each field. Overall, the code is structured, unambiguous, and easy to follow.
Run 1
Code Structure: A single, logically organized method restores default state before reading custom paint fields. Nesting: Completely flat, with no branches or loops. Clarity of intent: The standard readObject signature, documentation, descriptive field names, and consistent readPaint calls make deserialization clear. Code length: Repetitive but appropriately concise for explicit, order-dependent field restoration. Action granularity: Each line performs one field assignment. Reading flow: Predictable and easy to scan from top to bottom. The main minor weakness is that the required correspondence with serialization order is not documented.
Run 2
Code Structure: A single, logically organized method restores default state before reading individual paint fields. Nesting: Completely flat, with no conditional or loop complexity. Clarity of intent: The standard readObject signature, documentation, descriptive field names, and readPaint calls clearly communicate deserialization. Code length: Somewhat lengthy and repetitive, but the explicit assignments are justified by sequential stream reads. Action granularity: Each statement performs one clear operation. Reading flow: Consistent formatting and assignment patterns make the method easy to scan. Minor drawbacks are limited visual grouping and the lack of a comment noting that field order must match serialization order.
Run 3
Code Structure: A single, focused deserialization method logically restores default state before custom paint fields. Nesting: Completely flat, with no branches or loops. Clarity of intent: Descriptive field names, readPaint calls, and documentation make the purpose clear, although the required serialization order is not explained. Code length: Moderately repetitive but appropriately explicit for restoring distinct fields in sequence. Action granularity: Each statement performs one clear operation on its own line. Reading flow: Consistent formatting and assignments create a predictable, easy-to-follow progression; grouping related paint fields could improve scanning.