Sample
Buse/94
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.949 | 0–1; higher is more readable | 94.9Δ 2.5 |
| Dorn | 0.777 | 0–1; higher is more readable | 77.8Δ 14.6 |
| Mi | 0.692 | 0–1; higher is more readable | 80.8Δ 11.6 |
| LLOC | 4 | Logical lines; fewer is more readable | 59.6Δ 32.8 |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs | 33.8Δ 58.6 |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs | 20.7Δ 71.7 |
| BTTF | 0.514 | 0–1; higher is more readable | 50.5Δ 41.9 |
| Human | 4.07 | 1–5; original rating | 92.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) |
|---|---|---|
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 3.334 | −5.002 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 113.3 | −3.739 |
| Source linesThe number of non-empty source lines. | 7 | +2.8 |
Intercept 8.87 + feature contributions = 2.929 (log-odds).
Score = sigmoid(2.929) = 0.949.
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. | 33 | +2.268 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.162 | −0.631 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 5 | −0.564 |
| 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. | 6.882 | −0.314 |
Intercept 0.07 + feature contributions = 1.246 (log-odds).
Score = sigmoid(1.246) = 0.777.
| Score | 0.692 |
|---|
| Score | 4 |
|---|
Run 1
The snippet is nearly impossible to evaluate meaningfully because it is incomplete and lacks context. It shows only variable assignments and a null check. The structure appears somewhat logical—checking for a right node, traversing to it, then checking its left child—but without the surrounding method, loop, or condition handling, the intent is ambiguous. Nesting is shallow, and there is one action per line, which is positive. However, the lack of comments, meaningful variable names (x, r, l), and the abrupt truncation severely hurt clarity and reading flow. It appears to be a fragment of a tree traversal or rotation, but the missing else block and return/break logic make it unreadable as standalone code. Overall, it is too incomplete to score higher.
Run 2
The code is clear and readable but lacks surrounding context. It assigns a right child node to x, then reassigns x to that child if not null, and finally reads the left child of the updated x. Structure is logical and flat, with no deep nesting. Variable names are short but conventional for tree operations. Action granularity is good, with one assignment per line. The main deductions come from lack of enclosing method, ambiguous variable names (r, x, l), and a slight redundancy in reassigning x twice. With more context or descriptive naming, readability could improve.
Run 3
The code snippet is short and generally clear: it retrieves the right child of a node, checks for null, reassigns x to that child, and retrieves its left child. The structure is logical and follows a natural reading order. Nesting is minimal, with only one level of if-statement. Each line performs a single action, aiding clarity. However, variable names like 'r', 'x', and 'l' are overly terse and lack semantic meaning, which slightly reduces readability. The code appears to be extracted from a larger algorithm, likely tree rotation or traversal, so the lack of context makes the intent only partially clear. Overall, it is very readable but could be improved with more descriptive variable names.
Run 1
Code Structure: The sequence is logically organized: retrieve the right child, check it, then access its left child. Nesting: A single conditional keeps nesting shallow. Clarity of intent: The operations are understandable, but single-letter variables obscure their roles and the broader purpose. Code length: The fragment is concise without obvious redundancy. Action granularity: Each statement performs one operation. Reading flow: The progression is natural, though extra blank lines interrupt it slightly. The incomplete conditional block and missing surrounding context limit overall readability.
Run 2
Code Structure: The statements are logically grouped around accessing a right child, but the snippet is incomplete. Nesting: One conditional level is shallow and easy to follow. Clarity of intent: The null check and child access are clear, but variable names x, r, and l obscure their roles and the broader purpose. Code length: The snippet is concise, though blank lines add unnecessary spacing. Action granularity: Each line performs one clear action. Reading flow: Execution proceeds naturally from retrieving the right child to checking it, updating x, and retrieving its left child; the missing closing brace and subsequent context interrupt comprehension.
Run 3
Code Structure: The statements follow a logical sequence, but the snippet is incomplete, leaving the conditional block unclosed. Nesting: A single conditional creates shallow, manageable nesting. Clarity of intent: getRight() and getLeft() communicate tree navigation, but x, r, and l are terse names, and the broader purpose is unclear. Code length: The code is concise, with no unnecessary statements visible. Action granularity: Each statement performs one straightforward action. Reading flow: Spacing and indentation make the sequence easy to follow, but the abrupt ending prevents understanding how the left child is used.