Sample
Dorn/cuda/87
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 32.6Δ 14.2 |
| Scalabrino | 0.217 | 0–1; higher is more readable | 15.1Δ 3.3 |
| Dorn | 0 | 0–1; higher is more readable | 0.6Δ 17.8 |
| Mi | 0.002 | 0–1; higher is more readable | 1.1Δ 17.3 |
| LLOC | 16 | Logical lines; fewer is more readable | 43.7Δ 25.3 |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs | 24.8Δ 6.4 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 19.9Δ 1.5 |
| BTTF | 0.211 | 0–1; higher is more readable | 6.4Δ 12.0 |
| Human | 2.75 | 1–5; original rating | 18.4 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 1052.207 | −34.723 |
| 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.247 | −7.871 |
Intercept 8.87 + feature contributions = -21.724 (log-odds).
Score = sigmoid(-21.724) = 0.
| Score | 0.217 |
|---|
Feature contributions
| Feature | Value | Contribution (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. | 305 | −9.254 |
| 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.111 | −0.139 |
| 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.814 | +0.007 |
Intercept 0.07 + feature contributions = -10.148 (log-odds).
Score = sigmoid(-10.148) = 0.
| Score | 0.002 |
|---|
| Score | 16 |
|---|
Run 1
The code is difficult to follow due to its heavy reliance on macros (e.g., PATTERN, NUM_INPUTS_OUTPUT_NEURON), implicit variable types, and low-level GPU-specific constructs. The structure mixes initialization, conditional logic, and memory synchronization without clear separation. Intent is ambiguous, with opaque variable names like 'lg', 'm', 'rmsF', and 'bRMS' that obscure purpose. Nesting is shallow but the use of shared memory and synchronization barriers adds cognitive load. Action granularity varies from multiple assignments per line to multi-line indexing calculations. Reading flow is disjointed, requiring constant cross-referencing with macro definitions and shared memory layout. While some sections are concise, overall readability is hindered by domain-specific assumptions and lack of comments explaining the memory layout, indexing scheme, or algorithmic intent.
Run 2
The code has some logical organization through macros and a namespace, but suffers from several readability issues. The function signature is extremely long with many parameters, making intent unclear. Nesting is shallow but conditional early-return adds control flow complexity. Variable names like 'm', 'lg', 'rmsF', 'bRMS' are cryptic and ambiguous. Multiple operations are packed into single lines (e.g., computing connection and threadId together). The reading flow is disrupted by inconsistent spacing, preprocessor directives interspersed with code, and unclear relationship between CUDA thread/block dimensions and the shared memory layout. The action granularity is mixed—some lines perform one action, others combine several. Overall, the code requires significant domain knowledge to interpret, reducing readability for a general software engineer evaluating structure and clarity.
Run 3
The code suffers from poor readability due to several factors. Macros like PATTERN obscure intent, while magic numbers (e.g., '+1' in connection calculation) lack explanation. The function signature is extremely long with many parameters, making it difficult to grasp at a glance. Variable names are cryptic ('rmsF', 'bRMS', 'm', 'lg') and inconsistent. The logic mixes shared memory management, early returns, and pointer arithmetic with insufficient comments explaining the neural network concepts. Nesting is relatively flat, which is a positive, but the structure feels disorganized - early return logic precedes shared memory setup, and thread synchronization points interrupt natural flow. Action granularity is acceptable, but the overall reading flow is disrupted by unclear variable purposes and dense numerical operations. The code appears to be kernel-level GPU code, which inherently has complexity, but meaningful naming and documentation could substantially improve comprehension.
Run 1
Code Structure: The visible kernel follows a logical sequence: error-growth check, shared-memory setup, indexing, and gradient calculation, but the excerpt is incomplete. Nesting: Shallow conditionals keep control flow easy to follow. Clarity of intent: Descriptive kernel and parameter names help, while abbreviations such as lg, rmsF, and bRMS, externally defined indexing macros, and unexplained shared-memory layout obscure details. Code length: The body is concise, but the very long parameter list and unwrapped signature reduce scanability. Action granularity: Most lines perform one action, although inline conditional statements compress control flow. Reading flow: Blank lines separate phases reasonably well, but inconsistent spacing and lack of comments explaining synchronization and indexing make the CUDA-specific logic harder to understand.
Run 2
Code Structure: The kernel follows a logical sequence of error checking, shared-memory preparation, index calculation, synchronization, and gradient computation, but the excerpt is incomplete. Nesting: Shallow conditionals keep control flow easy to follow. Clarity of intent: Descriptive kernel and parameter names help, but abbreviated variables, externally defined macros, and unexplained indexing formulas obscure the computation. Code length: The body is concise, although the very long signature is difficult to scan. Action granularity: Most statements perform one action per line, but inline conditional assignments and returns compress control flow. Reading flow: Execution order is reasonably natural, while inconsistent spacing, large blank gaps, missing explanatory comments around synchronization, and the abruptly truncated ending reduce readability.
Run 3
Code Structure: The kernel follows a logical sequence of error checking, shared-memory setup, indexing, and gradient computation, but the excerpt is incomplete. Nesting: Shallow conditionals keep control flow easy to follow. Clarity of intent: Descriptive function and parameter names help, while abbreviations such as lg, rmsF, and bRMS, undefined indexing macros, and unexplained shared-memory layout require domain knowledge. Code length: The body is concise, but the very long, single-line parameter list hurts readability. Action granularity: Most statements perform one action per line, although inline conditional assignments and returns compress control flow. Reading flow: Execution is generally sequential, with synchronization points clearly visible; inconsistent spacing, excess blank lines, and limited explanatory comments interrupt the flow.