Sample
Buse/34
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.927 | 0–1; higher is more readable | 89.9Δ 10.1 |
| Scalabrino | 0.812 | 0–1; higher is more readable | 62.1Δ 37.9 |
| Dorn | 0.829 | 0–1; higher is more readable | 89.9Δ 10.1 |
| Mi | 0.564 | 0–1; higher is more readable | 47.5Δ 52.5 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 11.1 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 87.4Δ 12.6 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 96.0Δ 4.0 |
| BTTF | 0.632 | 0–1; higher is more readable | 81.8Δ 18.2 |
| Human | 4.35 | 1–5; original rating | 100.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) |
|---|---|---|
| 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.779 | −5.668 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 128.927 | −4.255 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = 2.548 (log-odds).
Score = sigmoid(2.548) = 0.927.
| Score | 0.812 |
|---|
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. | 49.9 | +1.552 |
| 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. | 7 | −0.495 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.056 | +0.4 |
| 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. | 8.176 | −0.296 |
Intercept 0.07 + feature contributions = 1.578 (log-odds).
Score = sigmoid(1.578) = 0.829.
| Score | 0.564 |
|---|
| Score | 3 |
|---|
Run 1
The code is highly readable. It uses a clean switch-case structure where each case is a single, clearly named action. The return statements are immediate, avoiding unnecessary nesting or temporary variables. Each case maps directly to a corresponding execute method, making the intent unambiguous and the flow natural. The indentation and blank lines between cases improve visual separation. Minor deductions only because the surrounding switch statement and the CompiledStatement type are not shown, but within the given snippet, it is concise, flat, and well-organized.
Run 2
The code is a simple switch-case block with clear intent and structure. Each case returns the result of a method call, maintaining flat nesting and one action per line. Variable names are concise but understandable. However, the snippet is incomplete without the enclosing switch statement, which slightly reduces context clarity. Overall, it is readable but lacks surrounding structure for full evaluation.
Run 3
The code is highly readable. It uses a flat switch/case structure with one action per line, making logical organization clear. Each case immediately returns the result of a well-named method, so intent is unambiguous. The consistent indentation and alignment of cases improve reading flow. The snippet is concise and avoids unnecessary nesting or extra lines. Minor deductions only because the snippet lacks surrounding context (e.g., no default case shown), but within the given scope it is nearly ideal.
Run 1
Code Structure: Consistent case-to-handler organization makes the dispatch logic easy to follow. Nesting: Flat within the shown switch fragment, with no unnecessary nesting. Clarity of intent: Descriptive constants and handler names clearly indicate which statement type is executed, though 'cs' is abbreviated. Code length: Concise, with no redundant logic. Action granularity: Each return performs a single handler invocation on its own line. Reading flow: Repeated formatting and blank lines provide a natural, easily scanned sequence.
Run 2
Code Structure: logically organized switch cases delegate to dedicated handlers. Nesting: flat, with no unnecessary nested logic. Clarity of intent: statement constants and descriptive method names clearly indicate each operation. Code length: concise, with no redundant statements. Action granularity: each return performs a single dispatch action on its own line. Reading flow: consistent formatting and spacing make the cases easy to scan. The only minor limitation is that the surrounding switch and the meaning of cs are not shown.
Run 3
Code Structure: Each case is logically organized and delegates to a dedicated execution method. Nesting: The snippet is flat, with no unnecessary nested logic. Clarity of intent: Statement constants and method names clearly communicate the dispatch behavior, although cs is abbreviated. Code length: The code is concise, with no redundant operations. Action granularity: Each return statement performs one clear delegation on its own line. Reading flow: Consistent formatting and blank lines make the cases easy to scan. The enclosing switch is not shown, limiting context slightly.