Sample
Scalabrio78
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 47.7Δ 11.3 |
| Scalabrino | 0.776 | 0–1; higher is more readable | 81.9Δ 22.9 |
| Dorn | 0.338 | 0–1; higher is more readable | 39.7Δ 19.3 |
| Mi | 0.117 | 0–1; higher is more readable | 38.7Δ 20.4 |
| LLOC | 22 | Logical lines; fewer is more readable | 19.3Δ 39.7 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 72.9Δ 13.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 0.5 |
| BTTF | 0.629 | 0–1; higher is more readable | 76.9Δ 17.8 |
| Human | 3.78 | 1–5; original rating | 59.0 |
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. | 965.875 | −31.874 |
| Source linesThe number of non-empty source lines. | 36 | +14.4 |
| 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.827 | −7.241 |
Intercept 8.87 + feature contributions = -15.845 (log-odds).
Score = sigmoid(-15.845) = 0.
| Score | 0.776 |
|---|
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. | 144.972 | −2.475 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 144.972 | +1.535 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.061 | +0.349 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 28 | −0.222 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 35 | −0.203 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 34.795 | +0.077 |
Intercept 0.07 + feature contributions = -0.673 (log-odds).
Score = sigmoid(-0.673) = 0.338.
| Score | 0.117 |
|---|
| Score | 22 |
|---|
Run 1
The code is moderately readable. The structure is clear with logical setup, test assertions, and cleanup sections. The explanatory comment provides useful context for the test's purpose. However, there are some readability issues: the indentation is inconsistent (the method signature starts with a tab while the comment aligns differently), the comment block is very long and could be more concise, and there are multiple actions on consecutive lines without blank line separation that would improve scanning. The test method name clearly indicates its purpose, and the checkCounts helper calls with descriptive messages improve clarity. Action granularity is mostly one action per line, but some lines combine multiple logical operations (e.g., save calls in sequence). The reading flow is generally natural, though the transition between setup, assertions, and cleanup could benefit from more visual separation.
Run 2
The code is well-structured with clear logical organization, separated setup, test cases, and cleanup phases. It has minimal nesting and a flat control flow. Comments explain intent and historical context, aiding clarity. Variable names are descriptive and actions are generally one per line. The reading flow is natural and easy to follow. Minor deductions for slight verbosity in comments and repeated setup/cleanup patterns that could be refactored, but overall readability is high.
Run 3
The code demonstrates good readability with clear intent, logical structure, and natural flow. It uses descriptive variable names (owner, e1, e2) and includes helpful comments explaining the test scenario and expected behavior. The nesting is minimal, and each action is on its own line. However, there are minor issues: the comment blocks are somewhat lengthy and could be more concise, and there's slight inconsistency in indentation (the @Test annotation is indented oddly). The test method name is clear, and the checkCounts helper reduces repetition. Overall, the code is well-organized and easy to follow, losing only minor points for verbose comments and formatting inconsistencies.
Run 1
Code Structure: Clearly separates entity setup, query checks, and cleanup with blank lines. Nesting: Flat execution with no nested control flow makes it easy to follow. Clarity of intent: The descriptive test name, issue annotation, and explanatory comments communicate the regression being tested, although names such as s, e1, and e2 are less informative. Code length: Reasonably concise, but repeated session and transaction management adds boilerplate, and some comments are lengthy. Action granularity: Each statement performs one action on its own line. Reading flow: The setup-test-cleanup sequence is natural, and related checks are grouped logically. Minor indentation inconsistencies and long query-check lines slightly reduce readability.
Run 2
Code Structure: Clearly organized into setup, query checks, and cleanup, though these phases could be labeled more explicitly. Nesting: Flat execution with no nested control flow makes the test easy to follow. Clarity of intent: The descriptive test name, issue annotation, comments, and assertion descriptions explain the regression being tested; abbreviated variables such as s, e1, and e2 slightly reduce clarity. Code length: Reasonably concise, although transaction lifecycle code is repeated and the introductory comment is lengthy. Action granularity: Each statement performs one action, with no compressed multi-statement lines. Reading flow: Execution proceeds naturally from fixture creation to verification and deletion; minor indentation inconsistency and long query-check lines slightly interrupt readability.
Run 3
Code Structure: Logically organized into setup, query checks, and cleanup, with whitespace separating phases. Nesting: Flat method with no nested control flow, making it easy to scan. Clarity of intent: The descriptive test name, issue annotation, explanatory comments, and check labels clarify the regression being tested; abbreviated variables such as s, e1, and e2 slightly reduce clarity. Code length: Reasonably concise, although transaction lifecycle repetition and lengthy comments add some bulk. Action granularity: Each statement performs one action on its own line; query checks clearly group related arguments. Reading flow: Execution proceeds naturally from creating test data to verifying behavior and deleting data. Minor indentation inconsistency and long query lines slightly disrupt readability.