Sample
Buse/17
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.221 | 0–1; higher is more readable | 44.4Δ 24.2 |
| Dorn | 0.511 | 0–1; higher is more readable | 35.4Δ 33.3 |
| Mi | 0.62 | 0–1; higher is more readable | 59.6Δ 9.1 |
| LLOC | 5 | Logical lines; fewer is more readable | 29.8Δ 38.9 |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs | 15.2Δ 53.5 |
| GPT-6.1 Sol | 14.67 | 0–20; mean of three runs | 27.8Δ 40.9 |
| BTTF | 0.371 | 0–1; higher is more readable | 17.2Δ 51.5 |
| Human | 3.74 | 1–5; original rating | 68.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. | 206.323 | −6.809 |
| 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.082 | −6.123 |
| Source linesThe number of non-empty source lines. | 7 | +2.8 |
Intercept 8.87 + feature contributions = -1.262 (log-odds).
Score = sigmoid(-1.262) = 0.221.
Feature contributions
| Feature | Value | Contribution (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. | 61 | +1.082 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 7 | +0.788 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.131 | −0.334 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 6.887 | −0.314 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 7 | +0.26 |
Intercept 0.07 + feature contributions = 0.046 (log-odds).
Score = sigmoid(0.046) = 0.511.
| Score | 0.62 |
|---|
| Score | 5 |
|---|
Run 1
The code snippet shows a reasonably structured initialization pattern with clear intent: creating a device collection, a file handler, and reading device class names in a loop. However, several issues impact readability. The use of Vector<DeviceIf> is outdated and suggests legacy code without clear justification. The loop variable 'i' and parameter 'num' are not descriptive, and the purpose of reading 'classname' is unclear without surrounding context. The code snippet is incomplete, making it difficult to fully evaluate structure and flow. Nesting is minimal and action granularity is appropriate, but the lack of error handling and context reduces clarity. Reading flow is disrupted by the abrupt ending and unexplained variables.
Run 2
The code snippet is too brief and incomplete to demonstrate most of the evaluation criteria. It initializes a vector and a file reader, then starts a loop that reads a serialized object and casts it to a String. There is no visible structure beyond a simple loop, making it difficult to assess logical organization or reading flow. Nesting is flat, which is positive, but clarity of intent is ambiguous because variable names like 'in', 'num', and the overall purpose of the device handling process are undefined. Code length is minimal, but this contributes to lack of context rather than conciseness. Action granularity appears reasonable—one action per line—but the incomplete code prevents a full evaluation of readability.
Run 3
The code is relatively clear but incomplete and lacks context. It initializes a vector, creates a file handler, and reads objects in a loop. Structure is logically ordered, but the purpose of the loop and the relationship between 'reader' and 'in' is unclear. Nesting is minimal, length is concise, and each line performs a single action, improving readability. However, variable names like 'num' and 'in' are ambiguous, and the immediate jump from creating a DeviceFileHandling instance to using a different 'in' stream breaks reading flow. The snippet is too brief to evaluate fully, but as shown it is moderately readable.
Run 1
Code Structure: Initialization followed by a loop is logically organized, but the incomplete snippet prevents assessing the full structure. Nesting: Only one loop level is visible, making it easy to follow. Clarity of intent: Device initialization and object reading are recognizable, but names such as num and in lack context, and reader's purpose is not shown. Code length: The visible code is concise with no obvious unnecessary statements. Action granularity: Each statement performs one main action, avoiding crowded lines. Reading flow: Spacing and indentation support a natural top-to-bottom progression, though the abrupt ending and unclosed loop interrupt comprehension.
Run 2
Code Structure: Initialization followed by a loop is logically organized, though the snippet is incomplete. Nesting: Only one loop level is visible, keeping complexity low. Clarity of intent: Device initialization and reading class names are understandable, but names such as num and in lack context, and reader is unused in the excerpt. Code length: The visible code is concise, with no obvious unnecessary statements. Action granularity: Each line performs a single action. Reading flow: Execution proceeds naturally from setup to iteration, but excessive blank space and the missing loop body and closing brace interrupt readability.
Run 3
Code Structure: Initialization followed by a device-reading loop is logically organized, but the incomplete snippet limits assessment. Nesting: Only one loop level is visible, making it easy to follow. Clarity of intent: Device storage and reading are suggested by the names, but num and in lack context, and the role of reader is not demonstrated. Code length: The visible code is concise without unnecessary repetition. Action granularity: Each statement performs one main action on its own line. Reading flow: Execution proceeds naturally from setup to iteration, with whitespace separating steps. However, the missing closing brace and remainder of the loop leave the overall purpose and flow unresolved.