Sample
Dorn/java/139
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.003 | 0–1; higher is more readable | 64.6Δ 4.5 |
| Scalabrino | 0.646 | 0–1; higher is more readable | 67.8Δ 1.3 |
| Dorn | 0.665 | 0–1; higher is more readable | 61.6Δ 7.5 |
| Mi | 0.72 | 0–1; higher is more readable | 87.5Δ 18.4 |
| LLOC | 13 | Logical lines; fewer is more readable | 50.8Δ 18.2 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 87.9Δ 18.8 |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs | 86.5Δ 17.4 |
| BTTF | 0.634 | 0–1; higher is more readable | 81.1Δ 12.0 |
| Human | 3.57 | 1–5; original rating | 69.1 |
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. | 584.738 | −19.296 |
| 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.818 | −7.227 |
Intercept 8.87 + feature contributions = -5.654 (log-odds).
Score = sigmoid(-5.654) = 0.003.
| Score | 0.646 |
|---|
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. | 70.968 | +0.659 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.117 |
| 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.681 | +0.005 |
Intercept 0.07 + feature contributions = 0.685 (log-odds).
Score = sigmoid(0.685) = 0.665.
| Score | 0.72 |
|---|
| Score | 13 |
|---|
Run 1
The code is highly readable with a clear, consistent structure. It follows a clean wrapper/decorator pattern, with each method delegating to an underlying AuthToken instance. Nesting is minimal—only a single level in the setAuthToken method. Intent is obvious: the class wraps an AuthToken, preserves the original for a reset option, and allows swapping implementations. Code length is concise and appropriate for the functionality. Each action is on its own line, and method delegation is straightforward. The reading flow is natural, with methods grouped logically. Minor deductions: there is an orphaned comment opening (/*) above the class, and the null-check logic in setAuthToken could be slightly condensed with a ternary, though the current form is perfectly clear. Overall, excellent readability.
Run 2
The code is generally readable, with a clear structure and straightforward intent. It follows a clean class layout with fields, constructor, and methods. Nesting is minimal, and action granularity is mostly one action per line. The setAuthToken method has a small conditional, but it does not harm readability. The main downside is a stray comment `*/` at the beginning, which is not part of the provided code block and seems like an artifact. Additionally, the underscore-prefixed field naming is a bit dated, but not confusing. Overall, the code is concise, well-organized, and easy to follow.
Run 3
The code is generally readable with clear method names and a straightforward structure. It uses a wrapper pattern effectively, with a constructor that sets both current and original auth tokens. Methods are concise and delegate to the wrapped object, maintaining single responsibility per method. The 'setAuthToken' method has minimal nesting and clear logic. However, there are minor issues: the stray comment opening `*/` at the top is likely a leftover artifact, and the class lacks Javadoc explaining its purpose. Additionally, the use of underscores in field names is an older Java convention that may reduce modern readability. Overall, the code is clean and easy to follow, but small improvements could enhance clarity.
Run 1
Code Structure: Methods are logically organized around construction, delegation, and token replacement. Nesting: Only a simple if/else introduces nesting. Clarity of intent: Descriptive names make delegation clear, although resetting to the original token when passed null could benefit from documentation. Code length: Short and appropriately concise. Action granularity: Each statement performs one action. Reading flow: Consistent formatting and straightforward method bodies support natural reading. The stray opening comment terminator, missing field declarations, and missing class-closing brace make the supplied snippet incomplete and slightly reduce readability.
Run 2
Code Structure: Methods are logically grouped in a straightforward wrapper class, though missing field declarations and the closing class brace make the excerpt incomplete. Nesting: Minimal; only a simple if/else appears. Clarity of intent: Delegation is clear, and setAuthToken visibly restores the original token when passed null, although that behavior could benefit from documentation. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one action, making execution easy to follow. Reading flow: Constructor, delegated operations, and setter form a natural sequence; consistent formatting helps. The stray opening comment terminator slightly disrupts readability.
Run 3
Code Structure: Methods are logically organized around wrapping and delegating authentication-token operations. Nesting: Only one shallow if/else appears, keeping complexity low. Clarity of intent: Descriptive method and parameter names make delegation clear, and setAuthToken visibly restores the original token when passed null. However, field declarations are missing from the snippet, limiting context. Code length: Short and appropriately concise, with little unnecessary code. Action granularity: Each statement performs a single action, and the constructor assignments are clearly separated. Reading flow: Consistent indentation and spacing support natural reading, although the opening stray comment terminator and missing class-closing brace make the excerpt appear incomplete.