Sample
Dorn/cuda/8
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.044 | 0–1; higher is more readable | 71.9Δ 21.2 |
| Scalabrino | 0.474 | 0–1; higher is more readable | 38.4Δ 54.7 |
| Dorn | 0.384 | 0–1; higher is more readable | 31.2Δ 61.8 |
| Mi | 0.506 | 0–1; higher is more readable | 52.4Δ 40.7 |
| LLOC | 7 | Logical lines; fewer is more readable | 67.7Δ 25.3 |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs | 42.9Δ 50.1 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 93.5Δ 0.4 |
| BTTF | 0.4 | 0–1; higher is more readable | 24.0Δ 69.1 |
| Human | 4.05 | 1–5; original rating | 93.0 |
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. | 266.89 | −8.807 |
| 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.759 | −7.138 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -3.075 (log-odds).
Score = sigmoid(-3.075) = 0.044.
| Score | 0.474 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 9 | +0.718 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 77 | +0.404 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.769 | −0.273 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 10 | +0.191 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.076 |
Intercept 0.07 + feature contributions = -0.473 (log-odds).
Score = sigmoid(-0.473) = 0.384.
| Score | 0.506 |
|---|
| Score | 7 |
|---|
Run 1
The code shows moderate structure but suffers from several readability issues. It uses inconsistent indentation (tab before d_localGradient), mixes variable declarations and operations, and lacks clear separation between logical sections. Variable names are cryptic (dimNeuronsPatterns, sharedMemFire) without context, making intent ambiguous. Nesting is flat, which is positive, and action granularity is mostly one action per line. However, reading flow is disorganized due to abrupt transitions between memory allocation and dimension setup. Code length is acceptable but explanation of what each variable represents would improve clarity. The mathematical expressions (neurons * patterns) lack explanatory comments. Overall, it reads like extracted code fragments without surrounding context, making it hard to follow the purpose.
Run 2
The code fragment shows moderate readability with several issues. It lacks context, making intent unclear—variables like 'd_localGradient', 'sharedMemFire', and dimensions are declared without explanation. The structure is somewhat logical but disorganized due to inconsistent formatting and unexplained spacing. Nesting is flat, which is good. However, there are multiple actions per line in some cases (e.g., memory calculations and dimension assignments), reducing clarity. Action granularity is mixed—some lines do one thing, others combine related computations. The reading flow is disjointed because of blank lines and missing comments or grouping. Concise but not self-documenting, the code relies heavily on external knowledge of the algorithm and naming conventions.
Run 3
The code shows reasonable modularity but lacks context and clarity. It begins abruptly with a method call on 'd_localGradient' and then mixes variable assignments related to memory and dimensions without explanation. Naming is partially clear (e.g., sharedMemFire, dimNeuronsPatterns) but some variables like 'cudafloat' or 'connections' are vague without surrounding context. The action granularity is mostly one statement per line, which is good, and the structure is flat. However, the reading flow is disjointed because variables are grouped by type rather than by logical functionality, making the intent hard to infer. The code is concise but sacrifices clarity by omitting comments or grouping related operations together. Overall, it is moderately readable but would benefit from better organization and explanatory context.
Run 1
Code Structure: Statements are logically grouped into buffer allocation, shared-memory sizing, and dimension setup. Nesting: The code is entirely flat and easy to scan. Clarity of intent: Descriptive variable names make the setup purpose clear, though the meaning of 'neurons + 1' is unexplained. Code length: The snippet is concise, without unnecessary statements. Action granularity: Each line performs a single allocation or assignment. Reading flow: Blank lines separate related operations naturally; minor whitespace inconsistencies and limited contextual explanation slightly reduce readability.
Run 2
Code Structure: Logically grouped into gradient allocation, shared-memory sizing, and dimension configuration. Nesting: Completely flat, making it easy to scan. Clarity of intent: Descriptive variable and method names convey most purposes, though the meaning of the '+ 1' and the relationship between connections and dimensions require context. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one clear assignment or operation. Reading flow: Blank lines separate related operations naturally; minor whitespace inconsistencies do not materially hinder readability.
Run 3
Code Structure: Logically groups buffer resizing, shared-memory sizing, and dimension initialization. Nesting: Completely flat, making it easy to scan. Clarity of intent: Descriptive identifiers convey most purposes, though the neurons + 1 calculation and meaning of sharedMemFire lack context. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one distinct operation. Reading flow: Natural progression with blank lines separating related tasks; slightly inconsistent whitespace is a minor distraction.