Sample
Scalabrio96
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 7.0Δ 14.3 |
| Scalabrino | 0.598 | 0–1; higher is more readable | 59.3Δ 37.9 |
| Dorn | 0.24 | 0–1; higher is more readable | 29.6Δ 8.3 |
| Mi | 0.115 | 0–1; higher is more readable | 37.7Δ 16.3 |
| LLOC | 22 | Logical lines; fewer is more readable | 19.3Δ 2.0 |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs | 19.3Δ 2.0 |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs | 24.9Δ 3.5 |
| BTTF | 0.49 | 0–1; higher is more readable | 35.7Δ 14.3 |
| Human | 3.11 | 1–5; original rating | 21.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) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 1866.577 | −61.597 |
| Source linesThe number of non-empty source lines. | 32 | +12.8 |
| 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.786 | −7.179 |
Intercept 8.87 + feature contributions = -47.106 (log-odds).
Score = sigmoid(-47.106) = 0.
| Score | 0.598 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 103 | +0.857 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 102.969 | −0.696 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.13 | −0.318 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 31 | −0.291 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.865 | +0.022 |
Intercept 0.07 + feature contributions = -1.155 (log-odds).
Score = sigmoid(-1.155) = 0.24.
| Score | 0.115 |
|---|
| Score | 22 |
|---|
Run 1
The code has a clear overall structure with three anonymous inner classes for test setup, but readability is hampered by inconsistent formatting and excessive casting/type-checking in the result verification method. The 'check' method is unnecessarily long with repeated, nearly identical assertions, making it hard to scan. Spacing and parenthesis alignment are inconsistent, especially in casts like '( ( Student ) )'. Although the intent (testing lazy associations) is understandable, the clutter obscures the logic. It could be improved by extracting a helper method for assertions and using consistent formatting. Score reflects moderate readability.
Run 2
The code shows logical organization with clear setup of executors and a result checker, but readability suffers from excessive casting parentheses and repetitive verbose assertions. Nesting is moderate, mostly due to anonymous inner classes. Intent is fairly clear—testing lazy associations—but the assertion block is cluttered with multiple casts per line, reducing action granularity and reading flow. The method is somewhat concise but could be improved by extracting helper methods or using typed variables to eliminate repeated casting. Overall it is maintainable but not highly readable.
Run 3
The code has moderate structure with separate executor and checker classes, but readability is harmed by excessive casting and redundant parentheses. The assertions are verbose and repetitive, making intent harder to grasp at a glance. Nesting is shallow, which is good, but the checker method is long and mixes multiple verification steps. Action granularity is mostly one-per-line, yet the heavy casting and nested parentheses disrupt natural reading flow. Overall, the logic is understandable but unnecessarily cluttered.
Run 1
Code Structure: Logically separates criteria execution, HQL execution, and result checking, although anonymous classes add boilerplate. Nesting: Moderate nesting from anonymous classes and their methods, with no complex conditional branches. Clarity of intent: Query ordering and lazy-initialization assertions make the test's purpose reasonably clear; abbreviated naming, raw types, and repeated casts reduce clarity. Code length: Fairly concise, but repeated student lookups and a duplicate null assertion add unnecessary length. Action granularity: Each declaration, assertion, and execution step occupies its own statement, making individual actions easy to identify. Reading flow: Naturally progresses from query setup to validation and test execution, though inconsistent cast formatting and long assertion lines interrupt scanning.
Run 2
Code Structure: Logically separates Criteria execution, HQL execution, and result checking, though anonymous classes add boilerplate. Nesting: Moderate structural nesting from anonymous classes and methods, with no deeply nested control flow. Clarity of intent: Query ordering and assertions communicate expected results and lazy-loading behavior, but abbreviated naming and repeated casts obscure details. Code length: Reasonably compact, but repeated result access and a duplicate null assertion add unnecessary length. Action granularity: Each declaration, return, or assertion performs one main action; fluent query construction remains understandable. Reading flow: Naturally progresses from query setup to verification and execution, although inconsistent cast spacing, long assertion lines, and the unexplained false argument interrupt readability.
Run 3
Code Structure: Logically separates criteria execution, HQL execution, and result checking, though anonymous classes add boilerplate. Nesting: Moderate nesting from anonymous classes and overridden methods, without complex control flow. Clarity of intent: The test clearly checks ordered students and uninitialized lazy associations, but the abbreviated name and unexplained false argument reduce clarity. Code length: Reasonably compact, though repeated casts, list lookups, and a duplicate null assertion add unnecessary length. Action granularity: Each statement performs one main action; chained query construction remains understandable. Reading flow: Setup, assertions, and execution follow a natural sequence, but inconsistent spacing and repetitive expressions make the assertion block harder to scan.