Sample
Schnappinger/junit4/org.junit.runner.Runner
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 1 | 0–1; higher is more readable | 93.6Δ 33.9 |
| Scalabrino | 0.942 | 0–1; higher is more readable | 96.9Δ 37.2 |
| Dorn | 0.742 | 0–1; higher is more readable | 78.5Δ 18.8 |
| Mi | 0.767 | 0–1; higher is more readable | 93.1Δ 33.3 |
| LLOC | 4 | Logical lines; fewer is more readable | 87.0Δ 27.2 |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs | 96.0Δ 36.3 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 92.6Δ 32.8 |
| BTTF | 0.731 | 0–1; higher is more readable | 88.4Δ 28.7 |
| Human | 3.93 | 1–4; original rating | 59.7 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 43 | +17.2 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 275.783 | −9.101 |
| 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.486 | −6.729 |
Intercept 8.87 + feature contributions = 10.24 (log-odds).
Score = sigmoid(10.24) = 1.
| Score | 0.942 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 99.93 | +0.808 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.017 | +0.774 |
| 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. | 99.977 | −0.569 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 42 | −0.451 |
| 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. | 41.802 | +0.174 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 17 | −0.149 |
Intercept 0.07 + feature contributions = 1.055 (log-odds).
Score = sigmoid(1.055) = 0.742.
| Score | 0.767 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly readable. It follows a clear, logical structure: package declaration, imports, comprehensive Javadoc, class declaration, and methods. Nesting is minimal (no deep indentation or conditional blocks). Intent is explicit through descriptive names and thorough documentation. Length is concise—the class contains only essential methods with no redundant code. Action granularity is appropriate; each statement stands on its own line. Reading flow is natural, moving from high-level purpose to implementation details. Minor deductions: no blank line between the abstract methods and testCount(), and inherited interface methods lack @Override annotations, which could slightly improve clarity.
Run 2
The code is highly readable. It has a clear, flat structure with a single abstract class and two abstract methods, making intent obvious. Javadoc comments are concise and informative, explaining the purpose, usage, and key behaviors without being excessive. Nesting is minimal (only one class and one method body), and each method is short and focused. The `testCount()` method is a single, clear delegation line. Reading flow is natural: class documentation, abstract methods, then a concrete utility method. Minor deductions: the empty Javadoc reference comment in `getDescription()` adds slight noise, and the `p/>` tag is inconsistently used instead of `</p>`, but these are trivial. Overall, it exemplifies clean, maintainable API design.
Run 3
The code is exceptionally readable. It is structured logically with a clear class declaration, well-organized imports, and concise Javadoc comments that explain the purpose and contract. Nesting is minimal—only a single method body with a return statement. The intent is unambiguous: define an abstract Runner contract for JUnit test execution. The code length is appropriate for an abstract base class, avoiding unnecessary boilerplate. Action granularity is one action per line, making flow easy to follow. Reading flow is natural, from class documentation to abstract methods and a concrete helper. Minor deductions for slight verbosity in Javadoc, but overall it exemplifies clean, maintainable API design.
Run 1
Code Structure: A well-organized abstract class groups a small, coherent API with documentation beside each method. Nesting: Effectively flat, with only a single-level method body. Clarity of intent: Descriptive class and method names, explicit types, and useful Javadoc clearly communicate the runner's responsibilities and extension requirements. Code length: The implementation is concise; documentation is somewhat verbose, and the non-Javadoc comment adds little value. Action granularity: Each declaration or statement occupies its own line, and testCount performs one straightforward delegation. Reading flow: Package, import, class documentation, abstract methods, and the concrete convenience method follow a natural order. Minor documentation clutter prevents a perfect score.
Run 2
Code Structure: The class is logically organized, with its abstract API followed by a simple convenience method. Nesting: There is no control-flow nesting, making the code easy to scan. Clarity of intent: Descriptive names and useful documentation clearly communicate the runner's purpose and notification behavior; the inherited getDescription contract is referenced rather than explained directly. Code length: The implementation is concise, though some documentation markup and the non-Javadoc comment add minor clutter. Action granularity: Each declaration or statement performs one clear action; testCount delegates directly to the description. Reading flow: Consistent formatting and a natural progression from class documentation to methods support smooth reading.
Run 3
Code Structure: The class is logically organized, with abstract methods defining its contract followed by a small convenience method. Nesting: There is no unnecessary nesting; the only implementation is a single-level method body. Clarity of intent: Descriptive names and useful Javadoc clearly explain the runner's purpose, subclass requirements, and notification behavior. Code length: The implementation is concise; documentation is proportionate, though the non-Javadoc comment adds little value. Action granularity: Each declaration or operation occupies its own line, and testCount performs one straightforward delegation. Reading flow: The progression from class overview to description, execution, and test counting is natural and easy to follow. Minor dated documentation formatting slightly reduces polish without hindering comprehension.