Sample
Scalabrio97
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 7.5Δ 0.3 |
| Scalabrino | 0.383 | 0–1; higher is more readable | 34.2Δ 26.4 |
| Dorn | 0.427 | 0–1; higher is more readable | 47.2Δ 39.4 |
| Mi | 0.01 | 0–1; higher is more readable | 4.5Δ 3.3 |
| LLOC | 18 | Logical lines; fewer is more readable | 31.2Δ 23.4 |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs | 19.3Δ 11.6 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 19.6Δ 11.8 |
| BTTF | 0.5 | 0–1; higher is more readable | 38.7Δ 30.9 |
| Human | 2.78 | 1–5; original rating | 7.8 |
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. | 1837.496 | −60.637 |
| Source linesThe number of non-empty source lines. | 31 | +12.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.868 | −7.302 |
Intercept 8.87 + feature contributions = -46.669 (log-odds).
Score = sigmoid(-46.669) = 0.
| Score | 0.383 |
|---|
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. | 113.935 | −1.161 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114 | +1.035 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.118 | −0.204 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.835 | +0.007 |
Intercept 0.07 + feature contributions = -0.292 (log-odds).
Score = sigmoid(-0.292) = 0.427.
| Score | 0.01 |
|---|
| Score | 18 |
|---|
Run 1
The code has a logical structure but suffers from readability issues, largely due to type casting and repeated verbose expressions like `( ( Student ) resultList.get( 0 ) )`. Nesting is moderate but adds visual clutter. Intent is fairly clear for a test, but comments and long lines reduce clarity. Code length is acceptable, but action granularity is inconsistent—multiple operations happen in single lines. Reading flow is disrupted by casting and method chaining. The anonymous classes are concise, but repeated casting and long assertions make the code harder to follow. Overall, functional but not highly readable.
Run 2
The code has clear intent (testing fetch join list criteria) and some logical structure, but it suffers from poor readability. Deeply nested parentheses and multiple casts create dense, hard-to-follow expressions. The test method body is a single block with anonymous inner classes, mixing setup and assertions without clear separation. While the code is relatively concise, it crams multiple actions into single lines, hurting readability. The repeated casting and inline assertions make the reading flow awkward. The commented-out code adds minor noise without explanation of why it remains.
Run 3
The code is a test method with a moderately clear purpose but suffers from readability issues. Structure is acceptable, but nesting is significant due to anonymous inner classes. Action granularity is poor; many lines combine casts, method calls, and assertions in dense expressions. The commented-out assertion adds noise. Reading flow is disjointed due to repetitive casting and deeply parenthesized expressions. While the intent is discernible, the dense assertion lines and inconsistent formatting reduce clarity. Overall, it's understandable but not highly readable.
Run 1
Code Structure: Clearly separates criteria construction, result validation, and test execution through two anonymous classes. Nesting: Moderate nesting from anonymous classes and one conditional, without deeply nested control flow. Clarity of intent: The descriptive test name, fluent criteria chain, and assertions convey the purpose, although raw List usage, repeated casts, and positional accesses obscure details. Code length: Reasonably compact, but repeated student retrievals and a commented-out assertion add avoidable clutter. Action granularity: Each assertion or operation occupies its own statement; the query chain is cleanly split across lines. Reading flow: Naturally progresses from query setup to checks and execution, but long expressions, redundant parentheses, and inconsistent spacing interrupt readability.
Run 2
Code Structure: Query setup and result verification are logically separated into executor and checker objects. Nesting: Anonymous classes add indentation, but control flow remains shallow with only one conditional. Clarity of intent: The descriptive test name, fluent criteria construction, and explicit assertions communicate the purpose well; raw types, repeated casts, and positional boolean/null arguments reduce clarity. Code length: Reasonably compact, though repeated student lookups and casts could be replaced with named local variables. Action granularity: Each assertion performs one check, and query operations occupy separate lines. Reading flow: Setup, verification, and execution follow a natural sequence, but long assertion expressions, inconsistent spacing, and a commented-out assertion interrupt readability.
Run 3
Code Structure: Query construction and result checking are logically separated into named collaborators. Nesting: Anonymous classes introduce moderate nesting, with only one conditional block. Clarity of intent: The test name, query operations, and assertions communicate the purpose, but raw types, repeated casts, and an unexplained boolean argument obscure details. Code length: Reasonably compact, though repeated student retrievals and a long commented-out assertion add clutter. Action granularity: Each assertion performs one check; the fluent query chain places each operation on its own line. Reading flow: Setup, verification, and execution follow a natural sequence, but lengthy expressions, excessive parentheses, and inconsistent spacing interrupt scanning.