Sample

Dorn/cuda/46

Human rating uses the original dataset scale.

DatasetDorn
Human2.65
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
19.2Δ 2.5
Scalabrino0.2610–1; higher is more readable
17.8Δ 1.1
Dorn0.2590–1; higher is more readable
20.9Δ 4.2
Mi0.1250–1; higher is more readable
13.1Δ 3.6
LLOC27Logical lines; fewer is more readable
16.9Δ 0.1
DeepSeek V4 Pro60–20; mean of three runs
15.3Δ 1.4
GPT-6.1 Sol110–20; mean of three runs
14.2Δ 2.5
BTTF0.3140–1; higher is more readable
17.3Δ 0.6
Human2.651–5; original rating
16.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.1679.499−55.423
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.159−7.738

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

Score0.261

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.132.941−1.966
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.133+1.341
Indentation frequencyHow rapidly indentation changes from line to line.46+0.854
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.46−0.635
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.761+0.286
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.121−0.232

Intercept 0.07 + feature contributions = -1.051 (log-odds).
Score = sigmoid(-1.051) = 0.259.

Score0.125
Score27
Run 1

This code is extremely unreadable due to multiple severe issues. The snippet starts mid-function with inconsistent indentation, missing context for variables (solutions, donor, f, r1, r2, etc.), and unclear mutation logic. It contains deeply nested switch statements with cryptic single-letter variables (L, jr, cr, tid) and a complex ternary expression in the DE_EXPONENTIAL case that is difficult to parse. The action granularity is poor, combining multiple operations in single lines. The reading flow is disorganized, jumping from mutation to crossover to selection without clear separation or comments explaining the algorithmic purpose. The use of CUDA-specific constructs (blockIdx.x, __syncthreads, curand_uniform) without context further obscures intent. The code lacks meaningful variable names and proper structure, making it nearly impossible to understand without extensive domain knowledge and surrounding code.

Run 2

The code shows moderate structure with clear phase comments (crop donor, crossover, selection) but suffers from readability issues. CUDA-specific complexity and inline ternary expressions make the intent hard to follow. The ternary operators in crossover and selection are nested and dense, combining multiple conditions and actions in single lines. Variable names like 'tid', 'jr', 'f', and 'cr' lack descriptive context. The code fragment appears incomplete, starting mid-function with orphaned braces, making logical flow difficult to assess. While some organization exists through switch statements and section comments, the overall clarity is compromised by terse CUDA optimizations and mathematical abbreviations. The indentation is inconsistent and the fragment's incomplete nature obscures the broader structure. A developer unfamiliar with differential evolution algorithms would struggle to parse the semantics without external documentation.

Run 3

The code is difficult to read due to mangled formatting (inconsistent indentation, tabs vs spaces), cryptic variable names (tid, jr, r1+tid), and dense expressions combining multiple operations in single lines. Nesting is moderate but control flow is unclear due to missing context around the switch statements. The intent is partially discernible - it appears to implement differential evolution mutation/crossover/selection in CUDA - but the logic is obscured by poor naming and formatting. Several lines perform multiple actions (e.g., ternary assignments with complex conditions), violating the one-action-per-line principle. Reading flow is disjointed, jumping between kernel functions with no clear separation. Some structure exists (switch statements for mutation/crossover), but the overall organization is buried under formatting inconsistencies and terse expressions. The code would benefit from consistent indentation, descriptive variable names, and breaking complex assignments into smaller steps.

Run 1

Code Structure: Mutation, crossover, and selection are separated into recognizable stages, but the excerpt starts and ends mid-function, limiting structural clarity. Nesting: Generally moderate, with a switch and nested selection condition; the exponential crossover's nested ternary adds complexity. Clarity of intent: Stage comments and descriptive array names help, but abbreviated identifiers, the BETTER_THAN macro, and dense index calculations require context. Code length: Fairly concise, though long expressions compress substantial logic. Action granularity: Most statements perform one action per line, but inline defaults and the compact else assignment reduce consistency. Reading flow: Execution progresses logically from donor cropping to crossover and selection, but inconsistent spacing, indentation, blank lines, and long parameter and ternary expressions interrupt scanning.

Run 2

Code Structure: Crossover and selection are logically separated, but the excerpt begins and ends mid-function, limiting structural clarity. Nesting: Mostly moderate, although the exponential crossover uses a nested ternary that is difficult to parse. Clarity of intent: Comments and names such as trialVectors and trialFitness convey purpose; abbreviated indices and macros such as IMUL and BETTER_THAN require external context. Code length: Generally concise, but long expressions and the selection signature impair scanning. Action granularity: Most statements perform one action, though compact default branches and conditional assignments compress control flow. Reading flow: Algorithm steps follow a sensible order, but inconsistent spacing, indentation, brace placement, and dense comparisons interrupt readability.

Run 3

Code Structure: Mutation, crossover, and selection are logically separated, but the excerpt starts and ends mid-block, making context harder to follow. Nesting: Mostly moderate, though the exponential crossover's nested ternary is difficult to parse. Clarity of intent: Section comments and descriptive names such as trialFitnesses help, while abbreviations, index arithmetic, and macros such as IMUL and BETTER_THAN require outside knowledge. Code length: Generally concise, but compact expressions sacrifice readability. Action granularity: Most statements perform one action per line; inline default/break and else assignments reduce visual separation. Reading flow: The algorithm progresses naturally, but inconsistent spacing, indentation, brace placement, and dense conditions interrupt scanning.