Sample
Dorn/cuda/119
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 40.7Δ 18.9 |
| Scalabrino | 0.633 | 0–1; higher is more readable | 66.3Δ 6.7 |
| Dorn | 0.424 | 0–1; higher is more readable | 34.5Δ 25.1 |
| Mi | 0.901 | 0–1; higher is more readable | 100.0Δ 40.4 |
| LLOC | 14 | Logical lines; fewer is more readable | 49.0Δ 10.6 |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs | 69.9Δ 10.3 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 6.4 |
| BTTF | 0.485 | 0–1; higher is more readable | 41.2Δ 18.4 |
| Human | 3.45 | 1–5; original rating | 59.6 |
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. | 878.887 | −29.003 |
| 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.838 | −7.257 |
Intercept 8.87 + feature contributions = -15.39 (log-odds).
Score = sigmoid(-15.39) = 0.
| Score | 0.633 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.179 | −0.802 |
| 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.903 | +0.366 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 27 | −0.199 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 57.129 | +0.117 |
| 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.595 | +0.004 |
Intercept 0.07 + feature contributions = -0.308 (log-odds).
Score = sigmoid(-0.308) = 0.424.
| Score | 0.901 |
|---|
| Score | 14 |
|---|
Run 1
The code is generally readable but has some issues. The functions have clear purposes and basic structure is logical, with straightforward loops and one primary action per line. However, there are notable problems: a stray comment terminator `*/` at the top suggests copy-paste errors. Variable names are cryptic (`h_o`, `h_h`, `ppc`) and lack explanatory context. The indexing arithmetic like `m*ppc/2 + i` in trim_spectrum is potentially buggy and difficult to follow—off-by-one risks exist due to the `<=` in loops and unclear buffer sizing. Nesting is flat (two levels), which is good. The functions are concise but could benefit from comments explaining the data layout or precomputing `ppc/2`. Overall, it's readable enough for someone familiar with signal processing conventions, but the naming and index calculations reduce clarity for general audiences.
Run 2
The code is fairly readable due to clear function names, consistent indentation, and simple loops. The structure is logical, with one primary action per function. Nesting is shallow (two levels), aiding comprehension. However, the intent of operations like `ppc = bins/channels` and the off-by-one boundary `i <= ppc/2` is not immediately obvious without domain knowledge. Variables like `h_o` and `h_h` are cryptic. The output writing in `write_data` mixes data and formatting (blank line after each channel), which slightly obscures the goal. `trim_spectrum` has a potentially confusing index calculation `m*ppc/2 + i` for the destination array. Length is concise, but a comment explaining the meaning of `ppc` and why only half the bins are used would improve clarity. Overall, readable but somewhat ambiguous in intent.
Run 3
The code is fairly readable: functions are short, loops are straightforward, and the intent is partially documented. However, several issues reduce clarity. The repeated expression `bins/channels` and the offset calculations (`m*ppc + i`, `m*ppc/2 + i`) are error-prone and could be precomputed or explained. The loop condition `i <= ppc/2` is ambiguous — it likely causes an off-by-one error or includes one extra element. Comments are incomplete, and the leading `*/` fragment in the first function suggests a missing opening comment. The functions lack error handling and a broader context, making the data layout harder to follow. Nesting is only two levels, which is good. Action granularity is mostly one operation per line, and flow is natural. Overall, the code is understandable but would benefit from clearer variable names, consistent comments, and explicit handling of edge cases.
Run 1
Code Structure: Two small, separate functions are logically organized around writing and trimming spectrum data. Nesting: Two loop levels are straightforward and appropriate for channel-based processing. Clarity of intent: Function names and the trimming comment communicate the overall purpose, but abbreviations such as ppc, h_o, and h_h obscure data roles. The inclusive half-spectrum bounds and destination indexing are not explained, making boundary behavior harder to understand. Code length: Both functions are concise without unnecessary scaffolding. Action granularity: Each statement performs a single clear action. Reading flow: Consistent indentation and predictable loops make the code easy to follow, although tight arithmetic spacing reduces readability slightly. The leading orphaned comment terminator makes the excerpt appear incomplete.
Run 2
Code Structure: Two small, logically separated functions organize output and spectrum trimming clearly. Nesting: Two levels of loops are appropriate for channel-wise processing and easy to follow. Clarity of intent: Function names and the trimming comment convey purpose, but abbreviated identifiers such as ppc, h_o, and h_h obscure meaning. The inclusive half-spectrum bounds and destination indexing deserve explanation, particularly concerning endpoint handling and channel layout. Code length: Both functions are concise without unnecessary scaffolding. Action granularity: Each statement performs a single primary action, although indexing arithmetic takes some effort to parse. Reading flow: Consistent formatting and straightforward loops support natural reading; spaces around arithmetic operators would improve scanning. The leading unmatched comment terminator makes the excerpt appear incomplete.
Run 3
Code Structure: Two small, separate functions organize output and spectrum trimming logically. Nesting: Two nested loops are straightforward and shallow enough to follow easily. Clarity of intent: Function names and the trimming comment communicate purpose, but abbreviated identifiers such as ppc, h_o, and h_h obscure data roles. The inclusive loop bounds and packed destination indexing also leave the intended half-spectrum layout unclear. Code length: Both functions are concise, with little unnecessary code. Action granularity: Each statement performs a single main action. Reading flow: Consistent indentation and simple loop progression make execution easy to trace, although tight arithmetic spacing reduces readability slightly. The leading unmatched comment terminator makes the excerpt look incomplete.