Sample
Dorn/cuda/49
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.013 | 0–1; higher is more readable | 68.8Δ 27.0 |
| Dorn | 0.569 | 0–1; higher is more readable | 49.9Δ 8.1 |
| Mi | 0.154 | 0–1; higher is more readable | 15.9Δ 25.9 |
| LLOC | 5 | Logical lines; fewer is more readable | 78.0Δ 36.2 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 53.6Δ 11.8 |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs | 58.6Δ 16.9 |
| BTTF | 0.46 | 0–1; higher is more readable | 35.4Δ 6.4 |
| Human | 3.21 | 1–5; original rating | 41.8 |
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. | 291.427 | −9.617 |
| 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.036 | −7.554 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -4.301 (log-odds).
Score = sigmoid(-4.301) = 0.013.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 106 | +0.906 |
| 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. | 106 | −0.825 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 10 | +0.682 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.822 | −0.273 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 7 | +0.26 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.158 |
Intercept 0.07 + feature contributions = 0.277 (log-odds).
Score = sigmoid(0.277) = 0.569.
| Score | 0.154 |
|---|
| Score | 5 |
|---|
Run 1
The code is poorly readable for several reasons. The structure is fragmented, opening with a stray closing brace and lacking surrounding context, making it hard to understand where it belongs. Nesting is not an issue here, but the action granularity is mixed: some lines perform multiple operations (e.g., allocation and assignment, or memcpy and host free on separate but visually disconnected lines). Clarity of intent is low due to inconsistent naming conventions (camelCase vs. mixed), unexplained parameters, and magic values like 'pChannelFormatKindUnsignedChar4'. Code length is acceptable but not concise given the lack of explanatory comments for complex operations. Reading flow is disorganized, as the sequence jumps between comments and operations without clear grouping, and the stray brace at the start disrupts any natural progression. Overall, the snippet requires significant effort to interpret correctly.
Run 2
The code has a reasonable structure with logical comments separating major steps (matrix parameters, channel format, sequence copy), and follows a mostly flat nesting pattern. Each line generally performs a single action, improving granularity. However, readability is hindered by several issues: the method calls are long and contain multiple chained operations (e.g., `cudasw->swMemcpyParameters(matrix, gapOpen, gapExtend)`), and variable naming is inconsistent and cryptic (`cudasw`, `pMemcpyToArray`, `pFreeHost`). The opening brace without context suggests the snippet is part of a larger block, reducing standalone clarity. Comments help intent but don't fully compensate for the dense, pointer-heavy syntax. Overall, the code is understandable for a domain expert but less approachable for a general reader.
Run 3
The code demonstrates reasonable structure and clarity with clear comments explaining each major operation. Nesting is flat, and intent is relatively clear for GPU/CUDA operations. However, readability suffers from several issues: inconsistent naming conventions (camelCase and mixed abbreviations like 'sw' and 'cuda'), overly verbose variable names (pChannelFormatKindUnsignedChar4), and a very long function call that combines multiple arguments. The leading closing brace suggests fragmented code. Action granularity is mostly one operation per line, but the memcpy line is dense. Reading flow is logical but could benefit from better spacing and more descriptive comments explaining 'why' rather than just 'what'.
Run 1
Code Structure: Operations are logically grouped into parameter setup, descriptor creation, and sequence transfer, though the leading closing brace lacks context. Nesting: The visible operations are flat and easy to scan. Clarity of intent: Comments explain each stage, and most function names communicate purpose, but abbreviated identifiers and unexplained types reduce accessibility. Code length: The snippet is concise without obvious redundancy. Action granularity: Each statement performs one main action, making execution steps distinct. Reading flow: Setup, allocation, copying, and cleanup follow a natural sequence. Inconsistent spacing, a comment typo, and the long memory-copy statement slightly weaken readability.
Run 2
Code Structure: GPU setup and sequence transfer are logically grouped, although the leading unmatched brace makes the snippet appear incomplete. Nesting: The visible operations are flat and easy to follow. Clarity of intent: Comments explain parameter transfer, descriptor creation, and database upload; specialized API names and undefined variables require external context. Code length: Concise, with no obvious unnecessary statements. Action granularity: Each statement performs one main operation, though allocation and member assignment share a line naturally. Reading flow: The progression from setup to allocation, copying, and host-memory release is coherent. Inconsistent spacing, a comment typo, and the incomplete opening slightly reduce readability.
Run 3
Code Structure: GPU setup and data transfer follow a logical sequence, although the leading closing brace lacks context. Nesting: The visible operations are flat and easy to scan. Clarity of intent: Comments explain parameter transfer, descriptor creation, and sequence copying; CUDA-oriented names help, but generic identifiers such as array, width, and height require surrounding context. Code length: The snippet is concise with no obvious redundancy. Action granularity: Each statement performs one primary operation. Reading flow: Blank lines separate related steps naturally, but inconsistent spacing, a comment typo, and the long memory-copy call slightly reduce polish and readability.