Sample
Dorn/cuda/50
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 23.7Δ 22.0 |
| Scalabrino | 0.542 | 0–1; higher is more readable | 50.4Δ 48.7 |
| Dorn | 0.305 | 0–1; higher is more readable | 24.0Δ 22.3 |
| Mi | 0.164 | 0–1; higher is more readable | 16.7Δ 15.0 |
| LLOC | 30 | Logical lines; fewer is more readable | 11.4Δ 9.7 |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs | 20.9Δ 19.2 |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs | 27.3Δ 25.6 |
| BTTF | 0.385 | 0–1; higher is more readable | 21.7Δ 20.1 |
| Human | 1.73 | 1–5; original rating | 1.7 |
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. | 1290.512 | −42.587 |
| 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. | 3.706 | −5.56 |
Intercept 8.87 + feature contributions = -27.276 (log-odds).
Score = sigmoid(-27.276) = 0.
| Score | 0.542 |
|---|
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 |
| 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 |
| 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. | 79 | +0.319 |
| 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. | 25.125 | −0.059 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.018 |
Intercept 0.07 + feature contributions = -0.822 (log-odds).
Score = sigmoid(-0.822) = 0.305.
| Score | 0.164 |
|---|
| Score | 30 |
|---|
Run 1
The code is extremely repetitive with very low clarity of intent. While it follows a consistent mathematical pattern (looks like tensor/matrix assembly for FEM or spline evaluation), the variable names like Tx_x, Ty_z, nodeCoefficient, and xBasis.w are cryptic without domain context. The indentation is excessive, suggesting deeper nesting upstream, and reading flow is disorganized due to the repetitive structure and unclear grouping. Action granularity is adequate (one operation per line), but the code length is unnecessarily long for what could likely be expressed as loops or function calls over spatial dimensions. The lack of comments, whitespace grouping, or abstraction makes it hard to verify correctness or understand the underlying math at a glance. Nesting appears flat here, but surrounding context is unknown. Overall, the code is maintainable only by someone deeply familiar with the specific numerical method.
Run 2
This code exhibits poor readability. It is a dense, repetitive block with no comments, whitespace separation, or structural organization to explain the mathematical operations. The variable names (Tx_x, Tz_y, etc.) are terse and cryptic, making intent difficult to infer. Multiple related operations are chained on separate lines but without grouping, creating a monotonous, hard-to-scan block. The pattern of assignments is highly repetitive but not abstracted into any helper function or loop, inflating code length. Lines do combine distinct operations (fetch, multiply, accumulate), so action granularity is not cleanly one action per line. The logical flow is disorganized—interleaving texture fetches with arithmetic—and the deep reliance on GPU intrinsics like tex1Dfetch further reduces clarity for readers unfamiliar with CUDA. While the code may be mathematically efficient for GPU execution, its readability suffers greatly from lack of explanatory structure, naming, or decomposition.
Run 3
The code is highly repetitive and has poor readability. It lacks structure, with no functions, comments, or logical grouping to explain the math. The nesting is minimal but the flat repetition makes it confusing. Intent is ambiguous without context; variables like 'basis', 'tempBasis', 'nodeCoefficient' are cryptic. While individual lines are concise, the block is unnecessarily long due to copy-paste of nearly identical operations. Action granularity is acceptable (one arithmetic operation per line), but the reading flow is disorganized—similar operations (x, y, z components) are interleaved without clear pattern or separation. The use of raw floating-point accumulates with '+=' and unclear names further hinders comprehension. Overall, the code requires significant domain knowledge to parse and would benefit from abstraction, naming improvements, or comments.
Run 1
Code Structure: Related calculations follow consistent groups, but missing visual separation and a partial starting block weaken organization. Nesting: The snippet is flat, with no nested control flow, although excessive indentation adds visual clutter. Clarity of intent: Names such as displacement and nodeCoefficient suggest numerical accumulation, but Tx_x-style identifiers and undocumented basis changes obscure the mathematical purpose. Code length: Repeated component updates make the snippet verbose; helper functions or vector operations could reduce duplication. Action granularity: Each line performs one assignment or accumulation, making individual steps easy to inspect. Reading flow: The repeated basis-then-update pattern is predictable, but dense formatting, inconsistent operator spacing, and the unexplained texture fetch interrupt comprehension.
Run 2
Code Structure: Calculations follow consistent groups for displacement and derivative accumulation, but lack visual separation or abstraction. Nesting: The excerpt is flat, with no nested control flow; its heavy indentation adds visual clutter. Clarity of intent: Names such as displacement and nodeCoefficient help, but Tx_x, xFirst, and tempBasis require domain knowledge, and the opening line depends on omitted context. Code length: Repeated component-wise operations make the snippet verbose, although the repetition is predictable. Action granularity: Each line performs one assignment or accumulation, making individual operations easy to inspect. Reading flow: The repeated basis-then-accumulate pattern is orderly, but dense formatting, missing explanatory comments, and minimal spacing around operators make scanning harder.
Run 3
Code Structure: Repeated basis calculations followed by component updates form consistent logical groups, but missing visual separation makes them harder to scan. Nesting: The snippet is flat, with no nested control flow. Clarity of intent: Displacement accumulation is recognizable, but abbreviated derivative names and unexplained basis relationships require domain knowledge. Code length: Explicit repetition makes the snippet longer than an abstraction might, though it may reflect intentional optimization. Action granularity: Each line performs one assignment or accumulation, making individual operations easy to follow. Reading flow: The repeated sequence is predictable, but dense formatting, excessive indentation, and the opening mid-calculation reduce readability.