Sample
Scalabrio114
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.137 | 0–1; higher is more readable | 86.9Δ 10.8 |
| Scalabrino | 0.86 | 0–1; higher is more readable | 90.5Δ 7.3 |
| Dorn | 0.721 | 0–1; higher is more readable | 80.9Δ 16.8 |
| Mi | 0.789 | 0–1; higher is more readable | 96.5Δ 1.3 |
| LLOC | 15 | Logical lines; fewer is more readable | 44.5Δ 53.3 |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs | 98.5Δ 0.8 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 98.0Δ 0.3 |
| BTTF | 0.726 | 0–1; higher is more readable | 94.0Δ 3.8 |
| Human | 4.67 | 1–5; original rating | 97.7 |
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. | 509.58 | −16.816 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 3.93 | −5.894 |
Intercept 8.87 + feature contributions = -1.841 (log-odds).
Score = sigmoid(-1.841) = 0.137.
| Score | 0.86 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 64.967 | +0.914 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 62.867 | +0.21 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.087 | +0.095 |
| 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.727 | −0.008 |
Intercept 0.07 + feature contributions = 0.95 (log-odds).
Score = sigmoid(0.95) = 0.721.
| Score | 0.789 |
|---|
| Score | 15 |
|---|
Run 1
The code is highly readable. It follows a clear, logical structure: identity check, type check, cast, then field-by-field comparison. Nesting is minimal with early returns flattening the logic. The intent of each condition is explicit, and each check is a single, focused action per line. The method is concise without being overly compressed. The reading flow is natural, moving from the most general checks to the specific field comparisons. Minor improvements could include using Double.compare for floating-point fields to avoid potential NaN issues, but for an equals method, the current direct comparison is clear and conventional.
Run 2
The code is highly readable. It follows a clear, logical structure with early returns for reference equality and type checking. Nesting is minimal, with flat conditional checks rather than nested blocks. Each comparison is on its own line, maintaining one action per line. The method's intent is obvious from its name and concise Javadoc. The reading flow is natural, progressing from quickest checks to detailed field comparisons. While the code is slightly repetitive, this repetition improves clarity by making each field comparison explicit and easy to verify.
Run 3
The equals method is well-structured and highly readable. It follows a clear, logical flow: check identity, check type, cast, then compare each field. Nesting is minimal—only one level of indentation for control statements, with no deeply nested blocks. Intent is unambiguous due to standard equals() patterns and clear variable naming. Code length is concise and appropriate; no unnecessary verbosity. Each comparison is on its own line, maintaining excellent action granularity. Reading flow is natural and follows standard Java conventions, making it easy to follow. The Javadoc is clear and helpful. Minor deduction only because the method could potentially use Objects.equals() or a helper for even more conciseness, but the current explicit style is arguably clearer for primitive double comparisons. Overall, this is exemplary readable code.
Run 1
Code Structure: Logically organized into identity, type, and field checks. Nesting: Shallow conditionals and early returns keep the method flat. Clarity of intent: The equals signature, documentation, and explicit field comparisons make its purpose clear. Code length: Slightly repetitive; the field checks could be combined, but their explicitness aids readability. Action granularity: Each statement performs a single action, with no compressed logic. Reading flow: Checks proceed naturally from quick exclusions to detailed comparison and final success.
Run 2
Code Structure: Logically organized into identity checking, type checking, casting, and field comparisons. Nesting: Shallow, with early returns avoiding nested conditionals. Clarity of intent: The equals method, descriptive field names, and documentation make its purpose clear. Code length: Slightly repetitive but appropriately concise; combining comparisons would shorten it without necessarily improving readability. Action granularity: Each statement performs one clear action, and each conditional checks a single condition. Reading flow: Natural and predictable, progressing from preliminary checks to individual field comparisons and a final success return.
Run 3
Code Structure: Logically organized into identity checking, type checking, casting, and field comparisons. Nesting: Flat guard clauses avoid deep nesting. Clarity of intent: The equals method, descriptive field names, and documentation make the purpose clear. Code length: Concise overall, although repeated comparison blocks add minor verbosity. Action granularity: Each statement performs one action, and each conditional checks one concern. Reading flow: A natural top-to-bottom progression makes the equality decision easy to follow.