Sample

Dorn/cuda/85

Human rating uses the original dataset scale.

DatasetDorn
Human3.01
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
45.4Δ 15.6
Dorn0.1980–1; higher is more readable
16.7Δ 13.1
Mi0.7390–1; higher is more readable
91.1Δ 61.3
LLOC7Logical lines; fewer is more readable
67.7Δ 37.9
DeepSeek V4 Pro8.330–20; mean of three runs
31.2Δ 1.4
GPT-6.1 Sol11.670–20; mean of three runs
16.9Δ 13.0
BTTF0.2670–1; higher is more readable
12.3Δ 17.5
Human3.011–5; original rating
29.8

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.534.184−17.628
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.198−7.797
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -12.555 (log-odds).
Score = sigmoid(-12.555) = 0.

Feature contributions

FeatureValueContribution
(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.134−2.011
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.134+1.358
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.204−1.037
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.10+0.682
Indentation frequencyHow rapidly indentation changes from line to line.9−0.426
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.985−0.27
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.8+0.237

Intercept 0.07 + feature contributions = -1.396 (log-odds).
Score = sigmoid(-1.396) = 0.198.

Score0.739
Score7
Run 1

The code suffers from poor readability due to minimal context and ambiguous naming. The variable names 'x, y, w, z' and 'query' lack semantic meaning, making intent unclear. Repetitive pointer assignments are dense and could be refactored into a struct or loop. The comment '//increase the pointer' adds little value. The final two function calls are packed onto single lines with many arguments, reducing clarity. No surrounding logic or declarations are provided, making structure and flow impossible to assess fully. Overall, the snippet is hard to follow without external context.

Run 2

The code snippet is moderately readable but has several issues. The structure is linear but repetitive, with four nearly identical assignments that could be combined into a single struct assignment. The nesting is minimal (only one loop visible), which is good. Intent is partially clear — populating a struct with matrix values — but the variable names (p, query, prf) are cryptic and the surrounding context is missing. Code length is acceptable but the repeated pointer-like assignments inflate it unnecessarily. Action granularity is consistent, one assignment per line, but the four separate x/y/w/z assignments would be more natural as a single vectorized or struct copy. Reading flow is interrupted by the jarring jump from loop logic to memory copy operations, suggesting these are separate concerns. The use of raw pointers and magic numbers (32, memcpy sizes) further reduces clarity. Without seeing the full function, the purpose of these operations remains ambiguous.

Run 3

The code shows poor readability due to several issues. It uses cryptic variable names (p, x, y, w, z, j) with no context about their meaning or purpose. The action granularity is inconsistent - multiple pointer dereferences and assignments are packed together without explanation. The pointer increment comment ('//increase the pointer') is redundant and adds noise rather than clarity. The code structure is disorganized with unclear boundaries between operations, and the nesting context is missing entirely. There's no error handling for the CUDA memory operations (pMemcpy2DToArray, pFreeHost), making the intent ambiguous. The magic numbers (32, 0, 0) lack explanation. While each line performs a single assignment, the overall flow is disjointed with no clear logical progression. Variable naming like 'cudaInterQueryPrf' and 'hostQueryPrf' provide some context, but the core operations remain opaque without surrounding documentation.

Run 1

Code Structure: Assignments, pointer advancement, device transfer, and cleanup form a logical sequence, but unmatched closing braces and omitted loop context obscure organization. Nesting: Two closing braces suggest nested loops; the visible operations remain simple, though nesting cannot be fully assessed. Clarity of intent: Field assignments and API names suggest profile construction and transfer, but terse identifiers, the literal 32, and assigning w before z reduce clarity. Code length: Concise, with a redundant pointer-increment comment. Action granularity: Each statement performs one action. Reading flow: Mostly sequential and natural, but the long transfer call and incomplete surrounding context interrupt comprehension.

Run 2

Code Structure: Assignments, pointer advancement, device copying, and cleanup follow a logical sequence, but the fragment omits enclosing loops and their context. Nesting: Two closing braces imply nested blocks, although their depth and purpose cannot be fully assessed. Clarity of intent: Component assignments and host-to-device transfer are recognizable, but abbreviated names, the unexplained constant 32, and the redundant pointer comment limit clarity. Code length: Compact, with little unnecessary code. Action granularity: Each statement performs one main action on its own line. Reading flow: Repeated assignments are easy to scan, but the abrupt closing braces, heavy indentation, and long copy call interrupt the flow.

Run 3

Code Structure: The assignments, pointer increment, transfer, and cleanup form a plausible sequence, but the missing opening context and unmatched closing braces obscure organization. Nesting: Two closing braces suggest nested blocks, though their depth and purpose cannot be assessed from this fragment. Clarity of intent: Field assignments and host-to-device copying are recognizable, but abbreviated names, the unexplained constant 32, and the long positional argument list require interpretation. Code length: The fragment is concise, with little unnecessary code; the pointer-increment comment adds little value. Action granularity: Each statement performs one action, making individual operations easy to distinguish. Reading flow: The repeated assignments flow naturally into pointer advancement and cleanup, but abrupt block endings, heavy indentation, and the long copy call interrupt readability.