Sample
Dorn/cuda/115
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 3.6Δ 0.8 |
| Scalabrino | 0.072 | 0–1; higher is more readable | 4.3Δ 0.2 |
| Dorn | 0.176 | 0–1; higher is more readable | 13.9Δ 9.5 |
| Mi | 0.007 | 0–1; higher is more readable | 1.9Δ 2.5 |
| LLOC | 25 | Logical lines; fewer is more readable | 21.4Δ 17.0 |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs | 22.7Δ 18.2 |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs | 30.6Δ 26.2 |
| BTTF | 0.145 | 0–1; higher is more readable | 3.3Δ 1.1 |
| Human | 2.06 | 1–5; original rating | 4.5 |
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. | 2580.428 | −85.154 |
| 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.406 | −8.11 |
Intercept 8.87 + feature contributions = -72.394 (log-odds).
Score = sigmoid(-72.394) = 0.
| Score | 0.072 |
|---|
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. | 117.968 | −1.331 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 117.968 | +1.099 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.143 | −0.445 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 26 | −0.176 |
| 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.84 | +0.007 |
Intercept 0.07 + feature contributions = -1.54 (log-odds).
Score = sigmoid(-1.54) = 0.176.
| Score | 0.007 |
|---|
| Score | 25 |
|---|
Run 1
The code has several readability issues. Structure is moderately organized with comments separating sections, but suffers from inconsistent formatting and mixed indentation. Nesting is acceptable with only one if-else, but the else clause lacks braces, creating potential ambiguity. Clarity of intent is weak in places - variable names like 't_m_a_h' and 'Grid_block_matching_2' are cryptic, and the magic number 65335 appears without explanation. Code length is reasonable, but action granularity is poor: multiple statements appear on single lines (e.g., variable declarations combined with CUDA calls), forcing readers to parse carefully. Reading flow is disrupted by inconsistent spacing, alignment issues, and the 'memort' typo. The texture binding section is fairly clear, but the matrix transformation setup and grid calculation sections lack explanatory comments. The conditional block for grid dimension limiting needs better documentation. Overall, the code functions but requires significant mental effort to understand.
Run 2
The code has poor readability due to multiple issues. Structure is disorganized with comments that don't clearly delineate logical sections. Several lines violate the one-action-per-line principle by combining declarations and CUDA calls on the same line (e.g., 'float * targetValues;CUDA_SAFE_CALL(...)'). Magic numbers (65335) lack explanation. Long function calls with multiple parameters create dense, hard-to-scan lines. Indentation is inconsistent. The intent is partially clear but obscured by ambiguous variable names like 't_m_a_h' and 'Grid_block_matching_2'. Nesting is shallow, which is positive, but code length is excessive for the operations performed. Reading flow jumps between texture binding, matrix copying, memory allocation, and grid calculation without smooth transitions. Comments like 'device memort' contain typos. Overall, the code requires significant effort to parse and understand.
Run 3
The code exhibits several readability issues. Structure is somewhat logical (setup operations grouped together) but suffers from inconsistent formatting and misplaced comments. There are multiple actions crammed onto single lines (e.g., variable declarations followed immediately by CUDA calls on the same line), violating action granularity. Variable names are cryptic (e.g., 't_m_a_h', 'bDim') with unclear intent. The if/else block for sform_code lacks braces, creating potential ambiguity and poor nesting clarity. Magic numbers like 65335 and 65535 appear without explanation. Comments are sparse and sometimes misleading ('memort' typo). While the code is relatively flat (minimal deep nesting) and not excessively long, the mixed formatting, compressed statements, and unclear naming significantly hamper readability and natural reading flow.
Run 1
Code Structure: Clearly separated stages cover texture binding, matrix transfer, allocation, and grid sizing, but repeated allocation logic could be consolidated. Nesting: Shallow conditionals make control flow easy to follow. Clarity of intent: Comments explain the main operations, but abbreviated names such as t_m_a_h and unexplained constants obscure details; the differing 65335 and 65535 limits are confusing. Code length: Mostly concise, although the repeated memSize assignment is unnecessary and matrix preparation is repetitive. Action granularity: Most lines perform one action, but pointer declarations and allocation calls share lines. Reading flow: Operations follow a logical sequence, yet inconsistent indentation, spacing, long lines, and the inline else statement interrupt scanning.
Run 2
Code Structure: Logical sections cover texture binding, matrix transfer, allocation, and grid sizing, aided by comments. Nesting: Minimal nesting makes control flow easy to follow, though the unbraced if/else is less clear. Clarity of intent: CUDA operations are recognizable, but abbreviated matrix variables, unexplained constants, and the inconsistent 65335/65535 limits introduce ambiguity. Code length: Fairly concise, although repeated matrix-copy operations and a redundant memSize assignment add clutter. Action granularity: Most lines perform one action, but pointer declarations and allocations share lines unnecessarily. Reading flow: Execution proceeds naturally, but inconsistent indentation, spacing, long argument lists, and a comment typo reduce readability.
Run 3
Code Structure: Sequential sections for texture binding, matrix transfer, allocation, and grid sizing are logically organized and supported by comments. Nesting: Shallow conditionals keep control flow easy to follow, although missing braces reduce consistency. Clarity of intent: CUDA calls and comments communicate the overall purpose, but abbreviated names such as t_m_a_h and unexplained constants obscure details; the differing 65335 and 65535 limits are confusing. Code length: Reasonably concise, though repeated allocation setup and the redundant memSize assignment add noise. Action granularity: Most lines perform one action, but pointer declarations and allocation calls share lines, as do else and its assignment. Reading flow: Execution proceeds naturally, but inconsistent indentation, spacing, long argument lists, and a comment typo interrupt scanning.