Sample
Scalabrio63
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 54.3Δ 19.1 |
| Scalabrino | 0.896 | 0–1; higher is more readable | 93.5Δ 20.1 |
| Dorn | 0.567 | 0–1; higher is more readable | 65.3Δ 8.0 |
| Mi | 0.369 | 0–1; higher is more readable | 64.3Δ 9.0 |
| LLOC | 2 | Logical lines; fewer is more readable | 98.7Δ 25.4 |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs | 61.6Δ 11.8 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 83.7Δ 10.3 |
| BTTF | 0.647 | 0–1; higher is more readable | 82.4Δ 9.0 |
| Human | 4 | 1–5; original rating | 73.4 |
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. | 625 | −20.625 |
| 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.764 | −7.147 |
| Source linesThe number of non-empty source lines. | 14 | +5.6 |
Intercept 8.87 + feature contributions = -13.302 (log-odds).
Score = sigmoid(-13.302) = 0.
| Score | 0.896 |
|---|
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. | 1 | +1.001 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 68 | +0.785 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 12.203 | −0.239 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.122 | −0.239 |
Intercept 0.07 + feature contributions = 0.269 (log-odds).
Score = sigmoid(0.269) = 0.567.
| Score | 0.369 |
|---|
| Score | 2 |
|---|
Run 1
The code is well-structured and easy to follow. It uses a StringBuilder with method chaining, which keeps the code flat and avoids deep nesting. Each append operation is on its own line, making the output format clear and easy to modify. The intent is obvious: to generate a formatted string representation of the object. The method is concise for what it does, and the reading flow is natural—each line follows logically from the previous one. Minor readability improvements could include using a constant for the class name or a helper method, but overall this is clean, maintainable code.
Run 2
The code is functionally clear but suffers from repetitive formatting. Structure is linear and straightforward, but the long method-chain style reduces readability compared to a formatted multi-line approach. Nesting is flat, which is good, and intent is obvious (constructing a debug string for QueryStatistics). However, action granularity is poor: multiple field pairs are chained on single logical lines, making it harder to scan. Reading flow is mechanical, but the dense repetition of `.append(...)` calls obscures the fields being printed. A better approach would be to put each field pair on its own indented line or use a more concise alternative (e.g., string formatting or Lombok). The current version is acceptable for simple toString implementations, but not ideal for longer or more complex objects.
Run 3
The code is highly readable. It uses a StringBuilder with a clear, flat method-chaining structure, avoiding nesting and maintaining a natural left-to-right reading flow. Each field is appended on its own line, demonstrating good action granularity. The intent—to build a string representation of query statistics—is immediately clear. The code is concise, with no redundancy or unnecessary verbosity. Minor deductions: the first append is on the same line as the constructor, slightly disrupting visual consistency, and field labels are hardcoded rather than derived, though this is standard for toString implementations.
Run 1
Code Structure: A single, logically organized builder chain constructs the string. Nesting: No control-flow nesting; the code remains flat. Clarity of intent: The toString method, descriptive field names, and matching labels clearly communicate its purpose. Code length: Concise for explicitly formatting eight statistics, though append calls are repetitive. Action granularity: Most field lines contain two append operations, but each pair represents one coherent label-value action. Reading flow: Consistent indentation and field ordering make the chain easy to follow from the object name through the closing bracket.
Run 2
Code Structure: A single, logically organized builder chain assembles the representation. Nesting: Flat, with no branches or loops. Clarity of intent: The toString method, descriptive field names, and explicit labels make its purpose clear. Code length: Concise for the number of statistics included, although append calls are repetitive. Action granularity: Most field lines contain two append calls, but pairing each label with its value improves comprehension. Reading flow: Consistent indentation and sequential field formatting make the code easy to scan; the closing bracket and final conversion clearly complete the operation.
Run 3
Code Structure: The single fluent chain is logically organized and consistently formatted. Nesting: There is no nested control flow, making the method easy to scan. Clarity of intent: The method clearly formats QueryStatistics fields into a descriptive string, with explicit labels and recognizable names. Code length: It is concise for the number of fields included, though repeated append calls add minor verbosity. Action granularity: Most lines pair two append operations, but each pair represents one coherent label-value unit. Reading flow: Fields appear sequentially, followed naturally by the closing bracket and conversion to a string. Minor drawbacks include the slightly verbose builder syntax and lack of spaces between output fields.