Sample
Scalabrio116
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 70.9Δ 25.4 |
| Scalabrino | 0.73 | 0–1; higher is more readable | 75.9Δ 30.4 |
| Dorn | 0.814 | 0–1; higher is more readable | 93.0Δ 47.5 |
| Mi | 0.38 | 0–1; higher is more readable | 64.8Δ 19.3 |
| LLOC | 10 | Logical lines; fewer is more readable | 68.6Δ 23.1 |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs | 36.4Δ 9.0 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 19.6Δ 25.9 |
| BTTF | 0.456 | 0–1; higher is more readable | 25.6Δ 19.8 |
| 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. | 570.823 | −18.837 |
| Source linesThe number of non-empty source lines. | 20 | +8 |
| 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.404 | −6.606 |
Intercept 8.87 + feature contributions = -8.574 (log-odds).
Score = sigmoid(-8.574) = 0.
| Score | 0.73 |
|---|
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. | 75.95 | +0.448 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76 | +0.422 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 20 | +0.328 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 16 | −0.184 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 18.831 | −0.147 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.082 | +0.141 |
Intercept 0.07 + feature contributions = 1.477 (log-odds).
Score = sigmoid(1.477) = 0.814.
| Score | 0.38 |
|---|
| Score | 10 |
|---|
Run 1
The code is moderately readable but has issues. The structure is logical overall (peek state, create classifier, branch on null), but the opening brace placement and inconsistent indentation (spaces vs tabs) disrupt visual flow. Nesting is shallow, which is good. Clarity of intent is mixed: 'ffCodePiece' and 'GeneratorJava.getInstance()' are somewhat cryptic, while the comments help but reference model concepts ('not in model') without context. The code is concise with no unnecessary length. Action granularity is mostly one action per line, though the comment on line 3 and the combined call on line 11 are minor exceptions. Reading flow is disjointed due to the stray comment on line 3, the empty line before the if block, and the typographical inconsistency ('sbText'). Overall, it's functional but could be improved with consistent indentation, clearer method names, and removal of dead comments.
Run 2
The code has a clear high-level purpose but suffers from readability issues. The structure is somewhat logical (stack handling, conditional generation) but the mixed indentation styles (spaces vs tabs) and inconsistent spacing disrupt visual flow. Nesting is shallow, which is good. Intent is partially clear, but the commented-out cast and cryptic method name 'ffCodePiece' obscure understanding. Length is acceptable and action granularity is mostly fine, though a few lines combine multiple operations. Reading flow is hindered by inconsistent formatting and unclear naming. Overall it is maintainable but could be significantly improved with consistent indentation, better naming, and a comment explaining 'ffCodePiece'.
Run 3
The code is moderately readable. The method has a clear purpose and a simple if-else structure with limited nesting. However, readability is diminished by inconsistent indentation, a commented-out cast, a vague variable name 'ffCodePiece', and an unused 'sbText' variable. The method name 'write' is generic, and the parameter 'parseStateStack' lacks clarity. The action granularity is acceptable but the reading flow is interrupted by the indentation issues and unclear intent. Overall, it is understandable but could be much cleaner with better naming, formatting, and removal of dead code.
Run 1
Code Structure: Logically organized around whether the classifier exists, with clear handling of both branches. Nesting: Shallow overall, with only one nested null check. Clarity of intent: The comments explain whether original code is discarded or preserved, but mInterface, ffCodePiece, the raw Stack, and the commented-out cast obscure details. Code length: Concise, with no substantial unnecessary code. Action granularity: Most statements perform one action per line, although classifier generation uses a chained call. Reading flow: The sequence from retrieving state to generating or preserving code is natural, but inconsistent indentation, spacing, and awkward line breaks interrupt readability.
Run 2
Code Structure: Logically organized around whether a classifier exists, with clear model-generated and original-code paths. Nesting: Shallow, with only one nested null check. Clarity of intent: Comments explain the fallback behavior, but names such as ffCodePiece and mInterface, a raw Stack, and a commented-out cast obscure details. Code length: Compact and largely free of unnecessary statements. Action granularity: Most statements perform one action; the inline ParseState construction is straightforward. Reading flow: The sequence is natural, but inconsistent indentation, spacing, and line wrapping interrupt scanning.
Run 3
Code Structure: Logically organized around whether a classifier exists, with distinct generated-code and original-code paths. Nesting: Shallow overall, with one nested null check that remains easy to follow. Clarity of intent: Comments explain the fallback behavior, but mInterface, sbText, and especially ffCodePiece are not fully descriptive; the commented-out cast adds distraction. Code length: Compact, with no obvious unnecessary logic. Action granularity: Each statement performs a single main action, making execution steps easy to distinguish. Reading flow: The sequence is natural, but inconsistent indentation, mixed whitespace, irregular spacing, and the raw Stack with an explicit cast reduce readability.