Sample
Dorn/java/206
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 55.7Δ 15.9 |
| Scalabrino | 0.635 | 0–1; higher is more readable | 66.7Δ 26.8 |
| Dorn | 0.664 | 0–1; higher is more readable | 61.3Δ 21.4 |
| Mi | 0.324 | 0–1; higher is more readable | 31.5Δ 8.4 |
| LLOC | 13 | Logical lines; fewer is more readable | 50.8Δ 11.0 |
| DeepSeek V4 Pro | 14.67 | 0–20; mean of three runs | 74.1Δ 34.3 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 66.0Δ 26.2 |
| BTTF | 0.724 | 0–1; higher is more readable | 94.2Δ 54.3 |
| Human | 3.17 | 1–5; original rating | 39.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. | 663.862 | −21.907 |
| 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.867 | −7.3 |
Intercept 8.87 + feature contributions = -8.338 (log-odds).
Score = sigmoid(-8.338) = 0.
| Score | 0.635 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 69.645 | +0.715 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.234 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 24 | +0.093 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.288 | −0 |
Intercept 0.07 + feature contributions = 0.68 (log-odds).
Score = sigmoid(0.68) = 0.664.
| Score | 0.324 |
|---|
| Score | 13 |
|---|
Run 1
The code shows generally good structure with clear separation of validation methods and obvious intent. The nesting is minimal (if-else if chains stay flat). Variable names are descriptive and action granularity is mostly one action per line. However, there are minor readability issues: inconsistent line breaking in SessionErrors.add calls (some single-line, some split across lines) disrupts visual rhythm. The repeated pattern between the two methods suggests potential for abstraction, though not necessarily a readability flaw. The code is concise and follows a natural validation flow.
Run 2
The code is generally readable with clear intent and logical organization. Each validation method follows a consistent pattern: retrieve parameters, validate them, and add errors when necessary. Nesting is minimal, using flat if-else-if structures that are easy to follow. The variable names are descriptive, making the purpose clear. However, there is some repetitive code between the two methods that could be refactored for better maintainability. The line wrapping is inconsistent in places (e.g., SessionErrors.add wrapped differently in similar situations), which slightly reduces readability. Action granularity is mostly one action per line, though parameter retrieval spans multiple lines. Overall, the code is comprehensible and well-structured but could benefit from consolidation.
Run 3
The code demonstrates reasonable structure with clear method separation and consistent validation patterns. Nesting is minimal (single-level if-else), and each action is on its own line, which aids readability. However, there are issues: the code begins mid-method with an incomplete context, lacks explanatory comments or method purpose documentation, and repeats nearly identical logic across methods — suggesting potential for DRY refactoring. Variable names are descriptive but verbose. The `throws Exception` is overly broad. Reading flow is logical but interrupted by inconsistent line breaks in similar code blocks. Overall, the code is maintainable but could benefit from abstraction of repeated validation logic and clearer intent documentation.
Run 1
Code Structure: Validation is logically grouped by message type, but the snippet begins mid-method and duplicates similar logic. Nesting: Shallow if/else-if blocks are easy to follow. Clarity of intent: Descriptive variable and method names clearly communicate parameter retrieval and required-field validation. Code length: Concise overall, although repeated validation patterns and long identifiers add verbosity. Action granularity: Each statement performs one action; wrapped calls remain easy to distinguish. Reading flow: Retrieval followed by validation provides a natural sequence, with consistent formatting. The incomplete opening context slightly disrupts reading, and else-if means only the first missing field is reported per call.
Run 2
Code Structure: Validation is logically grouped, but the snippet starts mid-method, reducing structural completeness. Nesting: Shallow if/else-if branches are easy to follow. Clarity of intent: Descriptive parameter names and explicit error keys clearly convey required-field validation; else-if reports only the first missing field. Code length: Concise overall, though added-message and updated-message validation repeat nearly identical logic. Action granularity: Each statement performs a single clear action, with line wrapping preserving readability. Reading flow: Parameter retrieval followed by validation creates a natural sequence, although the truncated opening and repetitive long identifiers slightly interrupt the flow.
Run 3
Code Structure: Validation is logically grouped by message type, though the snippet begins mid-method and repeats similar logic. Nesting: Shallow if/else-if blocks are easy to follow. Clarity of intent: Descriptive method and variable names clearly communicate which email fields are validated; the else-if means only the first missing field is reported. Code length: Reasonably concise, but duplicated validation patterns and long identifiers add verbosity. Action granularity: Each statement performs one clear action, with line wrapping rather than multiple actions per line. Reading flow: Parameter retrieval followed by validation is natural and consistent, although the incomplete opening context slightly disrupts readability.