Sample
Dorn/cuda/75
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 34.0Δ 20.6 |
| Scalabrino | 0.235 | 0–1; higher is more readable | 15.9Δ 2.5 |
| Dorn | 0.612 | 0–1; higher is more readable | 52.6Δ 39.3 |
| Mi | 0.502 | 0–1; higher is more readable | 51.5Δ 38.2 |
| LLOC | 13 | Logical lines; fewer is more readable | 50.8Δ 37.5 |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs | 57.5Δ 44.2 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 67.0 |
| BTTF | 0.247 | 0–1; higher is more readable | 9.2Δ 4.2 |
| Human | 2.57 | 1–5; original rating | 13.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. | 1247.934 | −41.182 |
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| 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.277 | −7.915 |
Intercept 8.87 + feature contributions = -20.627 (log-odds).
Score = sigmoid(-20.627) = 0.
| Score | 0.235 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100.98 | +0.825 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| 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. | 100.96 | −0.611 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.912 | +0.274 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.093 | +0.038 |
Intercept 0.07 + feature contributions = 0.457 (log-odds).
Score = sigmoid(0.457) = 0.612.
| Score | 0.502 |
|---|
| Score | 13 |
|---|
Run 1
The code has a clear high-level structure with logical separation of updates for H and W, and the intent is generally discernible. However, readability is hampered by several factors: unclear variable names (n, m, r, WH, V, W, H), magic numbers and unexplained kernel launch parameters (gh, bh, gw, bw), and mixed abstraction levels—device matrix operations combined with raw kernel launches. The nesting is minimal and action granularity is mostly one step per line, which helps, but the reading flow is disrupted by the need to infer the meaning of variables and kernel configurations. The code is concise, but this brevity comes at the cost of clarity, as there are no comments explaining the algorithm's steps or the role of helper functions. Overall, it is understandable for domain experts but not immediately accessible to a general audience.
Run 2
The code has a clear sequential structure with reasonable separation of operations, but several factors reduce readability. It uses unclear variable names (V, W, H, WH, n, m, r, gh, bh, gw, bw) without context, making intent ambiguous. There is moderate nesting and multiple operations often occur on single lines (e.g., function calls with many arguments), reducing action granularity. The flow is somewhat natural, with comments separating major blocks, but cryptic kernel launch parameters and unexplained helper functions obscure the logic. The license header adds length but is not part of the core logic. Overall, the code is understandable to someone familiar with CUDA and matrix factorization, but lacks self-documenting naming and clean separation of concerns.
Run 3
The code has clear structure and reasonable naming, with distinct logical blocks for updating H and W matrices. The license header is properly separated. Function names are descriptive and intent is mostly clear for domain experts. However, several issues reduce readability: magic variables like 'gh', 'bh', 'gw', 'bw' lack context, CUDA kernel launch syntax adds complexity, and the code assumes deep familiarity with GPUMLib conventions. Nesting is minimal and action granularity is good, but the reading flow is disrupted by mixed abstraction levels - domain operations are interleaved with low-level GPU kernel configuration. The code is concise but at the cost of explicitness for non-domain readers.
Run 1
Code Structure: The function is logically organized into clearly marked H and W update phases. Nesting: An early return avoids nested conditionals, keeping the implementation flat. Clarity of intent: Descriptive operation names and phase comments communicate the overall purpose, but terse matrix dimensions and launch parameters (n, m, r, gh, bh, gw, bw) require domain knowledge. Code length: The function is concise; the lengthy license header is standard boilerplate rather than unnecessary implementation complexity. Action granularity: Most lines perform one operation, although long CUDA calls contain many positional arguments and the conditional return shares a line. Reading flow: Execution proceeds naturally from dimensions through H updates to optional W updates, with whitespace separating phases. The placement of quality evaluation and the shared sum buffer's changing role are not explained.
Run 2
Code Structure: The function is logically divided into clearly labeled H and W update phases. Nesting: An early return keeps control flow flat and easy to follow. Clarity of intent: The function name, updateW flag, and phase comments communicate the overall purpose, but abbreviated matrix names, launch parameters, and the unexplained false argument require domain knowledge. Code length: The implementation is concise, with little unnecessary code; the lengthy license header adds visual bulk but is separate from the logic. Action granularity: Most lines perform one action, although the inline conditional return slightly compresses control flow. Reading flow: Consistent formatting and sequential operations make execution easy to trace, while long kernel calls with many positional arguments slow comprehension.
Run 3
Code Structure: The function is logically organized into H and W updates, clearly separated by comments. Nesting: An early return avoids nested conditionals and keeps execution flat. Clarity of intent: The function name, update comments, and matrix operations communicate its purpose, although short identifiers such as n, m, r, gh, and bh require domain knowledge. Code length: The implementation is concise; the lengthy license header adds visual bulk but is conventional. Action granularity: Statements generally perform one action each, though kernel launches contain long argument lists. Reading flow: Execution follows a natural sequence from dimension extraction through H updating to optional W updating. The unexplained quality-improvement call and opaque launch parameters slightly interrupt comprehension.