Sample
Schnappinger/junit4/org.junit.runner.notification.StoppedByUserException
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.956 | 0–1; higher is more readable | 88.3Δ 18.8 |
| Dorn | 0.814 | 0–1; higher is more readable | 86.8Δ 17.3 |
| Mi | 0.434 | 0–1; higher is more readable | 26.7Δ 42.7 |
| LLOC | 1 | Logical lines; fewer is more readable | 98.3Δ 28.9 |
| DeepSeek V4 Pro | 19 | 0–20; mean of three runs | 99.7Δ 30.2 |
| GPT-6.1 Sol | 20 | 0–20; mean of three runs | 99.3Δ 29.9 |
| BTTF | 0.842 | 0–1; higher is more readable | 98.0Δ 28.5 |
| Human | 3.95 | 1–4; original rating | 69.5 |
Views
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.748 | −7.123 |
| Source linesThe number of non-empty source lines. | 12 | +4.8 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 105.416 | −3.479 |
Intercept 8.87 + feature contributions = 3.069 (log-odds).
Score = sigmoid(3.069) = 0.956.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.021 | +0.741 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.846 | +0.597 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 13 | +0.576 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 6 | −0.53 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 6 | +0.283 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 11.898 | −0.244 |
| 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. | 87 | −0.02 |
Intercept 0.07 + feature contributions = 1.474 (log-odds).
Score = sigmoid(1.474) = 0.814.
| Score | 0.434 |
|---|
| Score | 1 |
|---|
Run 1
The code is highly readable. It has a clear, focused purpose as a custom exception, with a logical, flat structure and no unnecessary nesting. The package declaration, relevant Javadoc, class definition, and serialVersionUID are well-organized and concise. The action granularity is appropriate, with each declaration on its own line, and the reading flow is natural. Minor deductions: the Javadoc could be slightly more descriptive, and the class is very simple, which limits demonstration of more complex readability aspects.
Run 2
The code demonstrates excellent readability. It is a concise custom exception class with a clear, single purpose. The structure is logical: package declaration, import-free simple class, Javadoc, and a serialVersionUID. Nesting is flat with no conditional logic. Clarity of intent is high — the class name and documentation make its purpose unambiguous. Code length is minimal, containing only what is necessary without redundancy. Action granularity is appropriate, with one field declaration on its own line. The reading flow is natural, following standard Java conventions. Minor deductions only because documentation could be slightly expanded but remains sufficient. Overall, highly readable and maintainable.
Run 3
This code is exceptionally readable. It consists of a single, well-named class with a clear purpose, making the intent immediately obvious. The structure is logical and flat with no nesting or complexity. The code is concise, containing only the essential serialVersionUID field, and each action is cleanly separated. The Javadoc comment provides valuable context about when and why this exception should be used, enhancing clarity. The reading flow is natural and intuitive, from package declaration to class definition.
Run 1
Code Structure: A logically organized, minimal exception class with standard package, documentation, and declaration placement. Nesting: No nested control flow or unnecessary blocks. Clarity of intent: The class name, RuntimeException inheritance, and Javadoc clearly explain its purpose and intended handling. Code length: Concise, with no unnecessary implementation. Action granularity: The sole field declaration occupies its own line. Reading flow: Natural Java conventions make the code easy to scan from package to documentation to class definition.
Run 2
Code Structure: A logically organized exception class with no unnecessary components. Nesting: Only the required class scope; no nested control flow. Clarity of intent: The descriptive class name, RuntimeException inheritance, and Javadoc clearly explain its purpose and intended handling. Code length: Minimal and appropriate for a marker exception. Action granularity: The single field declaration occupies its own line. Reading flow: Standard Java ordering—package, documentation, class declaration, and serialization identifier—makes the code straightforward to read.
Run 3
Code Structure: Logically organized into a package declaration, class documentation, and a minimal exception class. Nesting: Only the necessary class scope, with no nested logic. Clarity of intent: The descriptive class name and Javadoc clearly explain when the exception is thrown and who should handle it. Code length: Concise, with no unnecessary implementation. Action granularity: The sole field declaration occupies its own line. Reading flow: Natural top-to-bottom progression from context and purpose to implementation.