Sample

Dorn/cuda/0

Human rating uses the original dataset scale.

DatasetDorn
Human2.46
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
11.7Δ 0.8
Scalabrino0.3610–1; higher is more readable
25.6Δ 14.7
Dorn0.0480–1; higher is more readable
5.6Δ 5.3
Mi0.3210–1; higher is more readable
30.6Δ 19.8
LLOC26Logical lines; fewer is more readable
18.8Δ 7.9
DeepSeek V4 Pro9.330–20; mean of three runs
37.2Δ 26.3
GPT-6.1 Sol12.330–20; mean of three runs
24.4Δ 13.5
BTTF0.3010–1; higher is more readable
15.9Δ 5.0
Human2.461–5; original rating
10.9

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.2110.114−69.634
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.029−7.544

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

Score0.361

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
Indentation frequencyHow rapidly indentation changes from line to line.50+0.992
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.50−0.727
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.758+0.286
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.116−0.19

Intercept 0.07 + feature contributions = -2.99 (log-odds).
Score = sigmoid(-2.99) = 0.048.

Score0.321
Score26
Run 1

The code shows mixed readability. The structure of the kernels is logical and functions are somewhat organized, but there are several issues. The nesting is moderate but the conditional compilation (#ifdef) inside the selection logic makes the flow harder to follow. Intent is somewhat clear for GPU programmers but ambiguous in places (e.g., IMUL macro, BETTER_THAN, gridDim.y usage). Code length is reasonable, but action granularity is violated in some lines like the long condition with macros. Reading flow is disrupted by the preprocessor directives, inconsistent indentation, and lack of comments explaining the SA algorithm steps or macro definitions. Variable names like y, posID are okay but not fully self-documenting. The use of __syncthreads and shared update flag is common but not explained. Overall, it requires domain knowledge and suffers from preprocessor complexity.

Run 2

The code has a reasonable overall structure, with separate kernel functions for distinct operations. However, several issues reduce readability. The use of macros like IMUL and BETTER_THAN obscures intent, and the conditional compilation (#ifdef MAXIMIZE) inside the if statement creates confusing nesting and breaks the reading flow. Mixed variable declarations with inconsistent formatting (e.g., pointer alignment, spacing) add to the clutter. While the kernels are relatively short, the logic within the selection kernel is tightly packed, with multiple actions per line in places. Nesting depth is moderate but could be flattened, especially in the fitness comparison block. The purpose of each kernel is somewhat clear from names, but the lack of comments explaining complex operations (e.g., the simulated annealing acceptance criterion) hurts clarity. Action granularity is inconsistent: some lines do one thing, while others combine arithmetic, random number generation, and assignment. Overall, the code is understandable but would benefit from cleaner formatting, less macro reliance, and clearer separation of conditional logic.

Run 3

The code shows some organization with separate kernels for step and selection, but readability suffers from several issues. The macro-based conditional logic (MAXIMIZE) inside the selection kernel creates confusing control flow that's hard to follow. Variable naming is inconsistent - some variables use camelCase while others don't. The code mixes multiple operations on single lines (like position calculation with random offset). The lack of comments explaining the simulated annealing logic makes intent unclear. Deep nesting with conditional compilation directives interrupts reading flow. While the code is relatively concise, the preprocessor directives, inconsistent formatting, and dense expressions make it challenging to understand without significant domain knowledge. The action granularity could be improved by breaking down complex operations into clearer steps.

Run 1

Code Structure: Two kernels logically separate candidate generation from selection, but the selection kernel is visibly incomplete. Nesting: Mostly shallow, with moderate nesting inside the selection decision. Clarity of intent: Descriptive array names clarify data movement, while abbreviated identifiers, undocumented indexing, magic constants, and BETTER_THAN obscure details. Code length: Generally concise without substantial repetition. Action granularity: Most lines perform one action, although the acceptance condition combines comparison, probability calculation, randomness, and conditional compilation. Reading flow: Execution mostly follows a natural sequence, but preprocessor directives embedded in the condition, inconsistent spacing and indentation, and the missing closing brace disrupt readability.

Run 2

Code Structure: Two focused kernels separate candidate generation from selection, but the selection kernel is visibly incomplete. Nesting: Mostly shallow, with a manageable nested acceptance check. Clarity of intent: Descriptive array names help convey simulated annealing, but abbreviations, an unused parameter, and macros such as IMUL and BETTER_THAN obscure details. Code length: Generally concise, although long signatures and the acceptance expression are cumbersome. Action granularity: Most lines perform one action, making updates easy to follow. Reading flow: Index calculation, random-state handling, acceptance, synchronization, and position updates follow a logical sequence. However, inconsistent spacing and indentation, conditional compilation embedded inside an if expression, and the missing closing brace interrupt readability.

Run 3

Code Structure: Two kernels separate candidate generation from selection logically, but the second kernel is visibly incomplete. Nesting: Mostly shallow, with a manageable nested acceptance check. Clarity of intent: Descriptive array names clarify data movement, while abbreviations, the BETTER_THAN macro, and unexplained indexing obscure details. Code length: Generally concise, though long signatures and acceptance expressions reduce readability. Action granularity: Most lines perform one declaration, calculation, or assignment, making individual operations easy to follow. Reading flow: Candidate generation reads naturally; selection is disrupted by preprocessor directives embedded within a condition, inconsistent spacing and indentation, and missing closing code. Overall, the core workflow is understandable, but formatting and conditional compilation require extra effort.