Sample

Dorn/cuda/1

Human rating uses the original dataset scale.

DatasetDorn
Human2.46
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0040–1; higher is more readable
65.2Δ 54.0
Scalabrino0.190–1; higher is more readable
14.0Δ 2.8
Dorn0.7180–1; higher is more readable
67.4Δ 56.3
Mi0.6390–1; higher is more readable
69.6Δ 58.5
LLOC4Logical lines; fewer is more readable
82.7Δ 71.6
DeepSeek V4 Pro10.330–20; mean of three runs
42.9Δ 31.8
GPT-6.1 Sol15.670–20; mean of three runs
61.6Δ 50.4
BTTF0.380–1; higher is more readable
21.4Δ 10.3
Human2.461–5; original rating
11.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.348.389−11.497
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.4.622−6.933
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -5.56 (log-odds).
Score = sigmoid(-5.56) = 0.004.

Score0.19

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.84+0.551
Indentation frequencyHow rapidly indentation changes from line to line.10−0.391
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.882−0.272
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.10+0.191
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.84+0.107
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.094+0.031

Intercept 0.07 + feature contributions = 0.935 (log-odds).
Score = sigmoid(0.935) = 0.718.

Score0.639
Score4
Run 1

The code demonstrates some good practices like consistent indentation, clear naming prefixes (c_ for constant memory), and separation of CUDA operations. However, several issues reduce readability: the function name is cryptic ('reg_affine_positionField_gpu' tells the domain but not the action), the void return with pointer parameters obscures intent, and memory operations are interleaved with data preparation. The struct initialization is concise but mixes multiple fields. The function lacks comments explaining what it does or why these specific memory transfers are needed. The parameter list uses raw pointers without context about ownership or expected state. The formatting of the function signature with extensive whitespace is inconsistent with surrounding code style. While the CUDA error checking macro is a good practice, the function does too many unrelated things (preparing image size AND voxel count) without clear organizational structure beyond sequencing.

Run 2

The code is reasonably readable with a clear function name and straightforward parameter naming. The structure is logical: it initializes an int3 from image dimensions and copies data to CUDA symbols. There is minimal nesting and each action is on its own line, contributing to good flow. However, the code relies on global state via cudaMemcpyToSymbol without visible declarations, which slightly obscures intent. The unusual spacing and alignment in the function signature, while consistent, may reduce readability for some developers. The redundant comment block adds noise without value. Overall, the snippet is concise and understandable but lacks context about the CUDA symbols being set, which would improve clarity.

Run 3

The code is largely unreadable due to severe lack of context and incomplete snippet. It uses cryptic variable names and relies on CUDA macros without explanation. The function signature and operation are clear only to domain experts. The structure is linear but opaque, with no comments explaining why CUDA symbols are being set. Nesting is minimal, but clarity of intent is very low—'reg_affine_positionField_gpu' sounds like a registration kernel setup, but the snippet only shows memory copy operations. Code length is concise but overly terse, and action granularity is reasonable (one action per line). However, reading flow is disrupted by lack of whitespace, comments, and context. The pointer-to-pointer parameter 'float4 **array_d' and global symbol names (c_ImageSize, c_VoxelNumber) are not self-documenting. Overall, it is barely readable without substantial surrounding code and domain knowledge.

Run 1

Code Structure: The function has a straightforward organization, though the missing closing brace makes the snippet incomplete. Nesting: There is no nested control flow, so it is easy to scan. Clarity of intent: The function name suggests affine position-field processing, and the statements clearly initialize image dimensions and copy metadata to GPU constants; however, the shown code does not explain how the affine matrix or output array is used. Code length: The implementation is concise, but the two decorative comment lines add unnecessary clutter. Action granularity: Each statement occupies its own line and performs a focused operation. Reading flow: Initialization followed by GPU metadata transfers is natural, although uneven parameter alignment and tightly packed arguments slightly reduce readability.

Run 2

Code Structure: The short function fragment is logically organized, preparing image dimensions before copying metadata to GPU constants. Nesting: There is no nested control flow. Clarity of intent: CUDA calls and image-related names convey the local operations, but the function's broader purpose is not demonstrated; affineMatrix and array_d are unused in the shown fragment. Code length: The implementation is concise, though repeated decorative comments add clutter. Action granularity: Each statement performs one main action, with dimension construction grouped naturally. Reading flow: Statements follow a straightforward sequence, but uneven parameter indentation and missing spaces around arguments reduce visual consistency. The incomplete function prevents assessment of its full organization.

Run 3

Code Structure: The visible function fragment is logically organized, initializing image dimensions before copying metadata to GPU constants. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: CUDA calls and variable names convey GPU metadata setup, though abbreviated names and unused parameters in the fragment leave the broader purpose unclear. Code length: The fragment is concise, but duplicated decorative comments add visual noise. Action granularity: Each statement performs one main action; constructing the dimensions within initialization remains straightforward. Reading flow: Execution proceeds naturally from preparation to transfer, although uneven parameter alignment and missing spaces after commas reduce polish. The incomplete function limits assessment of overall readability.