Sample
Dorn/cuda/112
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 7.0Δ 5.6 |
| Dorn | 0.415 | 0–1; higher is more readable | 34.0Δ 21.4 |
| Mi | 0.422 | 0–1; higher is more readable | 41.5Δ 29.0 |
| LLOC | 38 | Logical lines; fewer is more readable | 2.9Δ 9.6 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 18.1Δ 5.6 |
| GPT-6.1 Sol | 8 | 0–20; mean of three runs | 3.2Δ 9.3 |
| BTTF | 0.13 | 0–1; higher is more readable | 2.5Δ 10.0 |
| Human | 2.53 | 1–5; original rating | 12.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. | 2608.622 | −86.085 |
| 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. | 5.138 | −7.708 |
Intercept 8.87 + feature contributions = -64.922 (log-odds).
Score = sigmoid(-64.922) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.21 | −1.096 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 46 | +0.854 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 46 | −0.635 |
| 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. | 72.961 | +0.575 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 72.98 | +0.373 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.757 | +0.286 |
Intercept 0.07 + feature contributions = -0.343 (log-odds).
Score = sigmoid(-0.343) = 0.415.
| Score | 0.422 |
|---|
| Score | 38 |
|---|
Run 1
The code exhibits poor readability due to several significant issues. The function contains cryptic variable names (sp1, sp2, if1, if2) without explanation, making intent unclear. There's inconsistent brace style - some opening braces are on new lines while others are on the same line as conditionals. The code includes commented-out code and unclear comments with alternative calculations. The variable initialization logic is convoluted with static variables serving as state flags. The parallel array access pattern (x[n+2*n_bin*m]) is opaque without documentation. There's an incomplete if-else structure in the ymin/ymax section with nested loops having inconsistent indentation. The code mixes concerns: reallocation, plotting setup, and data range calculation in one function. The ternary operators and inline conditionals compress multiple actions per line. Missing explanatory comments for the PGPLOT calls and channel mapping make the domain logic hard to follow. The abbreviation-heavy naming and lack of documentation for the data format significantly reduce clarity.
Run 2
The code has several readability issues. While there's some logical organization with comments and section separation, the implementation is tangled. The function uses static variables creating hidden state, making it hard to track execution flow. Nesting is moderate but the conditional assignments and min/max calculation loops add cognitive load. Variable names like 'n_bin', 'po', 'n_chan' are cryptic without context. Several lines contain multiple operations per line. Comments are sparse and some appear commented out, suggesting unfinished work. The action granularity is inconsistent - some lines are clean while others pack multiple actions. The reading flow is disrupted by the static variable initialization block mixing concerns. The missing closing braces in the provided snippet also indicate potential structural issues. The code would benefit from breaking into smaller functions, eliminating magic numbers, and using more descriptive variable names.
Run 3
The code suffers from multiple readability issues. Structure is tangled with static variables creating hidden state. Variable names are cryptic (n, m, echan, bchan, po) with no clear semantic meaning. Nesting is moderately deep in the min/max calculation loop. Intent is unclear - the function's purpose and data flow are difficult to discern. Several commented-out lines suggest incomplete refactoring. Action granularity is inconsistent, with multiple operations packed onto single lines using ternary operators. The conditional assignments for bchan/echan could be clearer. Magic numbers and implicit type conversions add confusion. While the code is relatively concise, it sacrifices clarity for brevity. No meaningful comments explain the algorithm or data structure layout (the x[n+2*n_bin*m] indexing is particularly opaque). The function mixes plotting setup, data processing, and memory management responsibilities without clear separation.
Run 1
Code Structure: Setup, range calculation, and plotting form recognizable stages, but persistent state and initialization logic are intertwined. Nesting: Mostly shallow, though compressed nested loops and conditionals obscure block boundaries. Clarity of intent: Plotting calls suggest the purpose, but terse names, unexplained indexing arithmetic, and magic values make details difficult to understand. Code length: Fairly concise, but commented-out code adds clutter and some brevity sacrifices clarity. Action granularity: Several lines contain multiple assignments, branches, or loops, making individual operations harder to follow. Reading flow: Inconsistent spacing, indentation, and brace placement interrupt scanning. The snippet also ends mid-block, limiting understanding of the complete function.
Run 2
Code Structure: Setup, initialization, range calculation, and plotting are grouped logically, but static state and obsolete commented-out code obscure organization. Nesting: Depth is moderate, yet compressed conditionals and nested loops make block boundaries difficult to follow. Clarity of intent: PGPLOT calls suggest a plotting routine, but abbreviated names, undocumented indexing arithmetic, and the inconsistent n_chan comparison and assignment obscure intent. Code length: Fairly concise, though dead comments add clutter and excessive compression reduces readability. Action granularity: Several lines combine assignments, branches, or loops rather than presenting one action per line. Reading flow: Inconsistent spacing, indentation, and brace placement interrupt scanning; the snippet also ends mid-loop, preventing assessment of the complete function.
Run 3
Code Structure: Initialization, range calculation, and plotting are grouped logically, but persistent state and plotting setup are mixed, and the snippet is incomplete. Nesting: Depth is moderate, although compressed nested loops and inline conditionals obscure block boundaries. Clarity of intent: PGPLOT calls suggest spectrum plotting, but terse names, unexplained indexing arithmetic, and inconsistent channel-count handling make details difficult to understand. Code length: Fairly concise, but obsolete commented-out calls add clutter, while excessive compression reduces readability. Action granularity: Several lines combine assignments, conditional branches, or loop headers rather than presenting one action per line. Reading flow: The broad progression is understandable, but inconsistent spacing, brace placement, and indentation interrupt scanning; the unfinished plotting loop prevents understanding the complete operation.