Sample

Dorn/cuda/41

Human rating uses the original dataset scale.

DatasetDorn
Human4.04
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0190–1; higher is more readable
69.9Δ 22.8
Scalabrino0.8040–1; higher is more readable
87.6Δ 5.2
Dorn0.8090–1; higher is more readable
78.6Δ 14.2
Mi0.6730–1; higher is more readable
76.3Δ 16.4
LLOC8Logical lines; fewer is more readable
63.9Δ 28.8
DeepSeek V4 Pro16.330–20; mean of three runs
87.9Δ 4.9
GPT-6.1 Sol180–20; mean of three runs
93.5Δ 0.7
BTTF0.6220–1; higher is more readable
79.1Δ 13.6
Human4.041–5; original rating
92.8

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.527.332−17.402
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.942−7.413

Intercept 8.87 + feature contributions = -3.945 (log-odds).
Score = sigmoid(-3.945) = 0.019.

Score0.804

Feature contributions

FeatureValueContribution
(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.54.968+1.337
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.15−0.517
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.24+0.093
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.55+0.083
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.30−0.026
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.571+0.004

Intercept 0.07 + feature contributions = 1.441 (log-odds).
Score = sigmoid(1.441) = 0.809.

Score0.673
Score8
Run 1

The code is clean and readable. It has a clear, logical structure with minimal nesting and one action per line. Intent is well-documented in comments, and the error handling is straightforward, though both functions share identical logic apart from the mode string. Minor improvements: extracting duplicate logic into a helper or using a wrapper macro would reduce duplication. The consistent styling and flat control flow make it easy to follow.

Run 2

The code is highly readable with clear structure and purpose. Functions are well-separated, each handling a single file opening task. Comments are concise and explain the intent clearly. Nesting is minimal with only one level of if-statements. The code is appropriately concise without unnecessary verbosity. Each line contains a single action, improving clarity. Reading flow is natural and logical. Minor improvements could include more descriptive error messages distinguishing between read/write failures and potential refactoring to avoid duplicate code, but overall this is clean, maintainable code.

Run 3

The code is generally clear and well-structured. It separates file opening into two functions with descriptive names, uses consistent formatting, and includes helpful comments. The nesting is minimal (single if statements), and each line performs a distinct action. However, there are a few minor readability issues: the functions duplicate logic (which could be merged into a single helper), the comment placement is somewhat verbose for simple operations, and the parameter naming (ifp/ofp) is slightly terse though understandable in context. The error handling is straightforward but could be more informative by including errno. Overall, the code is easy to follow, maintain, and understand.

Run 1

Code Structure: Two small, logically separated functions clearly organize input and output file handling, though their error-handling logic is duplicated. Nesting: Each function has only one conditional level, making control flow easy to follow. Clarity of intent: Descriptive function names, familiar file modes, and explicit error messages make the purpose clear; abbreviated pointer names are slightly less descriptive. Code length: The code is concise, although comments largely repeat what the function names and statements already communicate. Action granularity: Most lines perform one action, but each conditional combines opening the file, assigning the pointer, and checking for failure. Reading flow: Consistent formatting and parallel function layouts create a natural, predictable reading sequence.

Run 2

Code Structure: Two clearly separated functions organize input and output handling logically, though their error-handling logic is duplicated. Nesting: Each function has only one conditional level, making control flow easy to follow. Clarity of intent: Descriptive function and parameter names, explicit file modes, and straightforward error messages communicate purpose clearly; comments mostly repeat the code. Code length: Both functions are short, with little unnecessary content beyond redundant comments. Action granularity: Most lines perform one action, but assigning the file pointer inside the conditional combines assignment and comparison, slightly reducing readability. Reading flow: Consistent formatting and parallel function structure make the code natural to scan.

Run 3

Code Structure: Two small, clearly separated functions organize input and output file handling logically. Nesting: Each function has only one conditional level, making control flow easy to follow. Clarity of intent: Descriptive function and parameter names, explicit file modes, and straightforward error handling communicate purpose well; comments are clear but mostly redundant. Code length: The code is concise, though the functions duplicate nearly identical logic. Action granularity: Most lines perform one action, but embedding assignment and comparison within each if condition slightly increases reading effort. Reading flow: Consistent formatting and a natural open-check-report-exit sequence make both functions easy to scan.