Sample
Schnappinger/junit4/junit.framework.JUnit4TestAdapter
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 39.5Δ 30.0 |
| Scalabrino | 0.714 | 0–1; higher is more readable | 41.1Δ 28.4 |
| Dorn | 0.877 | 0–1; higher is more readable | 94.7Δ 25.2 |
| Mi | 0.471 | 0–1; higher is more readable | 29.7Δ 39.8 |
| LLOC | 36 | Logical lines; fewer is more readable | 46.0Δ 23.4 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 66.8Δ 2.6 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 4.3 |
| BTTF | 0.577 | 0–1; higher is more readable | 53.5Δ 16.0 |
| Human | 3.95 | 1–4; original rating | 69.5 |
Views
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. | 2816.944 | −92.959 |
| Source linesThe number of non-empty source lines. | 86 | +34.4 |
| 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.644 | −6.966 |
Intercept 8.87 + feature contributions = -56.655 (log-odds).
Score = sigmoid(-56.655) = 0.
| Score | 0.714 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 84 | +2.168 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 86 | −2.009 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 84.822 | +0.776 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 89 | +0.632 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 88.942 | −0.102 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.031 |
Intercept 0.07 + feature contributions = 1.964 (log-odds).
Score = sigmoid(1.964) = 0.877.
| Score | 0.471 |
|---|
| Score | 36 |
|---|
Run 1
The code is well-structured with clear separation of concerns and sensible method ordering. Nesting is minimal, with only one level in the removeIgnored loop. Intent is generally clear from method names and the use of the JUnit framework abstractions. The class is concise for what it does; there's no obvious bloat. Actions are mostly granular, one per line, and the reading flow progresses logically from construction through behavior to reflective helpers. The main readability weaknesses are the slightly cryptic field names prefixed with 'f', and the private helper methods appear after their use, which is acceptable but not ideal. Overall, it is easy to follow.
Run 2
The code demonstrates excellent readability through clear structure, consistent naming conventions, and logical organization. The class follows a cohesive adapter pattern with well-separated methods. Nesting is minimal with only one level in the removeIgnored method's loop. Each method has a single clear purpose, proven by descriptive names like removeIgnored, isIgnored, and getTestClass. Field names use 'f' prefix consistently (fRunner, fCache, fNewTestClass), aiding identification of instance variables. Comments appropriately explain Eclipse-specific reflective interfaces. The removeIgnored method is particularly well-written—it recursively filters ignored tests logically and readably. Code length is concise; no method exceeds necessary length. Action granularity maintains one action per line without excessive fragmentation. Reading flow follows natural progression from construction to behavior to utility methods. Minor deductions: the dual constructor delegation could confuse some readers, and the reflective interface comments are slightly mysterious without context, but overall this is production-quality readable code.
Run 3
The code is well-structured and readable. It follows a clean class organization with clear separation of concerns (adapter pattern). Methods are focused and concise, each performing a single responsibility. Naming is descriptive and follows Java conventions. The nesting level is minimal, with only a single level in the recursive `removeIgnored` method and the loop within it. Reading flow is natural, progressing from construction to count, run, reflective accessors, and description filtering. The recursive helper method `removeIgnored` and `isIgnored` are clear in intent and keep complexity localized. One minor readability consideration is the use of Java's older 'f' prefix for fields, which some may find less modern, but it's a common JUnit convention and consistent throughout. Overall, the code is highly readable.
Run 1
Code Structure: Fields, constructors, and small, focused methods are logically organized, with delegation clearly separated from recursive description processing. Nesting: Mostly flat; removeIgnored uses only a loop with one nested conditional and an early return. Clarity of intent: Method names communicate purpose well, although legacy f-prefixed fields and the generic variable each are less descriptive. Code length: Concise, with little redundancy or unnecessary boilerplate. Action granularity: Statements generally perform one action per line; chained calls are short and understandable. Reading flow: Consistent formatting and straightforward delegation make the class easy to follow. The recursive filtering method is readable, though a brief explanation of ignored-node handling and consistent @Override annotations would improve clarity.
Run 2
Code Structure: Fields, constructors, and focused methods are logically organized, with runner delegation separated from description filtering. Nesting: Mostly flat; removeIgnored uses only a loop with one nested conditional and a clear early return. Clarity of intent: Method names and delegation make the adapter's purpose clear, though legacy f-prefixed fields and generic names such as each slightly reduce expressiveness. Code length: Concise, with little duplication or unnecessary logic. Action granularity: Each statement performs one clear action, and intermediate variables make recursive filtering easy to follow. Reading flow: Consistent formatting and short methods support natural reading; the recursive helper is straightforward. Minor weaknesses include missing @Override annotations on implemented interface methods and comments that provide limited context.
Run 3
Code Structure: Well-organized adapter with focused methods and clearly separated responsibilities. Nesting: Mostly flat; the recursive ignore-removal method has only a loop and a nested conditional, remaining easy to follow. Clarity of intent: Descriptive method names and straightforward delegation make the purpose clear, though legacy f-prefixed fields and the generic variable name 'each' slightly reduce clarity. Code length: Concise, with little unnecessary code; short forwarding methods suit the adapter pattern. Action granularity: Statements generally perform one action per line, and intermediate variables clarify recursive processing. Reading flow: Constructors, accessors, description processing, and runner operations follow a sensible sequence. Consistent formatting supports scanning, although grouping filter and sort with other runner operations and consistently adding @Override annotations would improve navigation.