Sample
Dorn/java/204
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 20.9Δ 1.1 |
| Scalabrino | 0.344 | 0–1; higher is more readable | 25.2Δ 3.2 |
| Dorn | 0.027 | 0–1; higher is more readable | 4.2Δ 17.8 |
| Mi | 0.288 | 0–1; higher is more readable | 28.1Δ 6.1 |
| LLOC | 24 | Logical lines; fewer is more readable | 23.7Δ 1.7 |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs | 77.3Δ 55.3 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 44.0 |
| BTTF | 0.553 | 0–1; higher is more readable | 61.0Δ 39.0 |
| Human | 2.81 | 1–5; original rating | 22.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. | 1614.458 | −53.277 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.071 | −7.607 |
Intercept 8.87 + feature contributions = -32.014 (log-odds).
Score = sigmoid(-32.014) = 0.
| Score | 0.344 |
|---|
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. | 142 | −2.349 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 50 | −0.727 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 49 | −0.699 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 41 | +0.681 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.601 | +0.283 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.101 | −0.039 |
Intercept 0.07 + feature contributions = -3.583 (log-odds).
Score = sigmoid(-3.583) = 0.027.
| Score | 0.288 |
|---|
| Score | 24 |
|---|
Run 1
The code is generally readable with clear method naming and logical organization. Each test method has a single purpose, and actions are mostly one per line. However, there are some issues: the first line is an orphaned assertion without its method context, which hurts clarity. A long method name and inline class reference in testDynamicQueryByProjectionMissing create a very long line. The early return in testResetOriginalValues adds minor nesting. Variable names are descriptive but sometimes verbose (existingRatingsEntryModelImpl). Conditional logic is flat overall. Line length and formatting (wrapped assertEquals) are slightly inconsistent, impacting reading flow.
Run 2
The code demonstrates generally good readability with a clear logical structure. Methods are well-separated by purpose, with test methods followed by helper methods. Nesting is minimal - only one conditional early return in testResetOriginalValues. Intent is clear through descriptive method names like testDynamicQueryByProjectionMissing and addRatingsEntry. Action granularity is mostly one action per line, though some lines like the DynamicQuery factory call and RestrictionsFactoryUtil.in are somewhat long. Reading flow follows a natural progression from setup to execution to assertion. Minor deductions: the dynamic query test could be more concise, and some lines exceed comfortable length (e.g., the RatEntryModelImpl cast line). Variable names are descriptive but verbose (existingRatingsEntryModelImpl). Overall, the code is maintainable and follows consistent patterns.
Run 3
The code demonstrates reasonable structure with distinct test methods and a helper method, showing clear intent for persistence testing. Each action is generally on its own line, aiding readability. However, there are notable issues: a dangling assertion at the start suggests incomplete context, and the testResetOriginalValues method contains early-return logic (acceptable but slightly disruptive) and a long line with cast that hurts readability. The nesting is minimal, which is positive, but the flow between test setup and assertions could be more streamlined. Variable names are descriptive, but some lines are unnecessarily long, and the use of Object[] in dynamic queries adds slight ambiguity. Overall, the code is moderately readable but could benefit from better formatting and simplification of complex expressions.
Run 1
Code Structure: Clearly separated test methods and a setup helper provide logical organization, though the excerpt begins and ends mid-method. Nesting: Minimal nesting and an early return keep control flow flat. Clarity of intent: Descriptive method names, domain-specific variables, and straightforward assertions make the tests understandable; the cache prerequisite is not explained. Code length: Mostly concise, but repeated blank lines between setters add unnecessary visual length, and one declaration is excessively long. Action granularity: Each statement performs a distinct action, making operations easy to follow. Reading flow: Tests follow a natural setup-query-assert sequence, and the helper initializes fields sequentially. Inconsistent line wrapping and the incomplete excerpt slightly disrupt readability.
Run 2
Code Structure: Distinct test methods and a creation helper provide logical organization, although the snippet starts and ends mid-method. Nesting: Minimal nesting and an early return keep control flow flat. Clarity of intent: Descriptive method names, explicit query construction, and straightforward assertions make the tests understandable; framework-specific utilities require some context. Code length: Mostly concise, but excessive blank lines between setters and a lengthy model variable add visual bulk. Action granularity: Each statement performs a clear operation, with no compressed multi-action lines. Reading flow: Setup, execution, and assertions follow a natural sequence. Inconsistent line wrapping and the long cast-and-fetch statement slightly disrupt scanning.
Run 3
Code Structure: Separate test methods and a creation helper provide logical organization, although the snippet starts and ends mid-method. Nesting: Minimal nesting and an early return keep control flow flat. Clarity of intent: Descriptive method names, explicit query setup, and assertions make the tests understandable; framework-specific APIs require some familiarity. Code length: Mostly concise, but blank lines between every setter add unnecessary vertical space, and one declaration is excessively long. Action granularity: Each statement performs a single clear action, with sensible line wrapping for most calls. Reading flow: Setup, execution, and assertions follow a natural sequence; inconsistent wrapping and the truncated boundaries slightly interrupt readability.