Sample
Dorn/java/182
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.845 | 0–1; higher is more readable | 86.9Δ 11.4 |
| Scalabrino | 0.961 | 0–1; higher is more readable | 99.6Δ 24.1 |
| Dorn | 0.868 | 0–1; higher is more readable | 91.1Δ 15.6 |
| Mi | 0.794 | 0–1; higher is more readable | 97.5Δ 22.0 |
| LLOC | 1 | Logical lines; fewer is more readable | 97.9Δ 22.4 |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs | 99.3Δ 23.8 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 88.9Δ 13.4 |
| BTTF | 0.647 | 0–1; higher is more readable | 85.2Δ 9.7 |
| Human | 3.68 | 1–5; original rating | 75.5 |
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) |
|---|---|---|
| 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.787 | −7.181 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 120.928 | −3.991 |
Intercept 8.87 + feature contributions = 1.699 (log-odds).
Score = sigmoid(1.699) = 0.845.
| Score | 0.961 |
|---|
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. | 59 | +1.166 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.9 | −0.271 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.077 | +0.19 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 59 | +0.148 |
Intercept 0.07 + feature contributions = 1.887 (log-odds).
Score = sigmoid(1.887) = 0.868.
| Score | 0.794 |
|---|
| Score | 1 |
|---|
Run 1
The code is highly readable. It demonstrates a clear, simple structure: a single class that extends PortalException, with a no-argument constructor that calls super(). There is no nesting, and the intent is immediately clear—a custom exception for lock-related errors. The code is concise and contains no unnecessary logic or duplication. Each action is on its own line, and the reading flow is natural, starting with the import, followed by the Javadoc author tag, class declaration, and constructor. The only minor limitation is the lack of method-level documentation, but for such a trivial implementation that is not required.
Run 2
The code is highly readable. It has a clear, logical structure: a single import, a Javadoc author tag, and a simple class definition extending PortalException. There is no nesting, and the intent is unambiguous—a custom exception for lock-related errors. The code is concise but complete, with a clear action granularity (one statement or declaration per line). The reading flow is natural: package import, class-level documentation, class declaration, constructor, and constructor call. Minor deduction is because it lacks a serialVersionUID, which is a common best practice for exceptions, and the Javadoc could include a class-level description beyond the author tag.
Run 3
This code is highly readable due to its clean structure, flat nesting, and clear intent. The class has a single, obvious purpose—representing a lock exception—and extends PortalException appropriately. The constructor is minimal and simply calls super(), with one action per line. There is no unnecessary nesting or disorganized flow. The import is correctly placed, and the Javadoc author tag adds minor documentation. The only deduction is that the code is quite minimal and lacks additional documentation (e.g., a class-level Javadoc explaining when this exception is thrown), but this is a minor issue given the simplicity. Overall, it is concise, well-organized, and easy to understand.
Run 1
Code Structure: logically organized as a simple exception subclass, but the missing final class brace makes the snippet incomplete. Nesting: minimal, with only a class and constructor. Clarity of intent: LockException clearly represents a lock-related exception, though its precise triggering conditions are undocumented. Code length: concise, with no unnecessary complexity. Action granularity: the constructor contains a single, clearly separated superclass call. Reading flow: natural progression from import to documentation, class declaration, and constructor; the abrupt ending slightly disrupts readability.
Run 2
Code Structure: The import, class declaration, and constructor are logically organized, but the class lacks a closing brace. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: The class name and inheritance clearly identify a lock-related exception, though its specific triggering conditions are undocumented. Code length: Very concise, with no unnecessary logic. Action granularity: The constructor performs a single action on its own line. Reading flow: Conventional Java formatting supports natural top-to-bottom reading, but the incomplete class ending interrupts that flow.
Run 3
Code Structure: The import, class declaration, and constructor are logically organized, but the missing closing class brace makes the snippet incomplete. Nesting: Minimal and appropriate. Clarity of intent: The class name and inheritance clearly identify a lock-related exception, though its specific use is undocumented. Code length: Very concise; the explicit no-argument constructor is arguably unnecessary. Action granularity: Each declaration and statement occupies its own line. Reading flow: Conventional Java formatting makes the code easy to follow, with incompleteness being the primary readability issue.