Sample

Schnappinger/junit4/org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParametersFactory

Human rating uses the original dataset scale.

Human3.96
Lines18

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.6120–1; higher is more readable
81.6Δ 4.5
Scalabrino0.6140–1; higher is more readable
24.7Δ 52.4
Dorn0.8570–1; higher is more readable
93.7Δ 16.7
Mi0.4790–1; higher is more readable
30.7Δ 46.4
LLOC2Logical lines; fewer is more readable
94.6Δ 17.5
DeepSeek V4 Pro180–20; mean of three runs
91.4Δ 14.4
GPT-6.1 Sol190–20; mean of three runs
92.6Δ 15.5
BTTF0.7830–1; higher is more readable
94.1Δ 17.0
Human3.961–4; original rating
77.1

Views

Source code

package org.junit.runners.parameterized; import org.junit.runner.Runner; import org.junit.runners.model.InitializationError; /** * A {@link ParametersRunnerFactory} that creates * {@link BlockJUnit4ClassRunnerWithParameters}. * * @since 4.12 */ public class BlockJUnit4ClassRunnerWithParametersFactory implements ParametersRunnerFactory { public Runner createRunnerForTestWithParameters(TestWithParameters test) throws InitializationError { return new BlockJUnit4ClassRunnerWithParameters(test); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.259.597−8.567
Source linesThe number of non-empty source lines.18+7.2
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.698−7.047

Intercept 8.87 + feature contributions = 0.457 (log-odds).
Score = sigmoid(0.457) = 0.612.

Score0.614

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.041+0.539
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.75.947+0.448
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.76+0.422
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.19+0.364
Indentation frequencyHow rapidly indentation changes from line to line.13−0.287
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.17.857−0.16

Intercept 0.07 + feature contributions = 1.793 (log-odds).
Score = sigmoid(1.793) = 0.857.

Score0.479
Score2
Run 1

The code is highly readable. It has a clear, logical structure with a single class implementing a focused interface. There is minimal nesting (one class, one method), making it flat and easy to follow. The intent is explicit: the factory creates a specific runner type. The code is concise—no unnecessary complexity or boilerplate beyond what the interface requires. Action granularity is ideal, with one clear action per line in the method body. The reading flow is natural: package, imports, Javadoc, class declaration, method implementation. The Javadoc provides useful context about the factory's purpose. Overall, this is an exemplary small, well-structured Java class.

Run 2

The code is highly readable due to its clear, single-purpose structure. It implements a simple factory interface with one concise method, avoiding unnecessary nesting or complexity. Javadoc and annotations clarify intent, while the method name and return type make the action obvious. The implementation follows a flat, logical flow with one action per line, and the overridden method's signature formatting remains conventional and natural. Minor deductions reflect slight verbosity in interface line wrapping, but overall the code is exemplary in clarity and maintainability.

Run 3

The code is highly readable. It has a clear, logical structure with a single-purpose class implementing a factory interface. Nesting is minimal, with only one method and no conditional blocks. The intent is unambiguous: create a parameterized JUnit runner. Code length is concise without being overly terse. Action granularity is appropriate—one meaningful operation in the method. Reading flow is natural, with a descriptive class name, clear method signature, and informative Javadoc. Minor improvements could include slightly more explanatory comments, but overall the code is exemplary in clarity.

Run 1

Code Structure: Well-organized package, imports, documentation, and a single-purpose factory class. Nesting: Minimal, with only class and method scopes. Clarity of intent: Descriptive names and Javadoc clearly explain which runner the factory creates; an @Override annotation would further clarify interface implementation. Code length: Concise, with no unnecessary logic or boilerplate beyond the required structure. Action granularity: The method contains one straightforward return statement. Reading flow: Natural progression from documentation to class declaration to implementation; wrapping long declarations slightly interrupts the flow but remains easy to follow.

Run 2

Code Structure: Well-organized imports, class documentation, and a single factory method. Nesting: Minimal, with only class and method scopes. Clarity of intent: Descriptive names and Javadoc clearly explain what the factory creates. Code length: Concise, with no unnecessary logic. Action granularity: The method performs one clear action in a single return statement. Reading flow: Natural progression from imports to documentation to implementation; wrapped declarations slightly interrupt scanning. An @Override annotation would make the interface implementation more explicit.

Run 3

Code Structure: A well-organized, single-purpose factory class with minimal imports and helpful documentation. Nesting: Flat implementation with no conditionals or nested blocks beyond the class and method. Clarity of intent: Descriptive class and method names, together with the Javadoc, make the factory's purpose explicit. Code length: Concise, with no redundant logic. Action granularity: The method performs one clear action in a single return statement. Reading flow: Natural progression from package and imports to documentation, class declaration, and implementation. Long identifiers require wrapped declarations, slightly interrupting visual flow, and an @Override annotation would make the interface implementation more explicit.