Sample

Dorn/cuda/63

Human rating uses the original dataset scale.

DatasetDorn
Human2.4
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
57.4Δ 47.6
Scalabrino0.1570–1; higher is more readable
9.5Δ 0.3
Dorn0.0340–1; higher is more readable
4.7Δ 5.0
Mi0.6190–1; higher is more readable
66.2Δ 56.4
LLOC5Logical lines; fewer is more readable
78.0Δ 68.2
DeepSeek V4 Pro110–20; mean of three runs
46.4Δ 36.6
GPT-6.1 Sol14.670–20; mean of three runs
47.1Δ 37.3
BTTF0.1510–1; higher is more readable
3.6Δ 6.1
Human2.41–5; original rating
9.7

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.391.735−12.927
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.175−7.763
Source linesThe number of non-empty source lines.10+4

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

Score0.157

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.131−1.883
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.1−0.703
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.10+0.682
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.164−0.649
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.856−0.272
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.9+0.214

Intercept 0.07 + feature contributions = -3.345 (log-odds).
Score = sigmoid(-3.345) = 0.034.

Score0.619
Score5
Run 1

The code is fairly concise and straightforward, but readability suffers from unclear variable names, inconsistent formatting, and a lack of contextual comments. The grid and block dimensions are computed with a one-line expression that obscures intent, and the kernel launch packs many arguments into a single line. Variable names like 'jont_hist' and 'G' are ambiguous, and there is inconsistent spacing around operators. The CUDA_SAFE_CALL and synchronize are clear, but the overall structure would benefit from line breaks and named constants.

Run 2

The code is short but has several readability issues. The variable names like 'grid', 'B', 'G', 'd_array_A', 'd_array_B', and 'd_jont_hist' are either too generic or contain typos ('jont' instead of 'joint'), making intent unclear. The kernel launch line is very long, performing multiple actions (configuring dimensions, launching kernel, passing many arguments) in one dense statement. Nesting is flat, and the overall structure is logical, but the lack of comments, spacing, and descriptive naming reduces clarity. The grid calculation mixes types without explanation, and the CUDA call lacks context. Overall, it reads like a raw snippet rather than maintainable code.

Run 3

The code is short and relatively clear in intent, but has several readability issues. The structure is logical — setting up grid/block dimensions, launching a kernel, and synchronizing — but the variable names are cryptic (G, B, grid, BLOCK) and there is a typo in 'jont' instead of 'joint'. The calculation for grid size is nested into one line, combining multiple operations (ceil, float cast, division) reducing clarity. There is no spacing between variable declarations and kernel launch, and the function signature is cut off, making context ambiguous. Action granularity is mixed: one line for grid calculation includes multiple actions, while kernel launch is one logical line. Nesting is minimal, which is good. Overall, the code is understandable for someone familiar with CUDA, but not highly readable due to naming, typo, and compressed operations.

Run 1

Code Structure: Logically groups grid calculation, launch configuration, kernel execution, and synchronization, although the closing brace lacks its opening context. Nesting: Flat and easy to follow. Clarity of intent: The histogram kernel name conveys purpose, but B, G, BLOCK, and the apparent typo d_jont_hist reduce clarity. Code length: Concise, without unnecessary statements, though the kernel launch line is long. Action granularity: Each statement performs one main action. Reading flow: Follows the natural CUDA setup-launch-synchronize sequence; inconsistent spacing and the dense argument list slightly hinder readability.

Run 2

Code Structure: The launch configuration, kernel invocation, and synchronization are logically ordered, though the unmatched closing brace makes the snippet incomplete. Nesting: The code is flat and easy to scan. Clarity of intent: The kernel name conveys histogram computation, but terse names B and G, unexplained parameters, and the apparent typo d_jont_hist reduce clarity. Code length: The snippet is concise without unnecessary operations. Action granularity: Each statement performs one main action, although the kernel invocation packs many arguments onto a long line. Reading flow: Execution proceeds naturally from grid calculation to launch and synchronization; blank lines help separate stages, but spacing and argument wrapping could improve readability.

Run 3

Code Structure: Logically sequences grid calculation, launch configuration, kernel execution, and synchronization, though the unmatched closing brace indicates an incomplete excerpt. Nesting: Flat, with no nested control flow. Clarity of intent: The kernel name communicates joint-histogram computation, but abbreviated B and G names, the apparent d_jont_hist typo, and unexplained pointer dereferences reduce clarity. Code length: Concise without obvious unnecessary code. Action granularity: Each statement performs one main action. Reading flow: Natural execution order and blank-line grouping aid readability, but the long kernel-launch line and inconsistent spacing make scanning harder.