Sample
Scalabrio28
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 26.1Δ 24.9 |
| Scalabrino | 0.044 | 0–1; higher is more readable | 3.0Δ 1.8 |
| Dorn | 0.021 | 0–1; higher is more readable | 5.0Δ 3.8 |
| Mi | 0.038 | 0–1; higher is more readable | 18.6Δ 17.3 |
| LLOC | 16 | Logical lines; fewer is more readable | 40.2Δ 38.9 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 80.9Δ 79.6 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 57.3 |
| BTTF | 0.441 | 0–1; higher is more readable | 20.1Δ 18.8 |
| Human | 2.33 | 1–5; original rating | 1.3 |
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. | 1269.981 | −41.909 |
| Source linesThe number of non-empty source lines. | 34 | +13.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.813 | −7.219 |
Intercept 8.87 + feature contributions = -26.658 (log-odds).
Score = sigmoid(-26.658) = 0.
| Score | 0.044 |
|---|
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. | 175 | −3.747 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 34 | −0.167 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.082 | +0.149 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 32.619 | +0.046 |
Intercept 0.07 + feature contributions = -3.859 (log-odds).
Score = sigmoid(-3.859) = 0.021.
| Score | 0.038 |
|---|
| Score | 16 |
|---|
Run 1
The code is well-structured with clear intent and follows a logical flow: read annotations, process discriminator column, validate, then set properties. Nesting is minimal with only two single-level if blocks. Action granularity is good—mostly one logical operation per line, though variable declarations near annotations slightly reduce flow. The ternary expressions are concise but could be considered slightly dense for readability. Method length is appropriate, and method name clearly indicates purpose. Minor improvements could include extracting the DiscriminatorValue annotation retrieval for clarity or adding a comment explaining edge case handling, but overall the code is highly readable.
Run 2
The method demonstrates clear, readable code with several strengths. The structure is logical and follows a natural flow: extracting annotations, processing them, and applying results. Nesting is minimal with only one if-statement containing a simple log call. Variable names are descriptive (discriminatorColumn, discAnn, discFormulaAnn) and the ternary operators for extracting annotation values are concise without sacrificing clarity. The method is reasonably short, avoiding unnecessary verbosity. Action granularity is good—one main action per line, keeping related operations together. The reading flow is intuitive. Minor deductions: the repeated clazzToProcess.getAnnotation calls could be simplified, and the conditional logic for DiscriminatorOptions could be slightly clearer with early returns or extracted methods. Overall, the code is well-organized and easy to follow.
Run 3
The code is moderately readable with clear variable naming and logical separation of steps. It uses early termination through conditional blocks rather than deep nesting. However, readability suffers from repeated fully-qualified annotation names that create visual clutter, and the ternary operators squeeze multiple actions into single lines. The method does three distinct things—handles discriminator column, handles discriminator value, and handles discriminator options—but lacks explicit separation comments or extracted methods for each responsibility. The conditional logic around `discAnn` and `inheritanceState.hasParents()` is slightly confusing because the same conditions appear in different blocks. While the code is structured and generally flat, the excessive line-breaking of annotation references and mixed action density make it harder to scan quickly.
Run 1
Code Structure: Logically groups annotation retrieval, discriminator column construction, validation, and binder configuration. Nesting: Shallow conditionals with no nested blocks make execution easy to follow. Clarity of intent: Descriptive method and API names communicate purpose, although abbreviated variables such as discAnn and discrimValue slightly reduce clarity. Code length: Reasonably concise, but fully qualified annotation names and heavily wrapped expressions add visual bulk. Action granularity: Each statement performs a distinct action, with assignments and binder updates clearly separated. Reading flow: Progresses naturally from reading metadata to applying settings and returning the result. Repeated hasParents() checks, mixed naming conventions, and minor spacing inconsistencies prevent a higher score.
Run 2
Code Structure: Logically groups annotation retrieval, column construction, validation, and binder configuration. Nesting: Shallow conditionals and simple ternaries keep complexity low. Clarity of intent: Descriptive method and variable names communicate discriminator processing, though framework knowledge is needed to understand inheritance rules and the nullable return. Code length: Reasonably concise, with some verbosity from fully qualified types and multiline annotation calls. Action granularity: Each statement performs one distinct action; no crowded multi-action lines. Reading flow: Progresses naturally from reading metadata to applying configuration and returning the result. Repeated hasParents() checks and inconsistent spacing slightly reduce polish.
Run 3
Code Structure: Logically groups annotation retrieval, discriminator-column construction, validation, and binder configuration. Nesting: Shallow conditionals make control paths easy to follow. Clarity of intent: Descriptive method and API names explain the purpose, though abbreviated variables such as discAnn and discrimValue slightly reduce clarity. Code length: Reasonably concise, but fully qualified annotation names and heavily wrapped calls add visual bulk. Action granularity: Each statement performs one main action, with assignments and configuration calls clearly separated. Reading flow: Progresses naturally from reading metadata to constructing and configuring the discriminator, then returning the result. Minor formatting inconsistencies and repeated hasParents() checks slightly interrupt the flow.