Sample
Dorn/java/197
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 25.3Δ 28.7 |
| Scalabrino | 0.236 | 0–1; higher is more readable | 16.3Δ 37.8 |
| Dorn | 0.202 | 0–1; higher is more readable | 17.0Δ 37.0 |
| Mi | 0.349 | 0–1; higher is more readable | 34.3Δ 19.8 |
| LLOC | 34 | Logical lines; fewer is more readable | 5.4Δ 48.6 |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs | 79.9Δ 25.9 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 26.3 |
| BTTF | 0.46 | 0–1; higher is more readable | 34.8Δ 19.2 |
| Human | 3.38 | 1–5; original rating | 54.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. | 1429.451 | −47.172 |
| 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. | 4.813 | −7.22 |
Intercept 8.87 + feature contributions = -25.521 (log-odds).
Score = sigmoid(-25.521) = 0.
| Score | 0.236 |
|---|
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 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 50 | −0.727 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 35 | +0.473 |
| 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. | 79 | +0.319 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.95 | +0.288 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.12 | −0.225 |
Intercept 0.07 + feature contributions = -1.374 (log-odds).
Score = sigmoid(-1.374) = 0.202.
| Score | 0.349 |
|---|
| Score | 34 |
|---|
Run 1
The code is generally readable with clear intent and consistent structure. The toString() method uses a StringBundler with one append per line, providing good action granularity and reading flow. However, there are several readability issues: the toEntityModel() method is repetitive with multiple null-check blocks that could be simplified using a helper method or ternary expression. The if-else null checks for 'name' and 'primKey' add unnecessary length and break the natural flow. Variable naming is clear, and the code follows a logical organization, but the repeated null-check pattern makes the code longer than necessary and slightly tedious to read. The initial indentation with a tab before the first line is inconsistent with typical formatting conventions. Overall, the code is understandable but could be more concise and maintainable.
Run 2
The code demonstrates good structure and readability. The toString() method uses a StringBundler with clear sequential appends, one action per line, making the reading flow natural and intent clear. The toEntityModel() method follows a straightforward setter pattern, with conditional handling for null values that is easy to follow. Nesting is minimal, with only simple if-else blocks. The code is somewhat repetitive and verbose, particularly in the toString() method where each field requires two lines (append label, append value), but this is a common pattern in Java and aids clarity. The manual null checks in toEntityModel() could be condensed using utility methods, which would reduce length without sacrificing readability. Overall, the code is well-organized, flat, and unambiguous, with clear action granularity.
Run 3
The code is generally readable with clear one-action-per-line granularity and logical structure. The toString() method is flat and straightforward, with consistent StringBundler usage. However, there is some unnecessary verbosity in the null-check blocks for 'name' and 'primKey'—these could be condensed using a ternary or helper method. The repeated 'setX' calls are concise but slightly verbose. Reading flow is natural, and intent is clear. Overall, the code is well-organized but could be slightly more concise.
Run 1
Code Structure: Logically separates string formatting from entity conversion, although the snippet begins and ends mid-method. Nesting: Shallow if/else blocks are easy to follow. Clarity of intent: Descriptive field names and setters clearly convey formatting, mapping, and null normalization; resetOriginalValues is less self-explanatory. Code length: Somewhat verbose due to repetitive append calls, setters, and null checks, but not excessively long. Action granularity: Each statement performs one action, making individual steps easy to inspect. Reading flow: Sequential field handling and consistent formatting provide a natural flow, with minor interruptions from repetitive null-handling branches.
Run 2
Code Structure: Logically groups string construction and entity conversion, though the excerpt starts and ends mid-method. Nesting: Shallow, with straightforward null-check branches. Clarity of intent: Descriptive field names and setters make formatting and entity population clear; resetOriginalValues requires some framework knowledge. Code length: Somewhat verbose due to repetitive append calls, setters, and null handling, but not unnecessarily complex. Action granularity: Each statement performs one action, making individual operations easy to inspect. Reading flow: Sequential field processing and consistent formatting provide a natural flow, with minor interruption from repeated null checks and incomplete method boundaries.
Run 3
Code Structure: Logically separates string construction from entity conversion, although the excerpt omits method boundaries and the conversion's ending. Nesting: Shallow, with only simple if/else null checks. Clarity of intent: Descriptive field names and setters make the purpose clear; resetOriginalValues requires some domain knowledge. Code length: Straightforward but repetitive, especially the append calls and null-handling blocks. Action granularity: Each statement performs one action, making individual operations easy to follow. Reading flow: Fields are processed in a consistent order, with whitespace separating related steps. Overall, the code is highly readable, though verbosity and incomplete context prevent a top score.