Sample
Scalabrio130
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 6.5Δ 20.9 |
| Scalabrino | 0.221 | 0–1; higher is more readable | 17.1Δ 10.3 |
| Dorn | 0.511 | 0–1; higher is more readable | 58.3Δ 30.9 |
| Mi | 0.036 | 0–1; higher is more readable | 17.1Δ 10.3 |
| LLOC | 29 | Logical lines; fewer is more readable | 5.5Δ 21.9 |
| DeepSeek V4 Pro | 14.33 | 0–20; mean of three runs | 54.3Δ 26.9 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 31.2 |
| BTTF | 0.513 | 0–1; higher is more readable | 43.7Δ 16.3 |
| Human | 3.22 | 1–5; original rating | 27.4 |
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. | 1935.813 | −63.882 |
| Source linesThe number of non-empty source lines. | 36 | +14.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.816 | −7.224 |
Intercept 8.87 + feature contributions = -47.836 (log-odds).
Score = sigmoid(-47.836) = 0.
| Score | 0.221 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109 | +0.954 |
| 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. | 108.972 | −0.95 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 35 | +0.473 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 34 | −0.359 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 36 | −0.238 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 34.873 | +0.078 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.017 |
Intercept 0.07 + feature contributions = 0.044 (log-odds).
Score = sigmoid(0.044) = 0.511.
| Score | 0.036 |
|---|
| Score | 29 |
|---|
Run 1
The test method has a clear purpose and follows a logical sequence: set properties, create factory, verify entity region, then collection region, with cleanup in a finally block. However, it is overly long and repetitive, with multiple assertions and cache configuration checks that could be refactored into helper methods. The nesting is minimal, but the method does multiple things—property setup, factory creation, entity assertions, collection assertions—reducing clarity. Action granularity is mostly one action per line, which is good, but the method would benefit from extracting setup and verification steps. The indentation is inconsistent (the method signature is indented 3 spaces), and magic strings like property keys are duplicated, hurting readability. Overall, the logic is understandable, but the method’s length and repetition make it less readable than it could be.
Run 2
The test method is logically organized and follows a clear setup-exercise-assert pattern. Property assignments are grouped by entity/collection with sensible naming, and assertions are straightforward. Nesting is minimal thanks to the try/finally block. However, readability suffers slightly from repeated setup code (could be extracted into helper methods or a builder), multiple assertions per logical block without blank lines, and some visual clutter from long property names and line wraps. The code is concise overall but could benefit from grouping related actions or adding comments to separate the entity and collection test phases.
Run 3
The code has a clear purpose and follows a logical structure, with setup, execution, and cleanup. It uses a try-finally block for resource management, which is good. However, readability is hampered by multiple actions per line (e.g., setting properties and assertions) and moderate nesting. The test method name clearly conveys intent, but repetitive property setting and assertions could be extracted for clarity. The flow is natural, though the lack of empty lines between logical sections makes it feel dense. Variable names are mostly clear, and assertions are direct, but the code would benefit from better separation of concerns and reduced line density.
Run 1
Code Structure: Logically organized into configuration, entity checks, collection checks, and cleanup, though separating the two scenarios could improve focus. Nesting: Shallow, with only a try/finally block. Clarity of intent: The descriptive test name, explicit assertions, and configuration comment make the purpose clear; the abbreviated variable p and unexplained getCacheManager() call slightly reduce clarity. Code length: Reasonably concise, although repeated property prefixes and assertion patterns add some verbosity. Action granularity: Each statement performs one action, making individual steps easy to follow. Reading flow: Natural setup-to-verification progression with reliable cleanup; reusing cache and cacheCfg across scenarios requires readers to track reassignment.
Run 2
Code Structure: Logically organized into configuration setup, entity-region checks, collection-region checks, and cleanup. Nesting: Shallow, with only a try/finally block. Clarity of intent: The descriptive test name, explicit assertions, and configuration comment make the purpose clear; the generic variable name p and unused getCacheManager() result slightly obscure intent. Code length: Reasonably concise, although repeated configuration and assertion patterns add some verbosity. Action granularity: Each statement performs one clear action. Reading flow: Setup naturally precedes verification and cleanup, with whitespace separating the two region checks. Reusing cache and cacheCfg across sections requires minor mental tracking, but overall the test is straightforward to read.
Run 3
Code Structure: Logically organized into configuration setup, entity assertions, collection assertions, and cleanup. Nesting: Shallow, with only a try/finally block. Clarity of intent: The descriptive test name, explicit properties, and assertions clearly communicate the behavior under test; however, abbreviated names such as p and cacheCfg and the unexplained getCacheManager() call slightly obscure intent. Code length: Appropriate for testing two related cases, though repetitive configuration and assertion sequences add some verbosity. Action granularity: Each statement performs one clear action, making individual steps easy to inspect. Reading flow: Setup naturally leads to verification and guaranteed cleanup. Reusing cache and cacheCfg across the two cases slightly increases tracking effort, and additional visual separation between setup and assertions would improve scanning.