Sample
Dorn/java/142
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable | 57.9Δ 3.6 |
| Scalabrino | 0.699 | 0–1; higher is more readable | 76.0Δ 21.7 |
| Dorn | 0.462 | 0–1; higher is more readable | 39.6Δ 14.8 |
| Mi | 0.617 | 0–1; higher is more readable | 65.7Δ 11.4 |
| LLOC | 14 | Logical lines; fewer is more readable | 49.0Δ 5.3 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 87.9Δ 33.6 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 26.0 |
| BTTF | 0.561 | 0–1; higher is more readable | 63.5Δ 9.2 |
| Human | 3.38 | 1–5; original rating | 54.3 |
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. | 639.091 | −21.09 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.912 | −7.367 |
Intercept 8.87 + feature contributions = -7.587 (log-odds).
Score = sigmoid(-7.587) = 0.001.
| Score | 0.699 |
|---|
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. | 65.968 | +0.871 |
| 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. | 30 | −0.268 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 28 | +0.231 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.117 | −0.193 |
| 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.448 | +0.002 |
Intercept 0.07 + feature contributions = -0.152 (log-odds).
Score = sigmoid(-0.152) = 0.462.
| Score | 0.617 |
|---|
| Score | 14 |
|---|
Run 1
The code is reasonably readable with a clear, consistent pattern for each field assignment. Structure is logical: it groups related operations and avoids deep nesting by using simple two-branch if/else blocks. Intent is understandable, though variable types could be clearer. Length is appropriate for the operations performed. Action granularity is mostly one action per line, aiding readability. Minor deductions: repeated null-to-default placeholder logic could be simplified or extracted to a helper, and the repeated `passwordPolicyCacheModel` prefix is verbose, which slightly slows reading flow. Overall, flat, predictable, and easy to follow.
Run 2
The code is fairly readable with clear intent and good granularity—each assignment or conditional branch is on its own line. The structure is logical, with related operations grouped together. However, there is some avoidable repetition: the two date-handling blocks are nearly identical and could be consolidated into a helper method. The nesting is minimal, which is good. The reading flow is mostly natural, though the switch from setting 'name' to then retrieving it for validation feels slightly roundabout. Overall the code is easy to follow, but a bit more abstraction would improve conciseness and reduce duplicated logic.
Run 3
The code is clear and well-structured, with a logical flow and flat nesting. Each action is on its own line, and the intent is easy to understand: converting nullable Date objects to timestamps with a sentinel value for nulls, and normalizing empty strings to null. The repeated null-check pattern for createDate and modifiedDate is simple but slightly verbose; a small helper method could reduce duplication. Overall, the code is highly readable, with only minor room for improvement in conciseness.
Run 1
Code Structure: Logically organized into date conversion and field assignment blocks, though date-handling logic is duplicated. Nesting: Shallow, with straightforward if/else branches. Clarity of intent: Descriptive names make assignments and empty-name normalization clear; the purpose of Long.MIN_VALUE as a sentinel is less obvious. Code length: Reasonably concise, although repeated date conversion and the intermediate name variable add some verbosity. Action granularity: Each statement performs one action. Reading flow: Consistent top-to-bottom progression and whitespace make the code easy to follow, with minor interruptions from assigning fields before normalizing their values.
Run 2
Code Structure: Logically organized into date conversion and field assignment blocks, though the date-handling logic is duplicated. Nesting: Shallow conditionals make control flow easy to follow. Clarity of intent: Descriptive identifiers clearly convey cache-model population; however, Long.MIN_VALUE as a missing-date sentinel is not explained. Code length: Reasonably concise, but repeated date checks and the temporary name variable add some verbosity. Action granularity: Each statement performs a single clear action. Reading flow: Consistent formatting and spacing support a natural top-to-bottom progression, with name normalization placed directly after its assignment.
Run 3
Code Structure: Logically groups date conversion, policy assignment, and string normalization, though date handling is duplicated. Nesting: Shallow conditionals make execution easy to follow. Clarity of intent: Descriptive names communicate the mapping clearly, but the significance of Long.MIN_VALUE as a missing-date sentinel is unexplained. Code length: Reasonably concise, although repeated null checks and the temporary name variable add some verbosity. Action granularity: Each statement performs one clear action. Reading flow: Sequential assignments and consistent formatting provide a natural flow, with slightly excessive blank lines interrupting visual continuity.