Sample
Buse/23
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.006 | 0–1; higher is more readable | 14.1Δ 67.7 |
| Scalabrino | 0.543 | 0–1; higher is more readable | 21.2Δ 60.6 |
| Dorn | 0.299 | 0–1; higher is more readable | 16.2Δ 65.7 |
| Mi | 0.729 | 0–1; higher is more readable | 87.9Δ 6.1 |
| LLOC | 6 | Logical lines; fewer is more readable | 11.6Δ 70.2 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 96.0Δ 14.1 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 62.1Δ 19.7 |
| BTTF | 0.599 | 0–1; higher is more readable | 71.7Δ 10.1 |
| Human | 3.93 | 1–5; original rating | 81.8 |
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. | 298.023 | −9.835 |
| 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.602 | −6.903 |
| Source linesThe number of non-empty source lines. | 7 | +2.8 |
Intercept 8.87 + feature contributions = -5.068 (log-odds).
Score = sigmoid(-5.068) = 0.006.
| Score | 0.543 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 8 | +0.753 |
| 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.137 | −0.389 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 6.741 | −0.316 |
| 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. | 80 | +0.277 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 7 | +0.26 |
Intercept 0.07 + feature contributions = -0.852 (log-odds).
Score = sigmoid(-0.852) = 0.299.
| Score | 0.729 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It has a clear, logical structure with early return for the zero-failure case, keeping nesting flat. The intent is immediately obvious: print a grammatically correct failure summary. The code is concise, using a simple if-else to handle singular vs plural wording. Each line performs a single logical action, making it easy to follow. The reading flow is natural, from checking for failures to printing the appropriate message. The only minor drawback is that the pluralization logic could be extracted for very large counts, but this is negligible for standard use. Overall, it is an excellent example of clean, maintainable code.
Run 2
The code is highly readable. It uses a clean, flat structure with early return to handle the zero-failure case, avoiding unnecessary nesting. The intent is clear: print a summary line based on failure count. The singular/plural handling is straightforward. Length is concise with no redundancy. Each statement performs a single logical action, and the reading flow is natural. Minor deductions: repeated calls to getWriter() and getFailureCount() could be stored in local variables for slight efficiency and cleanliness, and the method name 'printFailures' only implies the summary line, not the early-return behavior.
Run 3
The code is highly readable due to its simple, flat structure and clear intent. It uses early return to avoid unnecessary nesting, and each action is presented on its own line, improving clarity. The conditional logic for singular vs. plural wording is straightforward. Repeated calls to `getWriter()` could be refactored into a local variable, and the method is cut off mid-statement, but the provided fragment is clean and maintainable.
Run 1
Code Structure: Logically organized, with an early return followed by singular/plural output handling. Nesting: Flat and easy to follow. Clarity of intent: The method name and conditions clearly indicate failure reporting. Code length: Concise, though repeated getFailureCount() calls could be replaced with a local variable. Action granularity: Each statement performs one clear action. Reading flow: Natural progression from zero failures to singular or plural reporting. Missing braces around conditional bodies slightly reduce visual clarity, and the snippet lacks the method's closing brace, making it incomplete as shown.
Run 2
Code Structure: Logically organized around an early exit and singular/plural output, although the snippet lacks the method's closing brace. Nesting: Shallow and easy to follow. Clarity of intent: The method name and conditions clearly communicate failure reporting. Code length: Concise, though repeated getFailureCount() calls and duplicated output expressions add minor redundancy. Action granularity: Each statement performs a single action. Reading flow: Natural progression from no failures to one or multiple failures; omitted braces slightly reduce visual clarity and robustness.
Run 3
Code Structure: Logically organized around an early return and singular/plural output, although the snippet lacks a closing method brace. Nesting: Shallow, with straightforward conditionals. Clarity of intent: The method name and messages clearly communicate failure reporting. Code length: Concise, though repeated getFailureCount() calls could be replaced with a local variable. Action granularity: Each line performs one clear action. Reading flow: Natural progression from no failures to one or multiple failures; omitted conditional braces slightly reduce visual clarity.