Sample
Schnappinger/junit4/org.junit.internal.runners.statements.InvokeMethod
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.008 | 0–1; higher is more readable | 70.2Δ 10.5 |
| Scalabrino | 0.735 | 0–1; higher is more readable | 44.9Δ 14.9 |
| Dorn | 0.694 | 0–1; higher is more readable | 74.9Δ 15.2 |
| Mi | 0.691 | 0–1; higher is more readable | 81.5Δ 21.8 |
| LLOC | 7 | Logical lines; fewer is more readable | 75.9Δ 16.2 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 23.3 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 92.6Δ 32.8 |
| BTTF | 0.702 | 0–1; higher is more readable | 81.5Δ 21.8 |
| Human | 3.93 | 1–4; original rating | 59.7 |
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. | 435.989 | −14.388 |
| Source linesThe number of non-empty source lines. | 19 | +7.6 |
| 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.631 | −6.946 |
Intercept 8.87 + feature contributions = -4.864 (log-odds).
Score = sigmoid(-4.864) = 0.008.
| Score | 0.735 |
|---|
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. | 68 | +0.785 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 18 | +0.399 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.075 | +0.214 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 17.696 | −0.162 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 19 | −0.08 |
Intercept 0.07 + feature contributions = 0.819 (log-odds).
Score = sigmoid(0.819) = 0.694.
| Score | 0.691 |
|---|
| Score | 7 |
|---|
Run 1
The code is highly readable. It follows a clear, logical structure: package declaration, imports, class declaration with fields and methods. Nesting is minimal, with only a single method body. Intent is clear—this class invokes a test method on a target object. Code length is concise and appropriate for its purpose. Action granularity is good: the evaluate method performs one logical action (invoking the method) in a single line. Reading flow is natural, with fields named using the 'f' prefix convention, and constructor parameters clearly mapped to fields. Minor deductions: the 'f' prefix and lack of JavaDoc could reduce immediate clarity for developers unfamiliar with the convention, and the class name 'InvokeMethod' is slightly generic but still descriptive.
Run 2
The code is highly readable. It has a clear, logical structure: a small class with a single responsibility. Nesting is minimal, with only one method and no conditional or loop constructs. The intent is straightforward — to invoke a test method on a target object. The code is concise, with no unnecessary length. Action granularity is good, as the single meaningful operation in evaluate() is on its own line. Reading flow is natural: fields are declared first, then the constructor, then the overridden method. The only minor drawbacks are the slightly dated Hungarian-style field prefixes ('f') and the lack of null checks or validation, but these do not significantly impact clarity.
Run 3
The code is highly readable. It has a clear, logical structure with a single responsibility: invoking a test method. There is no unnecessary nesting, and the method is flat. The intent is unambiguous from class and method names like 'InvokeMethod' and 'evaluate'. It is concise with no boilerplate or redundant code. Each action is on its own line, and the reading flow is natural — constructor sets up dependencies, then evaluate uses them. Minor deductions are only for the non-descriptive parameter names 'fTestMethod' and 'fTarget' (the 'f' prefix is unconventional) and the slightly ambiguous exception handling where 'Throwable' is propagated without context.
Run 1
Code Structure: Logically organized into fields, constructor, and overridden execution method. Nesting: Flat, with no nested control flow. Clarity of intent: The class and method names clearly indicate invocation of a test method on a target, though the legacy 'f' field prefixes slightly reduce naming clarity. Code length: Concise, with no unnecessary implementation. Action granularity: Each assignment and invocation occupies its own line. Reading flow: Natural progression from dependencies and state to initialization and execution makes the code easy to follow.
Run 2
Code Structure: A logically organized class with fields, constructor, and overridden method. Nesting: Flat, with no nested control flow. Clarity of intent: The class and method names clearly convey invoking a test method on a target, though the f-prefixed fields and invokeExplosively name are slightly less intuitive. Code length: Concise, with no unnecessary logic or boilerplate. Action granularity: Each assignment and invocation occupies its own line. Reading flow: Natural progression from dependencies to state initialization to execution.
Run 3
Code Structure: The class is logically organized into fields, constructor, and overridden execution method. Nesting: There is no nested control flow. Clarity of intent: Class and method names clearly communicate that the statement invokes a test method on a target; the legacy f-prefixed field names slightly reduce naming clarity. Code length: The implementation is concise with no unnecessary logic. Action granularity: Each assignment and invocation occupies its own line. Reading flow: The progression from stored dependencies to initialization to execution is natural and easy to follow.