Sample

Dorn/cuda/94

Human rating uses the original dataset scale.

DatasetDorn
Human3.01
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
5.3Δ 24.8
Scalabrino0.5560–1; higher is more readable
51.6Δ 21.5
Dorn0.170–1; higher is more readable
12.8Δ 17.3
Mi0.1210–1; higher is more readable
12.4Δ 17.7
LLOC28Logical lines; fewer is more readable
15.2Δ 14.9
DeepSeek V4 Pro60–20; mean of three runs
15.3Δ 14.8
GPT-6.1 Sol12.330–20; mean of three runs
24.4Δ 5.7
BTTF0.2920–1; higher is more readable
15.0Δ 15.0
Human3.011–5; original rating
30.1

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.2697.078−89.004
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.183−7.774

Intercept 8.87 + feature contributions = -67.908 (log-odds).
Score = sigmoid(-67.908) = 0.

Score0.556

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.221−1.21
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.114.922−1.202
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.114.98+1.051
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.51−0.769
Indentation frequencyHow rapidly indentation changes from line to line.43+0.75
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.43−0.566
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.922+0.288

Intercept 0.07 + feature contributions = -1.589 (log-odds).
Score = sigmoid(-1.589) = 0.17.

Score0.121
Score28
Run 1

The code suffers from several readability issues. The structure is disjointed, with commented-out includes, a stray '#endif' without a matching '#if', and macros defined before includes. Nesting is minimal but the code lacks clear sections. Intent is somewhat clear for the matrix setup but obscured by poor naming and incomplete context. The function is moderately concise but contains repeated, densely packed matrix assignments that violate one-action-per-line. Action granularity is inconsistent—some lines perform multiple assignments, making them hard to scan. Reading flow is disrupted by commented directives and inconsistent spacing. Use of raw pointers and manual memory management without RAII adds cognitive load. While mathematically straightforward, formatting and structural issues make it hard to follow. Overall, the code is below average in readability, requiring effort to parse and verify.

Run 2

The code suffers from severe readability issues. It lacks logical structure, mixing preprocessor directives, includes, and function definitions without clear organization. The set_inViewMatrix function is particularly problematic: it performs multiple operations (rotation, scaling, translation matrix construction) with unclear variable naming (mat_44, reg_mat_44_mul, m) and no explanatory comments. Multiple actions are crammed onto single lines (e.g., matrix assignment lines combining 3 operations each). The commented-out includes create confusion about dependencies. Memory management is scattered with repeated calloc/free patterns that could be structured better. No error handling or parameter validation exists. The function name suggests setting a view matrix but the implementation details are opaque without domain knowledge. The trailing #endif without matching #ifdef is syntactically suspicious. Overall, the code requires significant mental effort to understand its purpose and flow, fails to follow clean code principles, and would benefit from decomposition into smaller, well-named functions with clear responsibility separation.

Run 3

The code has some organizational issues. The structure is somewhat fragmented with commented-out includes and scattered macros. Nesting is reasonable but the set_inViewMatrix function has multiple sequential operations without clear logical grouping. Intent is partially clear for the matrix setup, but the use of raw pointer arithmetic and magic numbers (indices 0-11) obscures meaning. The function is unnecessarily long for what it does, with repeated matrix element assignments that could be looped or better structured. Action granularity is inconsistent - some lines contain multiple operations while others are single statements. Reading flow suffers from the mixing of matrix operations without clear separation, and the cleanup section at the end feels abrupt. The code is functional but not particularly readable or maintainable.

Run 1

Code Structure: The function is organized into rotation, scaling, transformation, translation, and cleanup stages, but commented-out includes and an unmatched #endif distract from that organization. Nesting: The code is flat and easy to follow, with no deeply nested control flow. Clarity of intent: Stage comments and detector parameter names convey the general purpose, while abbreviated names, unexplained matrix indices, and inconsistent naming obscure details. Code length: The snippet is fairly short, though temporary heap allocations and repetitive assignments add avoidable verbosity. Action granularity: Most lines perform one action, but several matrix-copy lines pack three assignments together, reducing scanability. Reading flow: Operations proceed naturally from matrix construction to cleanup, but inconsistent spacing, compressed expressions, and stray preprocessor content interrupt the flow.

Run 2

Code Structure: Functions are separated, and comments divide matrix construction into logical stages, but the unexplained trailing #endif and commented-out includes disrupt organization. Nesting: Very flat, with no deeply nested control flow. Clarity of intent: Rotation, scaling, and translation are recognizable, but abbreviated names such as m and iDivUp, inconsistent naming, and unexplained matrix indices require interpretation. Code length: Reasonably short, although heap allocation and cleanup for temporary matrices add verbosity. Action granularity: Several matrix assignments share single lines, reducing scanability. Reading flow: Operations follow a natural sequence from initialization through transformation to cleanup, but inconsistent spacing, dense assignments, and stray preprocessing clutter interrupt the flow.

Run 3

Code Structure: Helper and matrix setup functions are separated, and comments divide the main function into logical stages, but unused macros, commented-out includes, and an unmatched #endif add clutter. Nesting: The code is flat, with no deeply nested control flow. Clarity of intent: Rotation, scaling, and translation are recognizable, but abbreviated names, unexplained matrix indices, and inconsistent naming obscure details. Code length: The implementation is reasonably short, although repeated matrix assignments and allocation/cleanup boilerplate reduce concision. Action granularity: Several lines combine three assignments, making individual operations harder to scan. Reading flow: The transformation stages follow a natural sequence, but inconsistent spacing, compact formatting, and stray preprocessor content interrupt readability.