Sample
Scalabrio83
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 4.0Δ 35.9 |
| Scalabrino | 0.117 | 0–1; higher is more readable | 8.5Δ 31.4 |
| Dorn | 0.012 | 0–1; higher is more readable | 3.5Δ 36.4 |
| Mi | 0.012 | 0–1; higher is more readable | 6.0Δ 33.9 |
| LLOC | 31 | Logical lines; fewer is more readable | 3.3Δ 36.7 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 3.0Δ 36.9 |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs | 5.0Δ 34.9 |
| BTTF | 0.393 | 0–1; higher is more readable | 14.1Δ 25.9 |
| Human | 3.44 | 1–5; original rating | 39.9 |
Views
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. | 2168.052 | −71.546 |
| Source linesThe number of non-empty source lines. | 34 | +13.6 |
| 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.93 | −7.395 |
Intercept 8.87 + feature contributions = -56.47 (log-odds).
Score = sigmoid(-56.47) = 0.
| Score | 0.117 |
|---|
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. | 173.941 | −3.702 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| 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. | 34 | −0.359 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.09 | +0.063 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 32.566 | +0.045 |
Intercept 0.07 + feature contributions = -4.389 (log-odds).
Score = sigmoid(-4.389) = 0.012.
| Score | 0.012 |
|---|
| Score | 31 |
|---|
Run 1
The code has a clear overall structure (setup, execute, teardown) but suffers from severe readability issues. The test method has a single responsibility but is overloaded with 20+ similar query assertions, making it unnecessarily long and repetitive. Nesting is minimal, which is good, but clarity of intent is weak because there are no comments explaining what specific functionality each query tests. Multiple actions are packed into many lines (e.g., query creation, parameter binding, and list execution all on one line). Reading flow is natural but monotonous. The code would benefit from extracting helper methods, grouping related test cases, and breaking up complex query strings into separate lines or constants for better readability.
Run 2
The code is extremely unreadable primarily due to repetitive long query strings assigned to the same variable, excessive line lengths, and lack of logical grouping. The structure is flat but tangled: every query is jammed into a single method with no helper methods, comments, or separation by intent. Nesting is acceptable but the method body is monolithic. Clarity of intent is poor — the purpose is only vaguely clear and no distinction is made between test cases. Code length is unnecessarily bloated due to repeated verbose query strings. Action granularity is violated because multiple steps (query creation, parameter setting, listing) are chained on one line. Reading flow is broken by uniform repetition and no whitespace between logical blocks. The method uses raw types and suppresses warnings, further reducing clarity. Overall, the test is hard to scan, maintain, or extend.
Run 3
The code has a clear overall structure (setup, operations, teardown), but readability is severely impacted by repetitive, extremely long lines that perform multiple actions (query creation, execution, and assignment). Nesting is minimal, which is positive, but the test name and string-heavy queries make intent unclear without domain knowledge. Many lines exceed reasonable length, harming scanning and comprehension. Reading flow is monotonous and difficult to follow. The repeated reassignment of the same variable across many unrelated queries obscures what is being tested. Overall, the code is functional but not optimized for human readability.
Run 1
Code Structure: Setup, query execution, and cleanup follow a logical order, but many unrelated expression cases are grouped without labels or separation. Nesting: The method is flat and easy to scan. Clarity of intent: The method name indicates expression testing, but repeatedly overwriting unused results and omitting assertions leave expected behavior unclear; short names such as h and txn provide limited context. Code length: Moderate overall, but repetitive query statements and long SQL strings make the method visually dense. Action granularity: Most lines represent one operation, although query creation, parameter binding, and execution are sometimes chained together. Reading flow: The lifecycle proceeds naturally from initialization to cleanup, but inconsistent spacing and an uninterrupted sequence of queries hinder comprehension.
Run 2
Code Structure: Setup, query execution, and cleanup are logically ordered, but the many expression tests lack grouping or helper methods. Nesting: The method is flat and easy to traverse. Clarity of intent: The method name and queries indicate expression testing, but repeatedly overwriting unused results without assertions leaves expected outcomes unclear; abbreviated variable names add minor ambiguity. Code length: Individual operations are concise, but the repetitive query block makes the method lengthy and monotonous. Action granularity: Most lines represent one operation, although chained query creation, parameter binding, and execution compress several steps onto a line. Reading flow: Execution proceeds naturally from initialization to cleanup, but long query strings, inconsistent spacing, and absent visual separation between query categories reduce scanability.
Run 3
Code Structure: Setup, query execution, and cleanup follow a logical sequence, but the query cases lack grouping or descriptive labels. Nesting: The method is flat and easy to navigate. Clarity of intent: The test name and query strings communicate expression testing, but repeatedly overwriting unused results without assertions leaves expected outcomes unclear. Code length: The method is manageable, though repetitive query boilerplate and long lines make scanning harder. Action granularity: Most statements occupy separate lines, but chained query creation, parameter binding, and execution combine several operations. Reading flow: The lifecycle is natural, yet the uninterrupted series of similar queries, terse variable names, and inconsistent spacing reduce readability.