Sample
Buse/3
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.004 | 0–1; higher is more readable | 13.1Δ 6.1 |
| Scalabrino | 0.335 | 0–1; higher is more readable | 3.0Δ 16.2 |
| Dorn | 0.181 | 0–1; higher is more readable | 9.1Δ 10.1 |
| Mi | 0.062 | 0–1; higher is more readable | 5.1Δ 14.1 |
| LLOC | 6 | Logical lines; fewer is more readable | 11.6Δ 7.6 |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs | 31.3Δ 12.1 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 32.8Δ 13.6 |
| BTTF | 0.442 | 0–1; higher is more readable | 34.3Δ 15.2 |
| Human | 2.69 | 1–5; original rating | 19.2 |
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. | 282.026 | −9.307 |
| 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.931 | −7.397 |
| Source linesThe number of non-empty source lines. | 6 | +2.4 |
Intercept 8.87 + feature contributions = -5.434 (log-odds).
Score = sigmoid(-5.434) = 0.004.
| Score | 0.335 |
|---|
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. | 7 | +0.788 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 101 | −0.613 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 5.735 | −0.33 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 6 | +0.283 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.118 | −0.201 |
Intercept 0.07 + feature contributions = -1.509 (log-odds).
Score = sigmoid(-1.509) = 0.181.
| Score | 0.062 |
|---|
| Score | 6 |
|---|
Run 1
The code is moderately readable. The method name and operations suggest a clear intent, but the implementation has several readability issues. The logic for substring extraction is ambiguous and includes unexplained magic numbers (source.length() - fSuffix + 1), making it hard to follow. The code uses multiple actions per line, reducing clarity. While the conditional appends are simple, the overall structure lacks clear separation of concerns and relies on class-level fields (fPrefix, fSuffix) without context. The missing closing brace also interrupts the reading flow.
Run 2
The code is moderately readable but has several issues. The method name 'compactString' and variable names 'fPrefix' and 'fSuffix' are somewhat ambiguous without context. The logic is straightforward, but the string concatenation is cluttered and hard to parse. Action granularity is decent, with each operation on its own line, but the first line combines multiple operations. Nesting is minimal, which is good, but the lack of spaces around operators and inconsistent formatting reduce clarity. The code length is concise, but the overall structure and intent could be clearer with better naming and formatting.
Run 3
The code is moderately readable. It has a clear, single purpose: to compact a string by wrapping a substring with delimiters and optionally adding common prefix/suffix. Structure is logical and sequential with no nesting, which aids reading flow. However, clarity suffers due to ambiguous variable names like fPrefix, fSuffix, and source, as well as 'magic' expressions like source.length() - fSuffix + 1. The code is concise, and each line performs one action, but the long line with the substring calculation reduces readability. Overall, the logic is straightforward but could be improved with better naming and minor refactoring.
Run 1
Code Structure: The snippet has a simple, logical sequence, but the missing return statement and closing brace leave the method incomplete. Nesting: Two flat conditionals keep nesting minimal, although omitted braces weaken visual boundaries. Clarity of intent: The method and helper names suggest compacting a string with shared prefix and suffix context, but field names and the substring endpoint calculation require interpretation. Code length: Concise, with no obvious redundancy. Action granularity: Each statement performs one main action, though the initial assignment combines substring extraction and concatenation. Reading flow: Construction followed by optional prefix and suffix additions is natural; inconsistent assignment spacing and the abrupt ending reduce readability.
Run 2
Code Structure: Logically organized into initial string construction followed by optional prefix and suffix additions, but the snippet lacks a return statement and closing brace. Nesting: Flat, with only two simple conditionals. Clarity of intent: Names suggest compacting a string around a delta, though the substring boundary arithmetic and field meanings are not immediately obvious. Code length: Concise without unnecessary repetition. Action granularity: Each statement performs one main action, although the initial expression combines slicing and concatenation. Reading flow: Natural top-to-bottom progression; inconsistent assignment spacing and omitted conditional braces slightly reduce readability.
Run 3
Code Structure: Logically builds a marked substring, then adds the common prefix and suffix, though the snippet lacks a return statement and closing brace. Nesting: Two flat conditionals keep complexity low. Clarity of intent: Method and helper names communicate string compaction, but DELTA markers and substring boundary arithmetic require context. Code length: Concise, with no unnecessary steps. Action granularity: Each statement performs one main action, although the initial assignment combines slicing and concatenation. Reading flow: The sequence is natural and easy to follow; inconsistent assignment spacing and omitted conditional braces slightly reduce readability.