Sample

Dorn/cuda/103

Human rating uses the original dataset scale.

DatasetDorn
Human2.6
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
56.8Δ 42.3
Scalabrino0.1570–1; higher is more readable
9.5Δ 5.0
Dorn0.3050–1; higher is more readable
23.7Δ 9.2
Mi0.6190–1; higher is more readable
66.2Δ 51.7
LLOC5Logical lines; fewer is more readable
78.0Δ 63.5
DeepSeek V4 Pro14.670–20; mean of three runs
74.1Δ 59.6
GPT-6.1 Sol150–20; mean of three runs
52.8Δ 38.3
BTTF0.3030–1; higher is more readable
16.4Δ 1.9
Human2.61–5; original rating
14.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.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.3−7.951
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -8.008 (log-odds).
Score = sigmoid(-8.008) = 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.131+1.309
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
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.856−0.272
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.122−0.244
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.9+0.214

Intercept 0.07 + feature contributions = -0.826 (log-odds).
Score = sigmoid(-0.826) = 0.305.

Score0.619
Score5
Run 1

The code is moderately readable but has several issues. The structure is logical - it configures kernel launch parameters and executes a CUDA kernel. However, there are clarity problems: the commented-out CUDA_SAFE_CALL line creates ambiguity, and the kernel function name 'et_joint_histogram_gpu_kernel' has an unclear prefix 'et'. Nesting is flat, which is good, and each line generally performs one action. The code length is concise and appropriate for its purpose. Reading flow suffers from the commented code appearing first and inconsistent naming conventions - 'jont_hist' appears to be a typo of 'joint_hist', and variables alternate between meaningful names (array_size, hist_size) and cryptic ones (min_A, max_A). The magic number '1,1,1' in dim3 constructors is standard CUDA practice but could benefit from a brief comment explaining grid/block configuration.

Run 2

The code is relatively simple and readable overall. It computes a grid dimension, defines block/grid dimensions, launches a CUDA kernel, and synchronizes—each action is on its own line. Naming is reasonably clear (e.g., grid, BLOCK, hist_size). However, there are readability issues: the variable 'd_jont_hist' likely contains a typo, reducing clarity of intent. The commented-out CUDA_SAFE_CALL line adds minor clutter. The expression for 'grid' uses a cast and division on one line but is still understandable; however, the calculation could be explained with a comment. While the code flow is logical and nesting is flat, context is missing—what these arrays represent is not clear. Action granularity is fine, but overall clarity is slightly diminished by naming inconsistencies and lack of explanation of the kernel’s purpose. These factors keep it from being highly readable.

Run 3

The code is mostly readable: it has clear structure, flat nesting, and concise length. Variables are logically named (grid, block dimensions, d_array pointers), and kernel launch intent is evident. However, minor issues reduce clarity: a commented-out CUDA call without explanation, a typo (`d_jont_hist`), and `CUDA_SAFE_CALL(cudaThreadSynchronize())` is deprecated (should use `cudaDeviceSynchronize`). Grid calculation is compact but could benefit from a comment explaining BLOCK and array_size. Overall, it is straightforward CUDA host code with acceptable readability.

Run 1

Code Structure: Logically sequences grid calculation, launch configuration, kernel execution, and synchronization, though the isolated closing brace and commented-out call lack context. Nesting: Flat, with no nested control flow. Clarity of intent: The kernel name communicates joint-histogram computation, but terse names B and G, unexplained BLOCK, and the apparent typo d_jont_hist reduce clarity. Code length: Concise, with little unnecessary code apart from the stale commented-out statement. Action granularity: Each statement performs one action; the long kernel call is still a single operation. Reading flow: Blank lines separate preparation, execution, and synchronization naturally, but the long argument list and minimal explanatory context slightly hinder scanning.

Run 2

Code Structure: The operations follow a logical sequence: calculate grid size, define launch dimensions, launch the kernel, and synchronize. However, the unmatched closing brace makes the snippet structurally incomplete. Nesting: The code is flat and easy to scan. Clarity of intent: The kernel name suggests joint histogram computation, but terse names such as B and G, the apparent typo d_jont_hist, and the commented-out memory copy reduce clarity. Code length: The snippet is concise, though the long kernel invocation is harder to read. Action granularity: Each statement performs one main action, with launch configuration split into separate declarations. Reading flow: Execution proceeds naturally, but inconsistent spacing, unexplained commented-out code, and missing surrounding context interrupt readability.

Run 3

Code Structure: The launch configuration, kernel invocation, and synchronization are logically ordered, but the dangling closing brace and commented-out call weaken the snippet's self-contained structure. Nesting: The code is flat and easy to scan. Clarity of intent: CUDA execution intent is recognizable, though terse names B and G, the apparent typo d_jont_hist, and unexplained parameters reduce clarity. Code length: The snippet is concise, with little unnecessary code beyond the stale comment. Action granularity: Each statement performs one main action; the long kernel invocation groups many arguments on one line. Reading flow: Blank lines separate setup, execution, and synchronization naturally, but inconsistent spacing and the lengthy argument list slightly interrupt readability.