Sample
Scalabrio198
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 54.8Δ 37.9 |
| Scalabrino | 0.592 | 0–1; higher is more readable | 58.8Δ 42.0 |
| Dorn | 0.664 | 0–1; higher is more readable | 75.4Δ 58.5 |
| Mi | 0.026 | 0–1; higher is more readable | 14.1Δ 2.8 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.1Δ 46.2 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 72.9Δ 56.0 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 34.7Δ 17.8 |
| BTTF | 0.523 | 0–1; higher is more readable | 46.7Δ 29.9 |
| Human | 3 | 1–5; original rating | 16.8 |
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. | 835.778 | −27.581 |
| Source linesThe number of non-empty source lines. | 31 | +12.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.635 | −6.953 |
Intercept 8.87 + feature contributions = -13.264 (log-odds).
Score = sigmoid(-13.264) = 0.
| Score | 0.592 |
|---|
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. | 112.968 | −1.12 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113 | +1.019 |
| 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. | 30 | +0.301 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.09 | +0.069 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.798 | +0.007 |
Intercept 0.07 + feature contributions = 0.682 (log-odds).
Score = sigmoid(0.682) = 0.664.
| Score | 0.026 |
|---|
| Score | 11 |
|---|
Run 1
The code is highly readable. It has a clear, logical structure with early return for null entity name, avoiding unnecessary nesting. The if-else blocks for determining the entity persister are flat and easy to follow. The intent is obvious: resolve an entity key, with special handling for non-encapsulated composite identifiers. The code is concise; each line performs a single logical action. Variable names are descriptive and consistent with domain terminology (e.g., entityPersister, identifierState). The comment clarifies a non-obvious branch, improving clarity without being excessive. Indentation and line breaks are well-managed, making the flow natural to read from top to bottom. There is minimal duplication and no ambiguity.
Run 2
The code is moderately readable but has several issues affecting clarity. Structure is logical but hampered by vertical sprawl, with indentation consuming excessive horizontal space and many lines containing only a single brace or short parameter. Nesting is three levels deep, which is acceptable but could be flatter. Intent is reasonably clear: choose an entity persister and generate a key, with a special case for non-encapsulated composite identifiers. However, the long multi-line boolean condition is difficult to parse at a glance. Action granularity is mostly one action per line, which helps readability, but the parameter list spans too many lines. Reading flow is interrupted by the oversized indentation and verbose formatting. The method could be significantly shortened by extracting the persister resolution and the key-generation logic into helper methods, reducing nesting and improving cohesion. Overall, the logic is understandable but the formatting makes it feel longer and more complex than necessary.
Run 3
The code has clear intent - interpreting an entity key with two distinct return paths. The structure is logical with a straightforward decision tree. Nesting is reasonably shallow (max 2-3 levels). However, the composite identifier branch contains a long condition spanning multiple lines with several method calls, making it harder to parse quickly. The line `optionalEntityName` appears twice in the condition, which is slightly redundant. Action granularity is good - one primary operation per branch. Reading flow is natural: validate entity name, get persister, check if composite identifier, generate key. Some minor improvements could reduce cognitive load: extracting the long condition into a well-named boolean method or variable, simplifying the doubly-null-checked entity name logic, and shortening the deeply chained method calls. Overall readable but not exceptional - loses points for the complex condition and slight verbosity in persister retrieval.
Run 1
Code Structure: Logically organized into persister selection, identifier handling, and key generation. Nesting: Moderate nesting is manageable, but an early return for a null entity name would flatten the method. Clarity of intent: Descriptive names and the composite-identifier comment clarify purpose, although the compound condition and specialized API calls require domain knowledge. Code length: Reasonably concise, with some verbosity from repeated metamodel access and unnecessary else blocks after returns. Action granularity: Each statement performs one main action; multiline calls and conditions remain readable. Reading flow: Execution follows a natural sequence, though extracting the identifier property or naming the composite-identifier condition would reduce reading effort.
Run 2
Code Structure: Logically separates persister selection, composite-identifier handling, and key generation. Nesting: Moderate nesting is manageable, but an early return for a null entity name would flatten the method. Clarity of intent: Descriptive names and the composite-identifier comment clarify the purpose, although the compound condition requires domain knowledge. Code length: Reasonably concise, with some repetition in identifier-property access and avoidable else blocks after returns. Action granularity: Statements generally perform one action each; chained calls and the inline cast slightly increase cognitive load. Reading flow: Execution follows a natural sequence, though multiline expressions and the final null-return branch make the main path less direct.
Run 3
Code Structure: Logically separates persister selection from identifier handling, though early returns could simplify the outer conditional. Nesting: Moderate nesting adds indentation but remains manageable. Clarity of intent: Descriptive names and the composite-identifier comment explain the purpose; the chained metamodel checks require domain knowledge. Code length: Mostly concise, with some unnecessary else blocks and repeated identifier-property access. Action granularity: Each statement performs one main action, and the multiline property extraction is easy to follow. Reading flow: Proceeds naturally from entity-name validation to persister lookup and key generation, although the long compound condition briefly interrupts the flow.