Sample

Dorn/cuda/118

Human rating uses the original dataset scale.

DatasetDorn
Human2.39
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
44.8Δ 35.4
Scalabrino0.2930–1; higher is more readable
20.2Δ 10.7
Dorn0.1980–1; higher is more readable
16.4Δ 7.0
Mi0.6260–1; higher is more readable
67.4Δ 57.9
LLOC5Logical lines; fewer is more readable
78.0Δ 68.5
DeepSeek V4 Pro7.670–20; mean of three runs
27.2Δ 17.7
GPT-6.1 Sol14.330–20; mean of three runs
44.4Δ 35.0
BTTF0.220–1; higher is more readable
6.7Δ 2.8
Human2.391–5; original rating
9.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.539.271−17.796
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
Source linesThe number of non-empty source lines.10+4

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

Score0.293

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.166.818−3.401
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.167+1.89
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.893−0.272
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.9+0.214
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.113−0.159

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

Score0.626
Score5
Run 1

The code is a CUDA kernel launcher with moderate readability issues. Structure is logical but minimal. The function has a clear purpose: launching a joint histogram GPU kernel. However, several issues reduce clarity: the commented-out CUDA_SAFE_CALL line is dead code that should be removed. Variable naming is inconsistent and unclear: 'B' and 'G' are ambiguous, 'd_jont_hist' has a typo ('jont' instead of 'joint'), and abbreviated names like 'et' lack context. The function has many parameters, which adds cognitive load. Grid/block dimension setup is straightforward but could benefit from comments explaining constants like BLOCK. Nesting is flat, which is good, and each line represents one action. Reading flow is acceptable but disrupted by the commented-out code and typo. Overall, it's functional but not polished. For production code, this would need cleanup: remove dead code, fix typos, use descriptive names, and add documentation.

Run 2

The code has a clear purpose but suffers from multiple readability issues. There's an obvious typo ('d_jont_hist'), inconsistent naming conventions (snake_case vs camelCase), and excessive pointer dereferencing that obscures intent. The commented-out CUDA call adds noise, and the kernel launch lacks error checking. While the overall structure is simple with minimal nesting, the parameter list is long and unwieldy. The grid/dim3 setup is reasonably clear but could benefit from better naming. Type casting and magic numbers reduce clarity. The code is concise enough but sacrifices readability through poor naming and lack of documentation about what the function actually computes or its expected inputs. The single kernel launch action is straightforward, but the missing error handling and unclear parameter semantics make the code less maintainable than it could be.

Run 3

The code snippet shows basic structure with a clear function purpose, but suffers from significant readability issues. The function name and variable names use inconsistent naming (d_jont_hist typo, BLOCK in uppercase). The code lacks proper spacing around operators and commas. Grid and block dimensions are declared with cryptic single-letter variables (B, G). The kernel launch is long with multiple arguments on one line, violating action granularity principles. The commented-out code leaves ambiguity about its relevance. The reading flow feels disorganized with the commented line at the top before setup code. While the logical flow of setting up CUDA parameters is recognizable, the naming, formatting, and density make it harder to follow than necessary.

Run 1

Code Structure: The function logically groups grid calculation, launch configuration, and kernel invocation, but the missing closing brace makes the snippet appear incomplete. Nesting: The body is flat and easy to scan. Clarity of intent: Function and kernel names clearly indicate GPU joint-histogram computation, though B and G are terse, d_jont_hist contains a typo, and the commented-out backprojection call is distracting. Code length: The implementation is concise, but the long signature and kernel invocation reduce readability. Action granularity: Each active statement performs one action. Reading flow: Setup naturally precedes execution, with whitespace separating stages; the unrelated comment and incomplete ending interrupt that flow.

Run 2

Code Structure: The setup and kernel launch are logically organized, but the snippet lacks a closing brace and includes an unrelated commented-out call. Nesting: The function is flat, with no nested control flow. Clarity of intent: The function and kernel names indicate GPU joint-histogram computation, but B and G are cryptic, d_jont_hist contains a typo, and pointer-to-pointer parameters add interpretive effort. Code length: The implementation is concise, though the long signature and kernel-launch line reduce scanability. Action granularity: Each active statement performs one clear action. Reading flow: Grid calculation, launch-dimension setup, and kernel invocation follow a natural sequence; stale commentary and inconsistent spacing slightly disrupt readability.

Run 3

Code Structure: The snippet logically progresses from launch configuration to kernel invocation, but the missing closing brace makes it incomplete. Nesting: The body is flat and easy to scan. Clarity of intent: The function and kernel names communicate GPU joint-histogram computation, although B and G are terse, d_jont_hist appears misspelled, and the unrelated commented-out call distracts. Code length: The implementation is concise, but the long signature and kernel invocation reduce readability. Action granularity: Each statement performs one clear action. Reading flow: Configuration followed by execution is natural; inconsistent spacing and unused commented code slightly interrupt the flow.