Sample
Dorn/cuda/86
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 8.4Δ 13.4 |
| Scalabrino | 0.122 | 0–1; higher is more readable | 7.0Δ 14.8 |
| Dorn | 0.088 | 0–1; higher is more readable | 6.7Δ 15.0 |
| Mi | 0.365 | 0–1; higher is more readable | 35.4Δ 13.6 |
| LLOC | 22 | Logical lines; fewer is more readable | 26.7Δ 5.0 |
| DeepSeek V4 Pro | 4.33 | 0–20; mean of three runs | 8.4Δ 13.4 |
| GPT-6.1 Sol | 10.33 | 0–20; mean of three runs | 12.0Δ 9.7 |
| BTTF | 0.07 | 0–1; higher is more readable | 1.4Δ 20.3 |
| Human | 2.8 | 1–5; original rating | 21.7 |
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. | 2244.658 | −74.074 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.276 | −7.914 |
Intercept 8.87 + feature contributions = -61.118 (log-odds).
Score = sigmoid(-61.118) = 0.
| Score | 0.122 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 160.968 | −3.153 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 161 | +1.793 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.196 | −0.966 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 25 | −0.153 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 25 | +0.128 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.932 | +0.009 |
Intercept 0.07 + feature contributions = -2.333 (log-odds).
Score = sigmoid(-2.333) = 0.088.
| Score | 0.365 |
|---|
| Score | 22 |
|---|
Run 1
This code is highly unreadable due to severe structural and clarity issues. The snippet begins mid-function with 8 nearly identical conditional statements using magic numbers (9-15) and cryptic variables (a, aEnd, Csub, AS, BS, ty, tx) with no context or explanation. The action granularity is poor, combining conditions, calculations, and function calls in single lines. The nesting is moderate but the lack of braces around single-line if statements creates ambiguity and maintenance risks. The comment about synchronization explains intent but the synchronization primitive appears without matching opening context. Variable names are extremely cryptic (idnx, wC, hC, c_width, uiWA, uiWB) making intent unclear. The code mixes CUDA-specific concepts, complex mathematical operations, and memory indexing without clear separation or explanatory comments. While the code is concise, conciseness here comes at the expense of clarity rather than helping readability.
Run 2
The code is poorly structured and lacks readability. Repetitive lines with only slight numeric differences suggest unrolled loops without clear rationale, making it unnecessarily long. The use of magic numbers (9–15) is ambiguous and obscures intent. Nesting is minimal, but the logic is unclear due to poorly named variables (e.g., 'a', 'tx', 'ty', 'AS', 'BS') and inconsistent formatting. Action granularity is acceptable (one operation per line), but the repetitive pattern harms reading flow. The code mixes low-level indexing with mathematical operations, making intent hard to grasp. Comments are sparse and do not clarify the algorithm. Overall, it reads like raw, unoptimized CUDA code with minimal abstraction or documentation.
Run 3
The code is difficult to read due to a repetitive chain of near-identical conditional statements that obscure the overall purpose. Each line performs a bounds check, a power operation, and an accumulation, which violates the one-action-per-line principle and inflates the code length. The intent—computing a squared distance submatrix—is buried under boilerplate. The function parameters and macros like AS, BS, and Csub are not self-explanatory. Although the structure shows some logical separation (synchronization, final write), the repeated if-blocks create a tangled, copy-paste feel. The nesting is shallow, which is good, but the long expressions reduce clarity. The final write operation is somewhat clearer but still dense. Overall, the code requires significant mental effort to follow and would benefit from loop abstraction and better naming.
Run 1
Code Structure: Computation, synchronization, output, and launch setup are logically separated, but the incomplete excerpt obscures the enclosing structure. Nesting: Visible nesting is shallow, with simple conditional updates. Clarity of intent: Comments explain synchronization and output, while terse names such as Csub, tx, and uiWC and dense indexing expressions require domain knowledge. Code length: Repeated conditional accumulation statements are verbose; a loop could improve readability, although explicit unrolling may serve performance goals. Action granularity: Each line performs one main update, but inline conditions and arithmetic compress several operations together. Reading flow: The repeated pattern is easy to scan, yet inconsistent spacing, indentation, long expressions, and the abrupt transition into an unfinished function disrupt the flow.
Run 2
Code Structure: Synchronization, output writing, and launch-size calculations form recognizable sections, but the excerpt starts and ends mid-function. Nesting: Visible control flow is shallow and easy to follow. Clarity of intent: Comments explain synchronization and output, while terse identifiers, opaque AS/BS accessors, and dense indexing obscure the mathematics. Code length: Seven nearly identical conditional accumulations are repetitive; a loop could express the pattern more concisely, though unrolling may be intentional. Action granularity: Most lines perform one main action, but inline conditionals combine checks and updates, and the output assignment contains several operations. Reading flow: Sequential calculations and section comments help, but inconsistent spacing, indentation, missing conditional braces, and a long function signature interrupt readability.
Run 3
Code Structure: Computation, synchronization, output, and launch setup are separated, but the fragment starts and ends mid-function, limiting structural understanding. Nesting: Mostly flat, with simple conditional updates and one output guard. Clarity of intent: Comments explain synchronization and output, but abbreviated names, unexplained indexing, and hard-coded offsets obscure details. Code length: Seven nearly identical updates are repetitive; a loop could be more concise, though unrolling may be intentional for performance. Action granularity: Each update performs one main action, but placing conditions and assignments on the same line compresses distinct steps. Reading flow: Repeated expressions are easy to scan, yet inconsistent spacing, indentation, dense arithmetic, and a long function signature interrupt the flow.