Sample
Dorn/cuda/95
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 21.2Δ 15.6 |
| Scalabrino | 0.704 | 0–1; higher is more readable | 77.1Δ 40.4 |
| Dorn | 0.416 | 0–1; higher is more readable | 34.3Δ 2.5 |
| Mi | 0.179 | 0–1; higher is more readable | 18.0Δ 18.8 |
| LLOC | 31 | Logical lines; fewer is more readable | 9.6Δ 27.2 |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs | 49.3Δ 12.5 |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs | 44.4Δ 7.7 |
| BTTF | 0.439 | 0–1; higher is more readable | 30.6Δ 6.1 |
| Human | 3.11 | 1–5; original rating | 36.8 |
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. | 1526.191 | −50.364 |
| 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.191 | −7.786 |
Intercept 8.87 + feature contributions = -29.281 (log-odds).
Score = sigmoid(-29.281) = 0.
| Score | 0.704 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100 | +0.809 |
| 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 |
| 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. | 99.98 | −0.57 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 43 | −0.566 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.133 | −0.352 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.901 | +0.288 |
Intercept 0.07 + feature contributions = -0.34 (log-odds).
Score = sigmoid(-0.34) = 0.416.
| Score | 0.179 |
|---|
| Score | 31 |
|---|
Run 1
The code is generally readable with clear intent, good action granularity, and relatively flat structure. The database cleanup loop and run() method are logically organized and easy to follow. However, the initial snippet (likely end of a destructor/method) appears disorganized due to inconsistent indentation and mixed tabs/spaces, slightly degrading reading flow. The compar_ascent function is concise but lacks a return statement for equality, which could confuse readers. Overall, the code demonstrates good practices but suffers from formatting inconsistencies and minor completeness issues.
Run 2
The code has some structure (separate functions for cleanup, run, and comparison) but suffers from inconsistent indentation, mixing tabs and spaces, and unclear variable names like 'mat' and 'db'. Nesting is shallow (one level), which is good, but some sections lack comments explaining intent, such as the comparison function's sorting purpose. Action granularity is mostly one per line, though some lines (printf with ternary) are slightly dense. Reading flow is disrupted by inconsistent formatting and missing braces in some if/for blocks. The cleanup block at the top appears detached from its function context. Overall, the code is understandable for a C/C++ programmer but has several readability issues that reduce clarity.
Run 3
The code has moderate readability issues. Structure shows some logical organization (free database cleanup, run method) but suffers from inconsistent indentation and mixed tabs/spaces. Nesting is acceptable with only one loop level visible. Intent is partially clear through comments but variable names like 'mat' and 'db' are ambiguous. Code length is reasonable but contains redundant frees that could be looped. Action granularity varies - some lines combine multiple operations (loop + two frees). Reading flow is disrupted by inconsistent formatting, missing function headers/unfinished code (the quick sort comparison function appears truncated), and abrupt context switches. The cleanup block appears disconnected from its parent function, suggesting incomplete code. Overall structure needs better consistency and completeness to be more readable.
Run 1
Code Structure: Cleanup, search execution, and comparison are separated into logical functions, but the excerpt starts and ends mid-function. Nesting: Shallow; only cleanup uses a loop inside a conditional. Clarity of intent: Function calls and comments generally communicate purpose, though names such as mat, db, and va are terse, and 'generate the object' poorly describes dbsearch. Code length: Mostly concise, with some repetitive logging and cleanup statements. Action granularity: Most lines perform one action, although comparator conditions and returns share lines. Reading flow: run follows a natural configuration, reporting, loading, and searching sequence. Mixed indentation, inconsistent spacing, and incomplete function boundaries reduce readability.
Run 2
Code Structure: Cleanup, search execution, and comparison are logically separated, but the excerpt starts and ends mid-function. Nesting: Shallow nesting, with only a loop inside a conditional in cleanup. Clarity of intent: Function names, variable names, and comments generally communicate purpose, though names like mat and comments such as 'generate the object' are vague. Code length: Mostly concise; repeated printing adds some visual bulk without being excessive. Action granularity: Most lines perform one action, although comparator conditions and returns share lines. Reading flow: run() follows a natural sequence of configuration, reporting, loading, and searching. Inconsistent indentation, spacing, and brace formatting interrupt the flow, while incomplete function boundaries make the excerpt harder to interpret.
Run 3
Code Structure: Cleanup, search execution, and comparison are logically separated, although the snippet starts and ends mid-function. Nesting: Shallow overall; cleanup uses only an if and a loop. Clarity of intent: Function calls and comments generally explain the workflow, but abbreviated names such as mat, db, and compar_ascent reduce clarity, and 'generate the object' does not clearly describe dbsearch. Code length: Mostly concise, with some repetitive printing that remains straightforward. Action granularity: Most lines perform one action, though comparator conditions and returns share lines. Reading flow: The run method follows a natural configuration-to-loading-to-search sequence, but inconsistent indentation, spacing, and incomplete surrounding code interrupt readability.