Sample
Scalabrio150
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.837 | 0–1; higher is more readable | 95.0Δ 4.3 |
| Scalabrino | 0.899 | 0–1; higher is more readable | 94.0Δ 5.3 |
| Dorn | 0.823 | 0–1; higher is more readable | 95.5Δ 3.8 |
| Mi | 0.724 | 0–1; higher is more readable | 93.0Δ 6.3 |
| LLOC | 5 | Logical lines; fewer is more readable | 91.2Δ 8.0 |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs | 98.5Δ 0.8 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 83.7Δ 15.6 |
| BTTF | 0.844 | 0–1; higher is more readable | 99.0Δ 0.3 |
| Human | 4.78 | 1–5; original rating | 99.2 |
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) |
|---|---|---|
| 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.521 | −6.782 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 146.946 | −4.849 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
Intercept 8.87 + feature contributions = 1.639 (log-odds).
Score = sigmoid(1.639) = 0.837.
| Score | 0.899 |
|---|
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. | 27.455 | +2.502 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| 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. | 1 | −0.703 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.164 | −0.653 |
| 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. | 9.806 | −0.273 |
Intercept 0.07 + feature contributions = 1.538 (log-odds).
Score = sigmoid(1.538) = 0.823.
| Score | 0.724 |
|---|
| Score | 5 |
|---|
Run 1
The code is highly readable. It has a clear, logical structure with a single guard clause that avoids unnecessary nesting. The intent is obvious: to close a reader if it exists. The action granularity is good, with one clear action per line. The method is concise and not unnecessarily long. The reading flow is natural: check for null, close, handle exception. The only minor deduction is the empty catch block with an ignored exception, which could be slightly improved with a comment explaining why the exception is intentionally ignored, but this is a minor issue that doesn't significantly impact readability.
Run 2
The code is highly readable. It has a clear, logical structure with a single early return guard clause. Nesting is minimal, with only a try-catch block. The intent—releasing a reader resource—is obvious despite the slightly unusual method name. The code is concise, with no unnecessary lines. Each action is on its own line, improving clarity. Reading flows naturally: check null, close, ignore exception. The only minor deduction is the use of a generic 'ignore' variable name for the caught exception, which is acceptable but could be slightly more descriptive.
Run 3
The code is highly readable. It has a clear, flat structure with minimal nesting. The intent is obvious: safely release a reader resource. The method is concise and each action is on its own line, aiding comprehension. The guard clause (`if (reader == null) return;`) is a clean pattern that avoids deeper nesting. The only minor drawback is the empty catch block, which silently swallows an IOException; a brief comment explaining why this is acceptable would improve clarity.
Run 1
Code Structure: logically organized into a null guard followed by resource cleanup. Nesting: shallow, with an early return avoiding an extra conditional level. Clarity of intent: release() and reader.close() clearly convey cleanup; naming the exception ignore signals intentional suppression, though its rationale is undocumented. Code length: concise, with no unnecessary statements. Action granularity: each statement performs one action. Reading flow: natural progression from checking resource availability to closing it. Minor drawbacks are the empty catch block, which obscures error-handling rationale, and slightly distracting spacing.
Run 2
Code Structure: Logically organized into a null guard followed by resource cleanup. Nesting: Shallow, with an early return avoiding unnecessary nesting. Clarity of intent: The release method clearly closes the reader; naming the caught exception 'ignore' signals deliberate suppression, although the reason is undocumented. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one action. Reading flow: Natural progression from checking availability to closing the resource and handling a possible exception. The empty catch block slightly reduces readability because it does not explain why ignoring a close failure is acceptable.
Run 3
Code Structure: A straightforward null check followed by resource cleanup is logically organized. Nesting: The early return keeps nesting shallow. Clarity of intent: release() and reader.close() clearly communicate cleanup, though silently ignoring IOException leaves the error-handling rationale unstated. Code length: Short and appropriately concise. Action granularity: Each statement performs one action. Reading flow: Execution proceeds naturally from checking resource availability to closing it; minor spacing inconsistencies and the empty catch block slightly reduce readability.