Sample

Buse/26

Human rating uses the original dataset scale.

DatasetBuse
Human2.39
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0080–1; higher is more readable
17.2Δ 9.1
Dorn0.3860–1; higher is more readable
23.2Δ 15.2
Mi0.5650–1; higher is more readable
48.5Δ 40.4
LLOC4Logical lines; fewer is more readable
59.6Δ 51.5
DeepSeek V4 Pro10.330–20; mean of three runs
18.2Δ 10.1
GPT-6.1 Sol11.670–20; mean of three runs
8.6Δ 0.5
BTTF0.4470–1; higher is more readable
36.4Δ 28.3
Human2.391–5; original rating
8.1

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.341.432−11.267
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.758−5.637
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = -4.835 (log-odds).
Score = sigmoid(-4.835) = 0.008.

Feature contributions

FeatureValueContribution
(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.9+0.718
Indentation frequencyHow rapidly indentation changes from line to line.8−0.46
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.889+0.451
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.135−0.374
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.597−0.304
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.8+0.237

Intercept 0.07 + feature contributions = -0.466 (log-odds).
Score = sigmoid(-0.466) = 0.386.

Score0.565
Score4
Run 1

The code uses a clear if-else structure to handle two distinct copy scenarios, and the action granularity is acceptable, with one arraycopy per line. However, readability suffers from multiple issues: the complex offset calculations (e.g., `bufsize - (len - bufpos - 1)` and `len - bufpos - 1`) are hard to follow without surrounding context, making intent unclear. Variable names like `bufpos`, `bufsize`, and `ret` are cryptic. The indentation is inconsistent (misaligned continuation lines and `else` block). While the logic is not deeply nested, the mental effort required to trace the index math significantly reduces clarity. The use of a single-line `if` statement with a braced `else` block is stylistically inconsistent. Overall, the code is functional but not easily readable without extra documentation or comments explaining the buffer wrap-around logic.

Run 2

The code is moderately readable but has several issues. The if-else structure is clear, but the arraycopy calls contain complex offset calculations that lack explanatory context. The second arraycopy spans multiple lines with awkward indentation, disrupting reading flow. Action granularity is reasonable with one operation per statement, but the expressions themselves are dense. The variable names (bufpos, bufsize, len) are abbreviated but conventional for buffer operations. The main problems are the opaque index arithmetic and inconsistent formatting - the if branch is compact while the else branch is verbose. Without comments or clearer variable naming for the offset calculations, the intent remains ambiguous. The nesting is flat which is good, but the overall clarity suffers from the mathematical complexity embedded in the copy operations.

Run 3

The code demonstrates poor readability. There is inconsistent indentation with the first if block misaligned, and unclear variable names like 'bufpos', 'bufsize', and 'ret' that don't convey their purpose. The logic itself is complex and not self-documenting, making it hard for a new developer to understand the array copying operations. The second arraycopy call contains a long line with poorly formatted parameters. The code is nested only one level deep, which is good, but the structure lacks clarity. Action granularity is acceptable with one operation per line, but the overall reading flow is disorganized due to formatting inconsistencies and unclear variable names. The purpose of the conditional branching and array manipulation would benefit greatly from comments or clearer variable naming.

Run 1

Code Structure: A simple if/else logically separates contiguous and wrapped copying, but the snippet lacks a closing brace. Nesting: Only one conditional level, making control flow easy to follow. Clarity of intent: System.arraycopy suggests buffer extraction, but abbreviated names and unexplained index arithmetic obscure the circular-buffer logic. Code length: Concise, although repeated arithmetic could be extracted into named variables. Action granularity: Each statement performs one copy operation. Reading flow: Uneven indentation, awkward line wrapping, and inconsistent brace usage disrupt an otherwise straightforward sequence.

Run 2

Code Structure: A straightforward if/else separates contiguous copying from wraparound copying, but the snippet lacks a closing brace. Nesting: Shallow, with only one conditional level. Clarity of intent: System.arraycopy makes the copying operation clear, but abbreviated variable names and repeated offset calculations obscure the buffer logic. Code length: Concise, although naming intermediate offsets would improve comprehension. Action granularity: Each statement performs one copy operation; the wrapped case appropriately uses two statements. Reading flow: The branch order is natural, but inconsistent brace usage, excessive continuation indentation, and dense arithmetic interrupt reading.

Run 3

Code Structure: A straightforward if/else separates contiguous copying from wraparound copying, but the missing closing brace makes the snippet incomplete. Nesting: Shallow nesting keeps control flow easy to follow. Clarity of intent: System.arraycopy signals copying, but terse variable names and unexplained offset arithmetic obscure the buffer logic. Code length: Concise overall, though repeated arithmetic could be replaced with a descriptive intermediate variable. Action granularity: Each statement performs one copy operation; the wrapped call is still a single action. Reading flow: The branches follow a logical sequence, but inconsistent brace placement and awkward continuation indentation interrupt scanning.