Sample

Dorn/cuda/15

Human rating uses the original dataset scale.

DatasetDorn
Human3.06
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
21.4Δ 11.7
Scalabrino0.3690–1; higher is more readable
26.7Δ 6.4
Dorn0.0110–1; higher is more readable
1.4Δ 31.8
Mi0.210–1; higher is more readable
20.9Δ 12.3
LLOC16Logical lines; fewer is more readable
43.7Δ 10.6
DeepSeek V4 Pro90–20; mean of three runs
34.7Δ 1.5
GPT-6.1 Sol10.670–20; mean of three runs
13.2Δ 19.9
BTTF0.2360–1; higher is more readable
8.1Δ 25.1
Human3.061–5; original rating
33.1

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.1275.888−42.104
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.121−7.682

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

Score0.369

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

Intercept 0.07 + feature contributions = -4.539 (log-odds).
Score = sigmoid(-4.539) = 0.011.

Score0.21
Score16
Run 1

The code has several readability issues. The indentation is inconsistent and there's an initial stray closing brace, suggesting incomplete or misaligned code blocks. Variable names like 'a', 'b', 'idnx', 'idny' lack descriptive clarity, making the intent harder to grasp. The loop body contains multiple operations per line, reducing action granularity. While the kernel launch setup is relatively clear, the Euclidean distance computation mixes concerns and lacks comments. The function signature is long but shows some structure. The nesting is minimal, but the overall clarity suffers from poor naming, inconsistent formatting, and missing context. The code reads as disorganized due to fragmented presentation and unclear variable purposes.

Run 2

The code has several readability issues. Variable names like 'a', 'b', 'idnx', 'idny' are not descriptive, making intent unclear. The loop lacks comments explaining the Euclidean distance calculation. The ternary operator for computing wBlocks and hBlocks compresses multiple actions into single lines, reducing clarity. There are also formatting inconsistencies, such as missing braces for the for loop and inconsistent indentation. The code snippet appears to be cut off mid-definition, making it difficult to assess overall structure. Action granularity is mixed: mathematical operations are compact, while the grid/thread sizing mixes concerns. While the general structure suggests a CUDA kernel for distance computation, the lack of contextual names and clear organization makes it challenging to follow quickly.

Run 3

The code has some readable aspects, such as clear variable names (Output, Input, Centers) and a straightforward loop for computing Euclidean distance. However, it suffers from several readability issues. The code structure is fragmented and lacks clear separation of concerns — CUDA kernel launches are mixed with computation logic. The nesting level is moderate but becomes confusing with the variable block size computation. The intent is somewhat ambiguous for the generic 'FindMinKernel' function, which is not implemented, and the function signatures include many parameters without clear grouping. Code length is acceptable, though the block size calculation could be simplified. Action granularity is generally one action per line, which is good, but the reading flow suffers due to ambiguous variable names like 'idnx,' 'idny,' and abrupt shifts between kernel and host code. Overall, the code is maintainable but could benefit from better structure, clearer naming conventions, and more consistent formatting.

Run 1

Code Structure: The distance calculation and CUDA launch wrapper are logically separated, but the excerpt starts inside a function and ends with an incomplete declaration, obscuring overall organization. Nesting: The visible loop is shallow and easy to follow, although unmatched surrounding braces hide context. Clarity of intent: Euclidean distance computation and grid setup are recognizable, but a, b, idnx, and idny are weak names, and sum initialization is not shown. Code length: The implementation is reasonably concise, though long signatures and launch lines reduce readability. Action granularity: Most lines perform one assignment or operation, making individual steps easy to inspect. Reading flow: Calculation progresses naturally into output storage and kernel launch setup, but inconsistent spacing, excessive blank lines, and truncated boundaries interrupt the flow.

Run 2

Code Structure: The distance calculation and kernel-launch wrapper are logically separated, but the fragment starts mid-function, contains unmatched closing braces, and ends with an incomplete declaration. Nesting: The visible loop is shallow and easy to follow, although surrounding nesting is missing. Clarity of intent: Euclidean distance computation and CUDA launch setup are recognizable, but a, b, idnx, and idny are weak names, and sum initialization is not shown. Code length: The implementation is concise, though long signatures and launch statements reduce scanability. Action granularity: Most lines perform one action; block-count expressions combine several operations but remain manageable. Reading flow: Computation followed by launch configuration is natural, but inconsistent spacing, excess blank lines, and abrupt fragment boundaries interrupt comprehension.

Run 3

Code Structure: The distance calculation and kernel-launch wrapper are logically separated, but the excerpt starts mid-function and ends with an incomplete declaration, obscuring overall organization. Nesting: The visible loop is shallow and easy to follow, though unmatched closing braces hide surrounding control flow. Clarity of intent: Euclidean distance computation and launch configuration are recognizable, but names such as a, b, idnx, and idny provide limited context, and sum initialization is not shown. Code length: The implementation is reasonably concise, although long signatures and launch statements reduce scanability. Action granularity: Most lines perform one clear assignment, declaration, or call. Reading flow: The calculation progresses naturally into output storage and launch setup, but inconsistent spacing, dense block-count expressions, and truncated boundaries interrupt readability.