Sample

Dorn/cuda/18

Human rating uses the original dataset scale.

DatasetDorn
Human3.07
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
35.4Δ 1.9
Scalabrino0.6590–1; higher is more readable
69.2Δ 35.8
Dorn0.160–1; higher is more readable
11.7Δ 21.7
Mi0.460–1; higher is more readable
47.6Δ 14.2
LLOC22Logical lines; fewer is more readable
26.7Δ 6.7
DeepSeek V4 Pro6.330–20; mean of three runs
18.1Δ 15.3
GPT-6.1 Sol120–20; mean of three runs
19.9Δ 13.5
BTTF0.3470–1; higher is more readable
19.5Δ 13.9
Human3.071–5; original rating
33.4

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.994.025−32.803
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.225−7.838

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

Score0.659

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.107.968−0.908
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Indentation frequencyHow rapidly indentation changes from line to line.30+0.301
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.124−0.263
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.29−0.245
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.24+0.187
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.807+0.007

Intercept 0.07 + feature contributions = -1.656 (log-odds).
Score = sigmoid(-1.656) = 0.16.

Score0.46
Score22
Run 1

The code shows poor readability due to several issues. The structure is tangled with unclear variable names like 'lg' and 'lgn' that lack semantic meaning. The synchronization points (__syncthreads) break the logical flow and are scattered throughout. The for loop with bit shifting operations for summation is particularly confusing - the loop condition and update logic are non-intuitive. Multiple actions are packed into single lines, violating action granularity. The conditional NEURON == 0 logic adds complexity without explanation. Magic numbers and bitwise operations require domain knowledge to understand. The code is dense with CUDA-specific operations but lacks comments explaining the parallel reduction pattern. Variable scope and lifetime are unclear across synchronization barriers. The reading flow is disrupted by the scattered synchronization and the abrupt ending with an incomplete conditional block.

Run 2

The code is difficult to read due to poor structure, unclear variable naming, and ambiguous intent. It mixes memory indexing, thread synchronization, and reduction logic without meaningful separation. Deeply nested or conditionally guarded operations (e.g., output neuron checks) obscure the overall flow. Variable names like 'lg', 'lgNextLayer', 'connection', and 'threadId' provide little semantic context. The reduction loop uses bitwise operations and conditional increments that are hard to follow without comments. Multiple operations per line (e.g., pointer arithmetic, index calculations) reduce clarity. Synchronization calls are scattered, making the parallel execution model hard to grasp. Overall, the code lacks readability despite being relatively concise.

Run 3

The code is difficult to follow due to unclear variable names, inconsistent indentation, and a lack of comments explaining the algorithm's purpose. It mixes thread indexing, memory offsets, and a reduction loop in a way that obscures intent. The loop condition and update logic are non-standard, though the use of __syncthreads() suggests CUDA parallel reduction. Multiple operations occur per line, and the overall structure requires significant effort to parse. While the logic is somewhat linear, the missing context and terse naming make it hard to verify correctness or understand the data flow.

Run 1

Code Structure: Setup, gradient multiplication, and reduction are logically grouped, but the incomplete final block weakens overall organization. Nesting: Mostly shallow, with only a loop and a few conditionals. Clarity of intent: CUDA synchronization and indexing suggest gradient accumulation, but abbreviations such as lg, lgn, and i, unexplained offsets, and bitwise reduction logic require interpretation. Code length: Relatively concise, though the loop repeats its update expression and could be clearer. Action granularity: Most lines perform one action, but inline conditional assignments and increments compress control flow. Reading flow: Execution proceeds naturally from initialization to reduction, but inconsistent spacing, unexplained synchronization requirements, and the abruptly truncated ending interrupt comprehension.

Run 2

Code Structure: Mostly logical phases for loading gradients, multiplying weights, and reducing results, but the snippet ends in an unfinished block. Nesting: Shallow, with a single loop and simple conditionals. Clarity of intent: CUDA synchronization and indexing are recognizable, but abbreviated names such as lg, lgn, and i obscure meaning; the reduction and memory layout lack explanatory comments. Code length: Compact and generally economical, though the loop header repeats a calculation and is harder to scan than a simpler formulation. Action granularity: Most lines perform one action, but inline conditionals combine control flow and updates. Reading flow: Execution proceeds naturally, with whitespace separating stages, but inconsistent spacing, dense index arithmetic, and the abrupt ending reduce readability.

Run 3

Code Structure: Organized into gradient loading, weighted contributions, and reduction, but the unfinished final block limits coherence. Nesting: Shallow, with a single loop and simple conditional blocks. Clarity of intent: CUDA synchronization and indexing suggest parallel gradient reduction, but abbreviated names such as lg, lgn, and i, unexplained offsets, and bitwise operations require domain knowledge. Code length: Fairly concise, although the reduction loop is harder to interpret than its length suggests. Action granularity: Mostly one operation per line; inline conditionals compress conditions and assignments. Reading flow: Sequential execution and whitespace provide reasonable flow, but inconsistent formatting, absent explanatory comments, and the abruptly truncated ending impede readability.