Sample
Buse/79
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.042 | 0–1; higher is more readable | 30.3Δ 17.7 |
| Dorn | 0.376 | 0–1; higher is more readable | 22.2Δ 25.8 |
| Mi | 0.298 | 0–1; higher is more readable | 16.2Δ 31.8 |
| LLOC | 6 | Logical lines; fewer is more readable | 11.6Δ 36.4 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 92.4Δ 44.4 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 84.8Δ 36.9 |
| BTTF | 0.39 | 0–1; higher is more readable | 19.2Δ 28.8 |
| Human | 3.35 | 1–5; original rating | 48.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) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 333.669 | −11.011 |
| 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.594 | −5.391 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
Intercept 8.87 + feature contributions = -3.132 (log-odds).
Score = sigmoid(-3.132) = 0.042.
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. | 12 | +0.611 |
| 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. | 73.833 | +0.538 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.145 | −0.471 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 11 | −0.357 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 10.667 | −0.261 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 11 | +0.168 |
Intercept 0.07 + feature contributions = -0.505 (log-odds).
Score = sigmoid(-0.505) = 0.376.
| Score | 0.298 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It uses a clear, single-purpose loop to compare columns with early exit when a difference is found. The structure is flat, with minimal nesting (just one `if` inside a `for`). Intent is obvious: return the first non-zero comparison result, or 0 if all columns match. The action granularity is good, with each line performing a logical step. The only minor issue is the slightly awkward variable names (`i`, `j`, `a`, `b`, `cols`, `coltypes`), which could be more descriptive, but the context makes their meaning fairly clear.
Run 2
The code is concise and well-structured. It uses a simple for-loop to compare columns one by one. Nesting is minimal (one loop and one conditional), preserving flatness. Intent is clear: iterate through columns, compare values, return the first non-zero comparison result, or return 0 if all are equal. Action granularity is mostly one action per line, except the multi-line method call in the loop header, which is acceptable for readability. Reading flow is natural and follows a common pattern. Minor improvements could include extracting the comparison into a named variable for even clearer intent, but overall the code is highly readable.
Run 3
The code is highly readable. It is logically structured as a loop comparing array elements and returning on the first difference. Nesting is minimal, with only one level of indentation inside the loop. The intent is clear: compare fields sequentially and return the first non-zero comparison. Code length is concise, with no unnecessary lines. Action granularity is good, with the comparison, condition check, and return on separate lines, aiding comprehension. The reading flow is natural, progressing from loop initialization to comparison and early exit. Minor deductions are due to slightly cryptic variable names (e.g., 'i', 'j', 'a', 'b', 'cols', 'coltypes') and the compound method call on line 2, which could be split for even greater clarity.
Run 1
Code Structure: Logically organized as sequential field comparisons with an early return for the first difference. Nesting: Shallow, with only one conditional inside a loop. Clarity of intent: Clearly implements lexicographic comparison, though names such as i, j, a, and b provide limited context. Code length: Concise with no unnecessary statements. Action granularity: Each statement performs one primary action; the comparison arguments are reasonably split across lines. Reading flow: Natural progression from iteration to comparison, early exit, and equality return. More descriptive variable names would improve readability.
Run 2
Code Structure: logically organized as a column-by-column comparison with an early return for the first difference. Nesting: shallow, with only an if statement inside a loop. Clarity of intent: comparison behavior is clear, though generic names such as i, j, a, and b and the repeated cols[j] indexing slightly reduce clarity. Code length: concise, with no unnecessary statements. Action granularity: each statement performs one main action; the multiline comparison call remains readable. Reading flow: natural progression from iteration to comparison, early exit, and a final zero return when all compared fields match.
Run 3
Code Structure: The loop, comparison, early return, and final equality result are logically organized. Nesting: Only a loop and a simple conditional keep nesting shallow. Clarity of intent: Sequential column comparison is apparent, though names such as a, b, i, and j provide little context. Code length: The snippet is concise without unnecessary logic. Action granularity: Comparison and conditional return are clearly separated, with conventional loop control grouped in the header. Reading flow: Consistent indentation and whitespace make the progression natural; repeated cols[j] indexing adds minor visual complexity.