Sample

Dorn/cuda/110

Human rating uses the original dataset scale.

DatasetDorn
Human2.2
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
7.5Δ 1.1
Scalabrino0.1780–1; higher is more readable
12.8Δ 6.4
Dorn0.2940–1; higher is more readable
22.8Δ 16.4
Mi0.0380–1; higher is more readable
6.4Δ 0.0
LLOC25Logical lines; fewer is more readable
21.4Δ 15.0
DeepSeek V4 Pro60–20; mean of three runs
15.3Δ 8.9
GPT-6.1 Sol12.670–20; mean of three runs
27.3Δ 20.9
BTTF0.3130–1; higher is more readable
17.0Δ 10.6
Human2.21–5; original rating
6.4

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.2544−83.952
Source linesThe number of non-empty source lines.50+20
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.383−8.074

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

Score0.178

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.129.941−1.839
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.130+1.293
Indentation frequencyHow rapidly indentation changes from line to line.48+0.923
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.50−0.734
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.49−0.704
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.588+0.283
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.114−0.17

Intercept 0.07 + feature contributions = -0.877 (log-odds).
Score = sigmoid(-0.877) = 0.294.

Score0.038
Score25
Run 1

This code is difficult to read due to several issues. The code structure appears tangled, with inconsistent naming conventions and unclear variable relationships. There are multiple similar functions with long, nearly identical names that make distinguishing their purposes challenging. The nesting is moderate but the code lacks clear separation of concerns. The intent is somewhat obscured by the complex variable names like 'reg_convertNMIGradientFromVoxelToRealSpace' and inconsistent parameter naming. The code length is reasonable but could benefit from helper functions to reduce repetition. Action granularity is inconsistent - some lines pack multiple operations while others are properly spaced. The reading flow is disrupted by the long, unwieldy function names and the confusion between grid and block dimensions (the code appears to swap G1 and B1 values in the dim3 declarations). The lack of comments explaining the CUDA kernel launches and the debug-only print statements further reduce readability. The inconsistent use of underscores and camelCase adds to the confusion. The code would benefit from better naming conventions, more consistent formatting, and clearer separation of CUDA configuration from kernel execution.

Run 2

The code shows moderate readability but has several issues. Structure is somewhat organized with logical function separation, but individual functions are cluttered. Nesting is flat, which is good, but there's heavy repetition of CUDA boilerplate. Intent is murky due to very long, cryptic variable names like Block_reg_convertNMIGradientFromVoxelToRealSpace and Grid_reg_GetConjugateGradient1. Code length is unnecessarily verbose - the grid/block dimension setup repeats across functions. Action granularity is inconsistent; some lines combine multiple operations while others are simple. Reading flow is disrupted by the enormous identifier names and inconsistent naming conventions. The dim3 G1/B1 swap between functions (some use Grid for B1, others for G1) creates confusion about which is grid vs block. Debug printf statements add noise, though they're conditionally compiled. The CUDA API calls are wrapped consistently with CUDA_SAFE_CALL, which is good practice. Overall, the code functions but requires effort to parse due to verbose naming, repetition, and inconsistent conventions.

Run 3

This code is highly unreadable due to several critical issues. The structure is disorganized with inconsistent variable naming (swapped Grid/Block variables in dim3 declarations) and misleading names like B1 for grid dimensions. Nesting is minimal but the code lacks clear separation of concerns. Intent is ambiguous - function boundaries are unclear, with the first code fragment appearing to be truncated from a previous function. Code length is acceptable but action granularity is poor, with multiple operations crammed into single lines. Reading flow is severely disrupted by inconsistent indentation (tabs vs spaces), long function names, and CUDA-specific syntax interleaved with debug statements. The swapped Grid/Block variables in lines like 'dim3 B1(Grid_reg_convertNMIGradientFromVoxelToRealSpace,1,1)' followed by 'dim3 G1(Block_reg_convertNMIGradientFromVoxelToRealSpace,1,1)' indicates potential bugs and makes the code extremely confusing to follow. The printf statements add noise without improving clarity.

Run 1

Code Structure: Functions separate distinct gradient operations logically, but the excerpt starts and ends mid-operation, and repeated CUDA setup adds clutter. Nesting: Flat execution with only conditional debug directives makes control flow easy to follow. Clarity of intent: Descriptive function names and the formula comment help, but B1/G1 are opaque, and their grid/block assignments differ between functions, creating confusion. Code length: Mostly concise, though long identifiers, repeated setup, and verbose debug statements increase reading effort. Action granularity: Generally one operation per statement, with clean separation of setup, kernel execution, synchronization, and copying. Reading flow: Execution order is natural, but inconsistent spacing, alignment, naming capitalization, and incomplete boundaries disrupt readability.

Run 2

Code Structure: Functions logically group CUDA setup, kernel execution, synchronization, and copying, but the excerpt begins and ends mid-operation. Nesting: Flat control flow and minimal conditional compilation make it easy to scan. Clarity of intent: Descriptive function names and CUDA calls convey purpose, but cryptic B1/G1 names, inconsistent grid/block naming, and an unexplained formula comment obscure details. Code length: Reasonably concise, though repeated setup and debug boilerplate add noise, and long identifiers create unwieldy lines. Action granularity: Most statements perform one action per line; multiline calls remain coherent. Reading flow: Operations generally follow a natural execution sequence, but inconsistent spacing, alignment, capitalization, and grid/block conventions interrupt readability.

Run 3

Code Structure: Functions organize related CUDA operations logically, but the excerpt begins and ends mid-operation, limiting context. Nesting: Mostly flat statements with simple debug conditionals make control flow easy to follow. Clarity of intent: Descriptive function and kernel names help, but terse B1/G1 variables, unexplained constants, and inconsistent grid/block naming obscure launch configuration. Code length: Reasonably concise, although repeated setup and debug boilerplate add clutter and long identifiers widen lines. Action granularity: Generally one operation per statement, with clear separation between texture binding, kernel execution, synchronization, and copying. Reading flow: Operations follow a natural setup-execute-check sequence, but inconsistent spacing, parameter alignment, naming capitalization, and truncated boundaries interrupt readability.