Sample

Dorn/cuda/104

Human rating uses the original dataset scale.

DatasetDorn
Human2.94
Lines29

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
43.5Δ 17.0
Scalabrino0.7260–1; higher is more readable
79.8Δ 53.4
Dorn0.4270–1; higher is more readable
35.4Δ 8.9
Mi0.2650–1; higher is more readable
26.2Δ 0.3
LLOC15Logical lines; fewer is more readable
46.5Δ 20.1
DeepSeek V4 Pro130–20; mean of three runs
59.3Δ 32.9
GPT-6.1 Sol15.330–20; mean of three runs
58.6Δ 32.2
BTTF0.3390–1; higher is more readable
18.7Δ 7.8
Human2.941–5; original rating
26.5

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.811.157−26.768
Source linesThe number of non-empty source lines.29+11.6
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.888−7.331

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

Score0.726

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.123−1.545
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.122.9+1.178
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.25−0.153
Indentation frequencyHow rapidly indentation changes from line to line.25+0.128
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.091+0.061
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.30−0.026
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.28.718−0.008

Intercept 0.07 + feature contributions = -0.295 (log-odds).
Score = sigmoid(-0.295) = 0.427.

Score0.265
Score15
Run 1

The code is relatively readable overall, but it has a few areas for improvement. The structure is logical and the function is focused on a single task. Nesting is minimal, with only one conditional block and one loop, which keeps the control flow simple. The intent is fairly clear despite the domain-specific terminology. However, code length and action granularity could be improved: multiple statements are placed on single lines, and there is commented-out code that should be removed. The loop body mixes accumulation, computation, and memory assignment in a way that somewhat reduces clarity. Variable names like 'tid' and 's_sino' are short but acceptable in CUDA context. The reading flow follows a natural order, though the commented-out line disrupts it slightly. With minor formatting cleanup and removal of dead code, readability would improve significantly.

Run 2

The code is fairly readable overall but has some issues. The structure is logical, with shared memory usage and a straightforward kernel launch. Nesting is minimal, and the intent is mostly clear. However, the variable names are somewhat opaque (e.g., 'tid', 'index', 'pixelNumber'), and the relationship between dimensions and indices could be better explained. The loop body performs multiple actions—loading attenuation, accumulating, writing output—which slightly reduces readability. The code length is appropriate, and the reading flow is natural for CUDA code, but comments are sparse and do not clarify the algorithm's purpose or the meaning of the attenuation term. Overall, it reads like competent but under-documented GPU code.

Run 3

The code has a clear overall structure with a single kernel function and straightforward logic. However, several issues reduce readability: hardcoded magic numbers, inconsistent indentation, unclear variable names like 'BLOCK' and 'tid', and multiple operations per line in some cases. The loop body mixes index updates, accumulation, and assignment, making the action granularity less clean. The reading flow is acceptable but could be improved with better comments and separation of operations. The device constant declaration is simple but lacks context. Overall, the code is moderately readable but would benefit from clearer naming, consistent formatting, and more explicit step-by-step actions.

Run 1

Code Structure: The kernel is logically organized into thread indexing, bounds checking, sinogram loading, and backprojection. Nesting: A single conditional containing one loop keeps nesting manageable. Clarity of intent: Descriptive array names and comments communicate the purpose, though the indexing layout and cumulative attenuation calculation require domain knowledge. Code length: The implementation is concise, but the redundant return and commented-out assignment add clutter. Action granularity: Most lines perform one clear operation, making computation easy to follow. Reading flow: Execution proceeds naturally from setup to iteration, but inconsistent indentation, spacing, and abbreviated names such as s_sino and tid slightly reduce readability.

Run 2

Code Structure: The kernel is logically organized into thread indexing, bounds checking, loading, and backprojection. Nesting: One conditional containing one loop keeps nesting manageable. Clarity of intent: Descriptive kernel and array names, plus brief comments, communicate the purpose; however, the x-z pixel count and y-axis index traversal require inference. Code length: Compact overall, though the commented-out assignment and final return add unnecessary clutter. Action granularity: Each statement performs a distinct action, making execution easy to follow. Reading flow: The sequence is natural, but inconsistent indentation, spacing, and naming conventions interrupt scanning. More consistent formatting and a short explanation of the indexing layout would improve readability.

Run 3

Code Structure: The kernel is logically organized into thread indexing, bounds checking, sinogram loading, and backprojection. Nesting: One conditional containing one loop keeps nesting shallow and manageable. Clarity of intent: Descriptive array names and brief comments convey the purpose, though names such as tid and pixelNumber require interpretation, and the indexing layout is not explained. Code length: The implementation is compact, but the final return and commented-out assignment add unnecessary clutter. Action granularity: Each statement generally performs one action, making the computations easy to follow. Reading flow: Execution proceeds naturally from setup to accumulation and output, but inconsistent indentation, spacing, and brace formatting disrupt visual consistency.