Sample
Scalabrio64
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 55.3Δ 10.8 |
| Scalabrino | 0.87 | 0–1; higher is more readable | 91.5Δ 25.4 |
| Dorn | 0.744 | 0–1; higher is more readable | 84.9Δ 18.8 |
| Mi | 0.446 | 0–1; higher is more readable | 73.4Δ 7.3 |
| LLOC | 6 | Logical lines; fewer is more readable | 86.9Δ 20.9 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 77.4Δ 11.3 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 83.7Δ 17.6 |
| BTTF | 0.563 | 0–1; higher is more readable | 62.3Δ 3.8 |
| Human | 3.89 | 1–5; original rating | 66.1 |
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. | 620.67 | −20.482 |
| 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.942 | −7.413 |
| Source linesThe number of non-empty source lines. | 15 | +6 |
Intercept 8.87 + feature contributions = -13.025 (log-odds).
Score = sigmoid(-13.025) = 0.
| Score | 0.87 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 15 | +0.505 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 78 | +0.454 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 77.867 | +0.367 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.123 | −0.257 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 14 | −0.253 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 13.785 | −0.217 |
Intercept 0.07 + feature contributions = 1.068 (log-odds).
Score = sigmoid(1.068) = 0.744.
| Score | 0.446 |
|---|
| Score | 6 |
|---|
Run 1
The code is well-structured and highly readable. It uses a consistent method-chaining style that keeps each logical field on its own line, making the output format easy to trace. Nesting is minimal, with only one conditional block that is simple and clearly commented. The intent is unambiguous: constructing a readable string representation of cache statistics. The code length is concise but not overly compressed; each appended field is visible. Action granularity is excellent, with one meaningful append per line. Reading flow is natural, moving from basic counts to optional region-specific details, then terminating cleanly. The only minor deduction is that the region-specific block could perhaps be extracted for slightly better structure, but overall readability is strong.
Run 2
The code is moderately readable. Structure is logical, with a clear builder pattern and sequential label-value pairs. Nesting is shallow, with only one explanatory if-block. Intent is obvious: generate a string summary of cache statistics. However, readability is reduced by repetitive `.append(...)` calls and inconsistent indentation after the first line. Action granularity is mostly one append per line, improving scanability, but the long chained lines hurt clarity. The inline comment is helpful, though slightly informal. Reading flow is natural overall, but would benefit from breaking the chain into fewer logical groups or using a helper for key-value pairs.
Run 3
The code is well-structured with a clear, single purpose: constructing a string representation of the object. Method chaining keeps the string-building concise and avoids unnecessary repetition. The nesting depth is minimal—only one conditional block—and indentation is consistent. The comment explains a potential edge case (null region) without being redundant. Action granularity is reasonable: each logical segment of the string is appended on its own line, improving readability. The reading flow follows a natural top-to-bottom progression: initialize builder, append base fields, optionally append region-specific details, close the string, and return. Minor deductions: the method name 'toString' is standard, and the chained calls could be slightly more compact, but overall the code is clear, maintainable, and easy to follow.
Run 1
Code Structure: Logically organized into initialization, optional statistics, and final output. Nesting: Only one shallow conditional, making control flow easy to follow. Clarity of intent: The toString method, descriptive field labels, and StringBuilder clearly communicate its purpose; the speculative null-check comment adds slight uncertainty. Code length: Compact without unnecessary repetition. Action granularity: Chained append calls perform several operations per line, but related label/value pairs remain understandable. Reading flow: Natural top-to-bottom progression with consistent formatting, though uneven chain wrapping slightly reduces visual consistency.
Run 2
Code Structure: Logically organized into builder initialization, optional region statistics, and final output. Nesting: Only one shallow conditional, making control flow easy to follow. Clarity of intent: The method clearly formats cache statistics; descriptive field and method names help, although the speculative null-check comment adds uncertainty. Code length: Concise without unnecessary abstraction or repetition. Action granularity: Chained append calls group related operations effectively, though multiple calls per line slightly reduce scanability. Reading flow: Fields appear in a natural sequence, and consistent formatting makes the method straightforward to read.
Run 3
Code Structure: Logically organized into builder initialization, optional region statistics, and final output. Nesting: Only one shallow conditional, making control flow easy to follow. Clarity of intent: The method name, descriptive field labels, and StringBuilder usage clearly communicate its purpose; the speculative null-check comment is less precise. Code length: Concise, with no substantial redundancy. Action granularity: Chained append calls perform multiple operations per line, but each remains simple and closely related. Reading flow: Output is assembled in a natural sequence, although inconsistent indentation and mixed use of explicit this slightly reduce polish.