Sample
Dorn/cuda/117
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 44.6Δ 16.7 |
| Dorn | 0.362 | 0–1; higher is more readable | 29.2Δ 1.4 |
| Mi | 0.008 | 0–1; higher is more readable | 2.5Δ 25.3 |
| LLOC | 18 | Logical lines; fewer is more readable | 38.4Δ 10.6 |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs | 27.2Δ 0.7 |
| GPT-6.1 Sol | 10 | 0–20; mean of three runs | 10.2Δ 17.7 |
| BTTF | 0.267 | 0–1; higher is more readable | 12.0Δ 15.9 |
| Human | 2.96 | 1–5; original rating | 27.9 |
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. | 797.685 | −26.324 |
| 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. | 4.827 | −7.241 |
Intercept 8.87 + feature contributions = -12.694 (log-odds).
Score = sigmoid(-12.694) = 0.
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. | 124 | −1.587 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116 | +1.067 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.072 | +0.24 |
| 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.928 | +0.009 |
Intercept 0.07 + feature contributions = -0.567 (log-odds).
Score = sigmoid(-0.567) = 0.362.
| Score | 0.008 |
|---|
| Score | 18 |
|---|
Run 1
The code shows some readable patterns like consistent one-action-per-line updates and logical grouping by axis (X, Y, Z), but overall readability suffers from poor structure. The nested loops are deeply indented, and the closing braces lack context comments or names to identify which loop they end. Variable names like 'temp', 'commonValue', 'resDeriv', and 'jointLog' convey little meaning without surrounding context. The mixed indentation (tabs/spaces) adds confusion. The gradient computation at the end is reasonably clear, but the preceding block of repeated operations feels redundant and could be refactored into a loop or function. The commented-out normalization line and the random blank lines disrupt reading flow. The code's intent—computing NMI gradient contributions—is partially discernible, but the lack of abstractions and excessive repetition reduce clarity. Action granularity is good, but the structure and naming prevent a higher score.
Run 2
The code follows a consistent pattern with one action per line, which aids readability. The three coordinate blocks (X, Y, Z) are clearly parallel and easy to compare. However, the code loses points for inconsistent indentation and multiple nested closing braces without clear context, making the structure hard to follow. The variable names are descriptive but somewhat verbose, and the use of 'temp' as a reusable variable obscures intent. The mathematical operations are clear, but the surrounding control flow is unclear from the snippet, and the comment placement disrupts the natural reading flow. Overall, the core logic is understandable, but the presentation and structural clarity need improvement.
Run 3
The code has several readability issues. The nesting is deep, reaching multiple levels, making it hard to follow the logic. The variable names are long and repetitive, but the main issue is the tangled structure with unexplained magic numbers and unclear purpose. The code lacks comments explaining the mathematical operations or the significance of the entropy derivatives. The action granularity is inconsistent - some lines do too much while others are sparse. The disorganized indentation and commented-out code fragments add confusion. There's no clear separation of concerns, and the reading flow is disrupted by blocks of similar operations without context. The single-letter variable 'r' and 't' in comments are ambiguous. Overall, while variable names are descriptive in some cases, the structure and lack of comments make this very difficult to understand without deep domain knowledge.
Run 1
Code Structure: Derivative updates are logically grouped by axis, followed by gradient calculation, but the partial snippet and unmatched opening context obscure the overall structure. Nesting: Numerous closing braces and heavy indentation indicate deep nesting, making scope difficult to follow. Clarity of intent: Descriptive entropy-derivative names and the normalization comment help, while generic names such as temp and terse loop comments reduce clarity. Code length: The snippet is reasonably short, but nearly identical X/Y/Z calculations introduce repetition. Action granularity: Each statement performs one clear assignment or update, supporting readability. Reading flow: The axis-by-axis progression is predictable, but inconsistent indentation, spacing, and the abrupt transition through closing scopes disrupt the flow.
Run 2
Code Structure: Derivative updates are logically grouped by axis, followed by gradient calculation and storage, but the partial context and inconsistent formatting weaken organization. Nesting: Numerous closing braces and heavy indentation indicate deep nesting, making scope difficult to follow. Clarity of intent: Descriptive derivative names and the normalization comment help, while generic names such as temp and unexplained constants obscure mathematical meaning. Code length: The snippet is reasonably short, though repeated X/Y/Z calculations add verbosity. Action granularity: Each statement performs one operation, supporting readability. Reading flow: Parallel axis calculations provide a predictable pattern, but uneven indentation, inconsistent spacing, long expressions, and cryptic closing-brace comments interrupt the flow.
Run 3
Code Structure: Derivative updates are logically grouped by coordinate, followed by gradient calculation and storage, but the fragment starts mid-block. Nesting: Deep indentation and numerous closing braces make the surrounding control flow difficult to follow. Clarity of intent: Descriptive derivative names and the normalization comment help, while generic variables such as temp and unexplained constants obscure meaning. Code length: The snippet is reasonably short, though repeated coordinate-specific operations add redundancy. Action granularity: Each line generally performs one assignment or update, making individual operations easy to inspect. Reading flow: Parallel calculations provide a predictable rhythm, but inconsistent indentation, spacing, long expressions, and cryptic closing-brace comments interrupt readability.