Sample

Dorn/cuda/3

Human rating uses the original dataset scale.

DatasetDorn
Human2.54
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
28.7Δ 15.9
Scalabrino0.0660–1; higher is more readable
3.1Δ 9.7
Dorn00–1; higher is more readable
0.3Δ 12.5
Mi00–1; higher is more readable
0.0Δ 12.8
LLOC12Logical lines; fewer is more readable
53.6Δ 40.8
DeepSeek V4 Pro10.330–20; mean of three runs
42.9Δ 30.1
GPT-6.1 Sol12.330–20; mean of three runs
24.4Δ 11.6
BTTF0.1590–1; higher is more readable
3.9Δ 8.9
Human2.541–5; original rating
12.8

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.1128.687−37.247
Source linesThe number of non-empty source lines.30+12
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.167−7.751

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

Score0.066

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.313.935−9.632
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.30+0.301
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.30−0.268
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.121−0.236
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.31−0.061
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.813+0.007

Intercept 0.07 + feature contributions = -10.623 (log-odds).
Score = sigmoid(-10.623) = 0.

Score0
Score12
Run 1

The code shows moderate readability with some positive and negative aspects. Structurally, the functions are logically organized and relatively flat, avoiding deep nesting (only 2-3 levels). Intent is mostly clear from function names and variable names, though parameter lists are very long. Code length is reasonable. Action granularity is mostly one action per line. However, reading flow is diminished by inconsistent spacing, very long parameter lists that wrap poorly, and preprocessor directives breaking flow. Variable names are descriptive but verbose (e.g., lastDeltaWithoutLearningMomentumW). A dangling comment fragment at the top (`*/`) is confusing and suggests improper file merging. The constants and types (CUDA_VALUE, KERNEL) are domain-specific and would benefit from documentation. Overall, the code is readable for those familiar with the domain, but long parameter lists and formatting inconsistencies reduce clarity. The logic is simple and flat, but readability suffers from formatting rather than structural complexity.

Run 2

The code shows reasonable structure with clear function names and consistent formatting, but has significant readability issues. It contains very long parameter lists with repetitive data types, making function signatures difficult to scan. The conditional compilation directives (#ifdef USE_STEP_SIZE) interrupt the logical flow and add visual noise. While the code is relatively flat (good), the long variable names like 'lastDeltaWithoutLearningMomentumW' reduce clarity. Missing braces on the if statement and lack of comments explaining the RBM algorithm's purpose hurt comprehension. The second function is incomplete in the snippet. Overall, the code is functional but verbose and would benefit from refactoring parameter lists into structs and better documentation.

Run 3

The code is a CUDA kernel with a reasonable flat structure, but suffers from readability issues. It uses a single large function with a very long parameter list, making it difficult to understand the purpose of each argument at a glance. The nested preprocessor directives (#ifdef) inside conditional blocks add complexity and make the code harder to follow. Variable names like 'J', 'I', 'lastDeltaWithoutLearningMomentumW' are cryptic and overly verbose respectively. The function name suggests a specific operation, but the conditional logic with 'idx < J' mingles two distinct responsibilities (initializing weights and biases) without a clear separation. While the reading flow is linear, multiple statements on some lines and deep parameter lists reduce clarity. The code is not deeply nested, but the preprocessor directives and long expressions detract from overall readability.

Run 1

Code structure is reasonably logical, with separate initialization kernels and related assignments grouped together, but the snippet starts with a stray comment terminator and ends mid-function. Nesting is moderate: two conditional levels plus preprocessor directives add some complexity. Intent is generally clear from kernel names and initialization assignments, although abbreviations such as I, J, W, and A require domain knowledge. Code length is mostly appropriate, but long parameter lists and repetitive variable names make signatures difficult to scan. Action granularity is good, with one declaration or assignment per line. Reading flow is largely sequential and consistent, though unwrapped signatures, conditional compilation, and the incomplete boundaries interrupt comprehension.

Run 2

Code Structure: Functions and namespace provide logical organization, but the stray opening comment terminator and truncated second function weaken coherence. Nesting: Two conditional levels are manageable, though conditional-compilation blocks add visual complexity. Clarity of intent: Function and variable names suggest RBM bias, delta, and learning-rate initialization, but abbreviations such as I, J, W, and B and undocumented parameter relationships require domain knowledge. Code length: The initialization body is concise, but very long signatures with numerous similarly named parameters are difficult to scan. Action granularity: Each assignment performs one action per line, making operations easy to distinguish. Reading flow: Initialization follows a sensible sequence, but long lines, inconsistent whitespace, preprocessor directives, and the incomplete ending interrupt otherwise natural reading.

Run 3

Code Structure: Initialization logic is grouped in named kernels, but the stray opening comment terminator and incomplete second kernel disrupt organization. Nesting: Two conditional levels are manageable, although embedded preprocessor directives complicate visual parsing. Clarity of intent: Kernel names and assignments clearly suggest bias, delta, and learning-rate initialization; abbreviated dimensions and lengthy parameter lists require additional context. Code length: The body is reasonably concise, but single-line signatures are excessively long. Action granularity: Each assignment performs one action per line, making individual operations easy to follow. Reading flow: The first kernel follows a natural index-check-and-initialize sequence, but inconsistent spacing around directives and the abruptly truncated second kernel interrupt readability.