Sample
Dorn/cuda/29
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.039 | 0–1; higher is more readable | 71.0Δ 43.5 |
| Scalabrino | 0.581 | 0–1; higher is more readable | 57.0Δ 29.4 |
| Dorn | 0.243 | 0–1; higher is more readable | 19.5Δ 8.1 |
| Mi | 0.813 | 0–1; higher is more readable | 98.1Δ 70.5 |
| LLOC | 7 | Logical lines; fewer is more readable | 67.7Δ 40.1 |
| DeepSeek V4 Pro | 2.67 | 0–20; mean of three runs | 2.1Δ 25.5 |
| GPT-6.1 Sol | 7.67 | 0–20; mean of three runs | 2.4Δ 25.2 |
| BTTF | 0.262 | 0–1; higher is more readable | 11.7Δ 15.9 |
| Human | 2.96 | 1–5; original rating | 27.6 |
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. | 272.047 | −8.978 |
| 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.736 | −7.104 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -3.212 (log-odds).
Score = sigmoid(-3.212) = 0.039.
| Score | 0.581 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.207 | −1.068 |
| 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. | 11 | +0.647 |
| 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. | 74.909 | +0.492 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 10 | −0.391 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.908 | −0.271 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 10 | +0.191 |
Intercept 0.07 + feature contributions = -1.135 (log-odds).
Score = sigmoid(-1.135) = 0.243.
| Score | 0.813 |
|---|
| Score | 7 |
|---|
Run 1
The code is nearly unreadable due to severe structural issues and missing context. The snippet begins with floating bitwise operations (`x |= x >> 2;` etc.) that lack surrounding function declaration, variable type, or purpose, making intent ambiguous. The `KERNEL reduce2` function signature uses non-standard kernel syntax without clear device/host qualifiers, and the code abruptly ends after declaring `extern __shared__ int sdata2[];`, leaving the logic incomplete. There is no logical organization, no comments, and the actions are scattered without a coherent flow. Nesting is minimal but only because the code is truncated. The lack of a complete function body, missing context, and unexplained bit manipulation result in extremely poor clarity and reading flow.
Run 2
The code is highly unreadable. It lacks context: the first block is an incomplete function fragment with no signature, making intent ambiguous. While the bit-shift pattern appears to be a known 'next power of two' trick, it is unexplained. The second function 'reduce2' is missing its return type and opening brace, so structure is broken. Nesting is flat, which is the only positive, but action granularity and reading flow are severely disrupted by missing syntax and unclear separation. Variable names like 'sdata2' and 'g_idata_old' are not descriptive. Overall, the fragment is incomplete, fragmented, and lacks sufficient structure or comments to convey purpose.
Run 3
The code is highly unreadable. It consists of fragmentary, context-less operations and a function signature with unclear parameters and no documentation. The bitwise operations (x |= x >> n) are concise but lack any explanatory context or intent, making their purpose opaque. The function `reduce2` has an ambiguous name and unexplained parameters (`g_idata`, `g_odata`, `g_idata_old`, `n`), and the shared memory declaration adds confusion without surrounding logic. The structure is disjointed—no comments, no logical grouping, and the snippet appears incomplete. Action granularity is acceptable (one operation per line), but reading flow is broken due to missing context. Overall, the code fails to communicate its purpose or structure, scoring very low on clarity, intent, and organization.
Run 1
Code Structure: The excerpt starts inside an unidentified function and ends inside another, obscuring its overall organization. Nesting: The visible code is flat and easy to scan. Clarity of intent: The bitwise operations suggest bit propagation, and reduce2 suggests a reduction kernel, but missing context and terse identifiers leave the exact purpose unclear. Code length: The excerpt is concise, with no evident unnecessary repetition. Action granularity: Most lines contain one operation, although return ++x combines mutation and returning a value. Reading flow: The sequence of shifts is orderly, but the abrupt transition between incomplete functions and inconsistent parameter spacing interrupt readability.
Run 2
Code Structure: The fragment starts inside an unknown function and ends at the beginning of another, making its organization incomplete. Nesting: The visible statements are flat and easy to scan. Clarity of intent: The bitwise operations suggest bit propagation, but x lacks context, and the purpose of reduce2 is not shown; opaque names and no comments limit understanding. Code length: The snippet is concise, with no apparent unnecessary code. Action granularity: Each bitwise update occupies its own line, although return ++x combines mutation and returning a value. Reading flow: The sequential shifts are orderly, but the unmatched opening context, closing brace, and abrupt transition to an unfinished kernel disrupt the overall flow.
Run 3
Code Structure: The fragment starts midway through a function and ends at the beginning of another, leaving its organization incomplete. Nesting: The visible code is flat and easy to scan. Clarity of intent: Bitwise operations suggest bit propagation, but x, reduce2, and sdata2 lack explanatory context; the reduction function's purpose and parameter roles are not fully evident. Code length: The visible operations are concise, with no obvious unnecessary code. Action granularity: Each statement occupies its own line, although return ++x combines mutation and returning a value. Reading flow: Sequential shifts are straightforward, but the abrupt function boundary, missing surrounding code, and inconsistent parameter spacing interrupt comprehension.