Sample
Dorn/cuda/37
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 32.3Δ 12.0 |
| Scalabrino | 0.577 | 0–1; higher is more readable | 56.2Δ 11.9 |
| Dorn | 0.489 | 0–1; higher is more readable | 42.1Δ 2.2 |
| Mi | 0.457 | 0–1; higher is more readable | 47.1Δ 2.8 |
| LLOC | 25 | Logical lines; fewer is more readable | 21.4Δ 22.8 |
| DeepSeek V4 Pro | 3.33 | 0–20; mean of three runs | 4.6Δ 39.7 |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs | 14.2Δ 30.1 |
| BTTF | 0.458 | 0–1; higher is more readable | 34.5Δ 9.7 |
| Human | 3.26 | 1–5; original rating | 44.3 |
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. | 1311.101 | −43.266 |
| 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. | 4.992 | −7.487 |
Intercept 8.87 + feature contributions = -21.884 (log-odds).
Score = sigmoid(-21.884) = 0.
| Score | 0.577 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 48 | +0.923 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 104 | +0.874 |
| 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. | 103.98 | −0.739 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 49 | −0.699 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 48 | −0.681 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.867 | +0.287 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.08 |
Intercept 0.07 + feature contributions = -0.044 (log-odds).
Score = sigmoid(-0.044) = 0.489.
| Score | 0.457 |
|---|
| Score | 25 |
|---|
Run 1
The code lacks clear structure and readability. It starts mid-function with a dangling 'free(toFree)' and closing brace, suggesting fragmented presentation. Variable names are somewhat descriptive but the purpose of the linked-list operations is unclear without surrounding context. Nesting is shallow, but the logic is disjointed. There are commented-out debugging lines that add noise. Multiple actions are often combined on adjacent lines without clear separation of concerns. The static global variables 'fp' and 'ioc' are declared in the middle of the code, disrupting reading flow. Error handling is minimal and inconsistent. Overall, the snippet appears as a poorly organized excerpt from a larger system, making it difficult to follow intent or maintain.
Run 2
This code has severe readability issues. It begins abruptly mid-function, making the context unclear. The structure is tangled, mixing memory management, pointer manipulation, and initialization logic without clear separation. Nesting is not deeply problematic, but the flow is disorganized due to commented-out code and inconsistent formatting. Variable names like 'ioc', 'fp', and 'dummyLaunchConf' are somewhat opaque, reducing clarity of intent. The code length is not excessive, but it is unnecessarily fragmented across multiple physical lines for simple assignments, harming reading flow. Action granularity is inconsistent — some lines contain one action, while others are merged. The function 'cudaforward_init' lacks error handling for malloc failures before dereferencing, and the order of checks is unintuitive. Overall, the code requires significant effort to understand, with minimal adherence to clean coding practices.
Run 3
The code is highly unreadable due to several critical issues. It begins mid-function with an orphaned free() call and brace, lacking necessary context. The structure is tangled, mixing list manipulation logic with incomplete conditional blocks. No clear function boundaries or names are visible for the initial segment. The code uses inconsistent formatting, misaligned braces, and commented-out debug code that adds noise. Multiple statements are packed together without adequate spacing or comments explaining intent. The pointer manipulation logic (search->previous->next = search->next) lacks any verification context or error handling clarity. Variable names like 'ioc' and 'cfp' are cryptic. The initialization function mixes resource allocation with error checking in an unclear order. The overall flow is fragmented and difficult to follow, requiring significant mental effort to reconstruct the intended logic.
Run 1
Code Structure: Initialization and linked-list operations form recognizable blocks, but the fragment starts mid-function and mixes global declarations, prototypes, and initialization. Nesting: Mostly shallow, with straightforward conditionals and early returns. Clarity of intent: Names suggest CUDA forwarding and circular-list initialization, but abbreviations, unexplained globals, and commented-out logging obscure details. Allocation checks appear after pointer dereferences, making the intended failure-handling sequence confusing. Code length: Fairly concise, though repeated allocation and list setup add boilerplate, and inactive comments create clutter. Action granularity: Most lines perform a single action; split allocation expressions slightly interrupt readability. Reading flow: Generally sequential, but inconsistent spacing and indentation, abrupt fragment boundaries, and misplaced allocation checks reduce coherence.
Run 2
Code Structure: Registration, allocation, and linked-list initialization are grouped logically, but the excerpt starts mid-function and ends unfinished. Nesting: Mostly shallow, with simple conditionals and sequential assignments. Clarity of intent: Handler and configuration names suggest CUDA forwarding, but abbreviations, global state, and unexplained dummy list nodes obscure details. Code length: Fairly concise, though repeated initialization and commented-out logging add clutter. Action granularity: Generally one action per statement, making individual operations easy to follow. Reading flow: The main initialization sequence is understandable, but inconsistent spacing, awkward allocation line breaks, and abrupt transitions disrupt it. Checking allocation results only after dereferencing the pointers also makes the initialization order confusing and unsafe.
Run 3
Code Structure: Registration, allocation, and linked-list initialization form recognizable stages, but the fragment starts mid-function and includes unrelated declarations. Nesting: Mostly shallow, with straightforward conditionals. Clarity of intent: Handler and configuration names suggest CUDA forwarding setup, but abbreviated identifiers, undocumented sentinel nodes, and commented-out logging obscure details. Allocation checks occur after dereferences, making the intended error-handling sequence confusing. Code length: Fairly concise, though repeated allocation and initialization patterns and dead comments add clutter. Action granularity: Generally one operation per statement, supporting readability. Reading flow: The main initialization sequence is understandable, but inconsistent spacing, indentation, line breaks, and mixed NULL/0 conventions interrupt scanning. The unused-looking file pointer and parameter also distract from the active logic.