Sample
Dorn/java/207
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.47 | 0–1; higher is more readable | 81.1Δ 17.3 |
| Scalabrino | 0.667 | 0–1; higher is more readable | 71.7Δ 26.6 |
| Dorn | 0.861 | 0–1; higher is more readable | 88.6Δ 9.7 |
| Mi | 0.777 | 0–1; higher is more readable | 96.4Δ 1.9 |
| LLOC | 4 | Logical lines; fewer is more readable | 82.7Δ 15.6 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 93.5Δ 4.9 |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs | 58.6Δ 39.7 |
| BTTF | 0.62 | 0–1; higher is more readable | 78.6Δ 19.8 |
| Human | 4.19 | 1–5; original rating | 98.3 |
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.571 | −6.856 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 185.843 | −6.133 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -0.119 (log-odds).
Score = sigmoid(-0.119) = 0.47.
| Score | 0.667 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 57.909 | +1.212 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| 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. | 9.797 | −0.273 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 58 | +0.131 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.087 | +0.097 |
Intercept 0.07 + feature contributions = 1.822 (log-odds).
Score = sigmoid(1.822) = 0.861.
| Score | 0.777 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly readable due to its clear, logical structure and flat nesting. The class and method names clearly convey their purpose, and the intent is unambiguous. Although only a fragment is shown, it demonstrates concise method implementation. Each line performs a single action (adding a test suite), and the reading flow is natural: create suite, add tests, return it. The Javadoc author tag is extraneous and slightly detracts, but overall the code is exemplary in clarity and organization.
Run 2
The code is highly readable due to its logical structure and clarity of intent. It defines a test suite class that extends BaseTestSuite, with a static `suite()` method assembling nested test suites. The structure is flat with minimal nesting, and each action is on its own line, which improves granularity. Naming is clear and conventional, and the Javadoc author tag adds minor context. The code is concise and efficient, though it is incomplete (missing closing braces and potentially more suite additions), which slightly impacts the overall reading flow. With the expected closing braces included, readability would remain strong. Despite minor incompleteness, the excerpt demonstrates good organization and follows standard testing patterns.
Run 3
The code is generally clean and readable. The structure is logical, with a clear class extending a base test suite. The intent is evident: assemble a test suite with portlet and unit test plans. Nesting is minimal and flat. The main issue is incomplete code: the method lacks a closing brace, a return statement, and the class lacks a closing brace, which hurts readability. Also, the Javadoc only contains an author tag without a description. The action granularity is good—each addTest is on its own line—but the missing return makes the flow feel incomplete.
Run 1
Code Structure: The class and suite method are logically organized, but the snippet is incomplete, lacking closing braces and a return statement. Nesting: Shallow class/method nesting makes it easy to follow. Clarity of intent: Descriptive names and explicit test additions clearly indicate test-suite assembly. Code length: Concise, with no unnecessary implementation detail. Action granularity: Each statement performs one action. Reading flow: Natural progression from suite creation to adding component suites, though the abrupt ending prevents a complete understanding of the method.
Run 2
Code Structure: The visible fragment is logically organized as a test-suite factory, but missing closing braces and a return statement leave it incomplete. Nesting: Shallow class-and-method nesting is easy to follow. Clarity of intent: Descriptive class and method names clearly indicate aggregation of test plans. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs a single action. Reading flow: Initialization followed by test additions reads naturally, although the abrupt ending prevents a complete understanding of the method.
Run 3
Code Structure: The class and suite method are logically organized, with test-suite creation followed by test registration. Nesting: Shallow nesting makes the snippet easy to scan. Clarity of intent: Descriptive class, method, and variable names clearly communicate test-suite assembly. Code length: The visible code is concise, with no unnecessary logic; the author comment adds little explanatory value. Action granularity: Each statement performs one action on its own line. Reading flow: Formatting and statement order provide a natural progression. However, the snippet ends abruptly without returning the suite or closing the method and class, reducing completeness and making the full flow harder to assess.