Sample
Buse/57
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.301 | 0–1; higher is more readable | 52.5Δ 9.1 |
| Dorn | 0.34 | 0–1; higher is more readable | 19.2Δ 42.4 |
| Mi | 0.799 | 0–1; higher is more readable | 93.9Δ 32.3 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 27.3 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 27.8Δ 33.8 |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs | 91.9Δ 30.3 |
| BTTF | 0.425 | 0–1; higher is more readable | 29.3Δ 32.3 |
| Human | 3.6 | 1–5; original rating | 61.6 |
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) |
|---|---|---|
| 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.289 | −6.433 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 160 | −5.28 |
| Source linesThe number of non-empty source lines. | 5 | +2 |
Intercept 8.87 + feature contributions = -0.843 (log-odds).
Score = sigmoid(-0.843) = 0.301.
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. | 6 | +0.824 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 4.843 | −0.342 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.128 | −0.307 |
| 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. | 81.833 | +0.199 |
Intercept 0.07 + feature contributions = -0.665 (log-odds).
Score = sigmoid(-0.665) = 0.34.
| Score | 0.799 |
|---|
| Score | 3 |
|---|
Run 1
The code is readable and reasonably structured. It reads two objects, casts them to String, then creates a device via a factory. However, it lacks error handling and context: no null checks, no try-with-resources for the input stream, and variable names are abbreviations ('in', 'dev') that reduce clarity. The actions are logically grouped and not deeply nested, but the empty lines and missing surrounding method/class context make intent partially ambiguous. Overall, readable but could be improved with descriptive names and exception handling.
Run 2
The code shows a clear sequence of reading two objects from a stream and then creating a device, which aids readability. However, several issues reduce the score: variable naming is inconsistent ('classname', 'devname', 'dev' are terse and use lowercase), and the purpose of 'classname' and 'devname' is ambiguous without surrounding context. The code lacks comments explaining why these values are cast to String or what happens with exceptions, which can confuse readers. The structure is mostly flat with only one nesting level (try-catch likely implied), but the missing exception handling makes the flow feel incomplete. Action granularity is good—one action per line—but the overall snippet is too short to assess log
Run 3
The code snippet is extremely short, which makes it somewhat readable, but it lacks context and structure. It opens with blank lines, has no comments or error handling, and mixes two actions (reading two objects) into a single visual block. The purpose is moderately clear—instantiate a device via a factory—but variable names like 'in', 'devname', and 'classname' are abbreviated or generic, reducing clarity. There is minimal nesting and straightforward flow, but the lack of surrounding method/class context drops the score. One action per line is mostly followed, but the blank leading lines and absence of exception handling make it feel incomplete and ambiguous.
Run 1
Code Structure: A simple, logically ordered sequence reads two values and creates a device. Nesting: No nesting makes it easy to follow. Clarity of intent: The factory call clearly communicates device creation, although abbreviated names and dependence on object read order slightly obscure the inputs. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action; the chained factory call is straightforward. Reading flow: Natural progression from input to creation, with blank lines separating the steps. Minor spacing inconsistencies reduce polish.
Run 2
Code Structure: Logically ordered input reads followed by device creation. Nesting: Completely flat, with no nested control flow. Clarity of intent: The factory call clearly creates a device from the two input values, although abbreviated names such as devname and dev slightly reduce clarity. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action; the chained factory access remains easy to follow. Reading flow: Natural top-to-bottom progression, with whitespace separating reading from creation. Minor inconsistent spacing around the casts prevents a fully polished presentation.
Run 3
Code Structure: Logically organized into reading inputs and creating a device. Nesting: Completely flat, with no nested control flow. Clarity of intent: The factory call clearly conveys device creation, though abbreviated variable names and positional readObject calls provide limited context. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one primary action; the chained factory access remains easy to understand. Reading flow: Natural progression from input values to device creation, with blank lines separating stages. Minor spacing inconsistency slightly reduces polish.