Sample
Scalabrio159
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 73.4Δ 20.4 |
| Scalabrino | 0.313 | 0–1; higher is more readable | 28.1Δ 24.9 |
| Dorn | 0.105 | 0–1; higher is more readable | 17.1Δ 35.9 |
| Mi | 0.041 | 0–1; higher is more readable | 20.1Δ 32.9 |
| LLOC | 6 | Logical lines; fewer is more readable | 86.9Δ 33.9 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 85.7Δ 32.7 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 98.0Δ 45.0 |
| BTTF | 0.362 | 0–1; higher is more readable | 8.5Δ 44.5 |
| Human | 3.67 | 1–5; original rating | 53.0 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 420.432 | −13.874 |
| 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.729 | −7.093 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -8.097 (log-odds).
Score = sigmoid(-8.097) = 0.
| Score | 0.313 |
|---|
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. | 128 | −1.756 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 10 | +0.682 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.767 | −0.287 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.074 | +0.226 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 10 | +0.191 |
Intercept 0.07 + feature contributions = -2.138 (log-odds).
Score = sigmoid(-2.138) = 0.105.
| Score | 0.041 |
|---|
| Score | 6 |
|---|
Run 1
The code is generally readable with clear intent and good structure. It creates a supplier, retrieves value sources, extracts string values, and asserts both count and content. The nesting is minimal (only method-level), and each line performs a single logical action. However, readability is slightly reduced by the long method name 'methodWantingAllNamedStrings' and the multi-item assertion line, which could be broken into separate assertions or a helper method for clarity. The indentation of the @Test annotation is inconsistent, which is a minor style issue. Overall, the test is concise and focused but could benefit from slightly better formatting and assertion organization.
Run 2
The code is well-structured and readable. The test method follows a clear Arrange-Act-Assert pattern: it creates a supplier, retrieves assignments, extracts string values, and then verifies both size and content. Nesting is flat, with no conditional blocks or loops. Intent is obvious from the descriptive method and variable names (e.g., 'shouldReturnOnlyTheNamedDataPoints', 'getStringValuesFromAssignments'). Code length is concise—no unnecessary lines or boilerplate. Each line performs a single logical action, maintaining clean action granularity. The reading flow is natural: instantiation, data retrieval, transformation, then assertions. Minor deductions: the method throws a generic 'Throwable', and the 'signature' helper is somewhat opaque, but these are minor and common in test code. Overall, the code is highly readable with clear intent and logical organization.
Run 3
The code is highly readable with a clear, logical structure. It follows a straightforward Arrange-Act-Assert pattern: set up the supplier, retrieve assignments, extract values, and assert results. Nesting is minimal, with only one method call inside another on a single line. The intent is clear from descriptive method and variable names. The code is concise without unnecessary verbosity. Each action is on its own line, enhancing clarity. The reading flow is natural, progressing from setup to verification. Minor deductions could be made for the long assertion line with multiple 'hasItems' arguments, but it remains understandable and idiomatic for Java testing.
Run 1
Code Structure: A well-organized test follows setup, execution, and assertion phases. Nesting: The method is flat, with no nested control flow. Clarity of intent: The descriptive test name, variable names, and explicit expected values clearly communicate the purpose. Code length: The test is concise and contains no unnecessary logic, though two lines are relatively long. Action granularity: Each statement occupies its own line; nested constructor calls slightly compress the setup. Reading flow: Blank lines separate the logical phases, making the test easy to follow from supplier creation through result extraction to verification.
Run 2
Code Structure: Clearly follows arrange-act-assert organization. Nesting: Flat, with no nested control flow. Clarity of intent: The descriptive test name, variable names, and assertions clearly communicate the expected behavior. Code length: Concise and focused, though construction and assertion lines are somewhat long. Action granularity: Each statement performs one primary action; nested constructor calls remain easy to understand. Reading flow: Setup naturally leads to retrieving assignments, extracting strings, and verifying their count and contents. Minor readability limitations include reliance on helper methods for extraction details and the broad throws Throwable declaration.
Run 3
Code Structure: Clearly organized into setup, execution, transformation, and assertions. Nesting: Flat, with only the test method body. Clarity of intent: Descriptive method and variable names make the expected behavior clear. Code length: Concise, with no unnecessary steps, although constructor and assertion lines are long. Action granularity: Each statement performs one main action; nested constructor calls slightly increase complexity. Reading flow: Natural progression from preparing the supplier to checking the number and contents of returned values.