Sample
Dorn/java/159
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 36.5Δ 39.6 |
| Scalabrino | 0.315 | 0–1; higher is more readable | 22.5Δ 53.6 |
| Dorn | 0.755 | 0–1; higher is more readable | 71.6Δ 4.5 |
| Mi | 0.638 | 0–1; higher is more readable | 69.4Δ 6.7 |
| LLOC | 10 | Logical lines; fewer is more readable | 59.5Δ 16.6 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 91.4Δ 15.3 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 4.3 |
| BTTF | 0.479 | 0–1; higher is more readable | 39.6Δ 36.5 |
| Human | 3.69 | 1–5; original rating | 76.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. | 992.674 | −32.758 |
| 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.938 | −7.407 |
Intercept 8.87 + feature contributions = -19.295 (log-odds).
Score = sigmoid(-19.295) = 0.
| Score | 0.315 |
|---|
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. | 70.903 | +0.662 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 71 | +0.341 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 28 | +0.231 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 28 | −0.222 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.025 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 29 | +0.01 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.931 | +0.009 |
Intercept 0.07 + feature contributions = 1.126 (log-odds).
Score = sigmoid(1.126) = 0.755.
| Score | 0.638 |
|---|
| Score | 10 |
|---|
Run 1
The code is highly readable due to its clear structure and logical organization. The test method is flat and avoids unnecessary nesting, grouping related calendar instances and assertions in a logical sequence: before, during, and after recurrence checks. Action granularity is consistently one action per line, improving clarity. Variable names are descriptive, making the test's intent obvious without additional comments. The code length is concise and avoids redundancy, and the reading flow naturally follows the test scenario. Minor deductions: repeated 'getCalendar' calls without helper constants or a builder could be slightly compacted, and the lack of blank lines between assertion groups slightly reduces visual separation, but overall the code is very clear and maintainable.
Run 2
The code is well-structured with a clear, single test method. It uses descriptive variable names like 'beforeRecurrence', 'duringRecurrence1', and 'afterRecurrence', which clarify intent. Nesting is minimal and the flow follows a logical before-during-after pattern. Most lines perform one action, though the recurrence creation call could be more readable. The concise length is appropriate for the test's purpose. Minor deductions for the slightly opaque parameters (FRIDAY, 3, 1) and the duplicated calendar creation lines.
Run 3
The code is generally readable with clear intent and logical structure. It follows a straightforward test setup, executes assertions, and uses descriptive variable names like 'beforeRecurrence' and 'duringRecurrence'. Nesting is minimal, and reading flow is natural. However, the use of magic numbers like '3' and '1' in getRecurrence and hardcoded test dates reduces clarity. Additionally, multiple actions per line (e.g., Calendar declarations and assertions on the same line as variable definitions) slightly hinder readability. The code could benefit from comments explaining the recurrence pattern or extracting constants to clarify the parameters.
Run 1
Code Structure: The test is logically organized into recurrence setup and before, during, and after checks. Nesting: A single method with no branches or loops keeps nesting minimal. Clarity of intent: Descriptive variable names and assertions communicate the test's purpose, although positional numeric arguments and inherited helpers require external context. Code length: The test is concise, with little unnecessary code, though some imports appear unused. Action granularity: Each statement performs one clear action; line wrapping preserves readability. Reading flow: Spacing and chronological grouping make the test easy to follow. The missing closing brace for the class makes the supplied snippet appear incomplete.
Run 2
Code Structure: The test is logically organized into before, during, and after recurrence checks, with whitespace separating stages. Nesting: Only class and method scopes are present, keeping the code flat. Clarity of intent: Descriptive variable names and assertions convey the test's purpose, but positional numeric arguments and the generic testRecurrence name obscure exact recurrence semantics. Code length: The test is concise, although some imports appear unused in the provided excerpt. Action granularity: Each statement performs one clear action; the wrapped initialization remains easy to follow. Reading flow: Setup followed by chronological boundary checks is natural and consistent. The missing closing class brace makes the excerpt appear incomplete.
Run 3
Code Structure: The test is logically organized into recurrence setup and before/during/after checks. Nesting: The method is flat, with no nested control flow. Clarity of intent: Descriptive variable names and assertions convey the test's purpose, though positional numeric arguments and inherited helpers require external context. Code length: The example is concise, but unused imports add clutter. Action granularity: Each statement performs one action; the wrapped setup call remains easy to follow. Reading flow: Blank lines separate meaningful phases, although grouping each calendar creation with its assertion could improve locality. The missing closing class brace makes the provided snippet appear incomplete.