Sample
Buse/98
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.038 | 0–1; higher is more readable | 29.3Δ 9.1 |
| Scalabrino | 0.624 | 0–1; higher is more readable | 33.3Δ 5.1 |
| Dorn | 0.408 | 0–1; higher is more readable | 26.3Δ 12.1 |
| Mi | 0.572 | 0–1; higher is more readable | 50.5Δ 12.1 |
| LLOC | 5 | Logical lines; fewer is more readable | 29.8Δ 8.6 |
| DeepSeek V4 Pro | 14.67 | 0–20; mean of three runs | 55.1Δ 16.7 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 84.8Δ 46.5 |
| BTTF | 0.292 | 0–1; higher is more readable | 6.1Δ 32.3 |
| Human | 3.01 | 1–5; original rating | 38.4 |
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. | 210.831 | −6.957 |
| 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.488 | −6.731 |
| Source linesThe number of non-empty source lines. | 4 | +1.6 |
Intercept 8.87 + feature contributions = -3.219 (log-odds).
Score = sigmoid(-3.219) = 0.038.
| Score | 0.624 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 5 | +0.859 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 68.6 | +0.76 |
| 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.151 | −0.524 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 3.7 | −0.358 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 4 | +0.329 |
Intercept 0.07 + feature contributions = -0.371 (log-odds).
Score = sigmoid(-0.371) = 0.408.
| Score | 0.572 |
|---|
| Score | 5 |
|---|
Run 1
The code is moderately readable but has several issues. It combines two logical actions (creating a suite description and adding children in a loop) with low separation of concerns. The for-loop action is on one line, reducing clarity slightly. It uses ambiguous variable names like 'n', 'ts', and 'i' without clear context. Indentation is unusual and inconsistent. While the intent is relatively clear—building a hierarchical test description—the code could be improved with better variable names, consistent formatting, and more distinct separation of setup and iteration logic.
Run 2
The code is relatively clear but has several readability issues. It uses inconsistent spacing (e.g., 'int n= ts.testCount()', 'for (int i= 0;') and omits braces in the for loop, which can be error-prone. The variable names 'n', 'i', 'ts' are brief but not highly descriptive. The structure is flat and logical, with one action per line mostly followed, but the missing braces reduce clarity. The intent is understandable—creating a suite description and adding children from test cases—but the compact formatting slightly hinders natural reading flow. Overall, it is functional and simple but could be improved with consistent spacing, braces, and slightly more descriptive naming.
Run 3
The code is logically structured, flat, and each line performs a clear action. Intent is straightforward: build a suite description and add child descriptions by iterating over tests. Indentation and spacing are slightly inconsistent, and variable names like 'ts' and 'n' are abbreviated, slightly reducing clarity. The loop could use a for-each construct for better reading flow, but overall it is concise and readable.
Run 1
Code Structure: Logically organized into suite creation, test counting, and child addition. Nesting: Only one shallow loop. Clarity of intent: Clearly builds a suite description from its tests, though abbreviations such as 'ts' and 'n' slightly reduce clarity. Code length: Concise without unnecessary statements. Action granularity: Each line performs one primary action; the nested method calls remain easy to follow. Reading flow: Natural top-to-bottom progression, with minor readability drawbacks from inconsistent spacing and omitted loop braces.
Run 2
Code Structure: Logically organized into suite creation, test counting, and child addition. Nesting: A single loop keeps nesting minimal. Clarity of intent: The purpose is clear, though abbreviated names such as ts and n require some context. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one primary action; the nested method calls are straightforward. Reading flow: Execution follows a natural top-to-bottom sequence. Inconsistent spacing, excessive indentation, and omitted loop braces slightly reduce readability.
Run 3
Code Structure: Logically organized into suite creation, test counting, and child addition. Nesting: A single loop keeps nesting shallow. Clarity of intent: Clearly builds a suite description from its tests, though abbreviations such as ts and n require context. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action; the nested calls in the loop remain easy to follow. Reading flow: Natural top-to-bottom progression. Inconsistent spacing around assignments and omitted loop braces slightly reduce readability.