Sample
Scalabrio31
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 14.6Δ 12.8 |
| Scalabrino | 0.136 | 0–1; higher is more readable | 10.1Δ 17.3 |
| Dorn | 0.538 | 0–1; higher is more readable | 62.3Δ 34.9 |
| Mi | 0.07 | 0–1; higher is more readable | 28.1Δ 0.8 |
| LLOC | 18 | Logical lines; fewer is more readable | 31.2Δ 3.8 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 38.7Δ 11.3 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 34.7Δ 7.3 |
| BTTF | 0.522 | 0–1; higher is more readable | 45.7Δ 18.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. | 1374.418 | −45.356 |
| Source linesThe number of non-empty source lines. | 29 | +11.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.876 | −7.314 |
Intercept 8.87 + feature contributions = -32.2 (log-odds).
Score = sigmoid(-32.2) = 0.
| Score | 0.136 |
|---|
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. | 130 | −1.841 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 130 | +1.293 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.077 | +0.189 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 23 | +0.058 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 27.641 | −0.023 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 29 | +0.01 |
Intercept 0.07 + feature contributions = 0.153 (log-odds).
Score = sigmoid(0.153) = 0.538.
| Score | 0.07 |
|---|
| Score | 18 |
|---|
Run 1
The code is moderately readable. The structure is fairly logical, and the intent is mostly clear: parse a filter element, resolve its condition, collect aliases, and apply the filter. Nesting is minimal, with only one loop, and the reading flow is adequate. However, several issues reduce clarity: the TODO comment is overly long and highlights a problematic dependency, the condition-resolution chain relies on repeated isEmpty checks, and multiple actions are packed into some lines (e.g., map insertion and boolean parsing). Variable naming is generally clear, but the alias extraction block lacks explanation. The use of `getFilterDefinition(name)` without a null check could also be ambiguous. Overall, the code is understandable but could be more concise and self-documenting.
Run 2
The code is moderately readable but has several issues. The method has a clear purpose and logical flow, but it mixes multiple concerns: extracting attributes, resolving conditions, parsing aliases, and applying filters. The TODO comment is lengthy and interrupts the reading flow. Nesting is minimal, which is good, but action granularity is inconsistent—some lines combine multiple operations (e.g., the ternary for autoAliasInjection). Variable naming is generally clear, though 'condition' is reused multiple times. The loop for parsing aliases is straightforward but uses raw Iterator and untyped Element, requiring casting. Error handling is present but basic. Overall, the code is understandable but could be broken into smaller methods with clearer separation of concerns.
Run 3
The code has a clear overall purpose and follows a single-task flow, but readability is limited by several factors. The structure is linear and functional, yet the large TODO comment disrupts reading flow and feels like a tangent. Nesting is mostly flat, which is positive, except for the while loop with an if-structure inside the alias parsing section. Intent is mostly clear but becomes muddled due to repeated null/empty checks on 'condition' with contextual fallbacks that are not immediately obvious. Code length is reasonable, though verbose generic declarations (e.g., 'java.util.Map<String, String> aliasTables = new HashMap<String, String>();') add noise. Action granularity is generally one action per line, but line 20-21 combine alias extraction and map insertion, which slightly hurts clarity. Overall, it is understandable but could benefit from extraction of alias parsing and removal of the inline TODO block.
Run 1
Code Structure: Logically organized into condition resolution, validation, alias collection, and filter registration, though these phases lack visual separation. Nesting: Shallow conditionals and a single loop make control flow easy to follow. Clarity of intent: Descriptive names and straightforward fallback logic communicate the purpose well; the lengthy TODO and unexplained null argument introduce uncertainty. Code length: Mostly concise, but the TODO dominates the method and the autoAliasInjection expression is unnecessarily long. Action granularity: Generally one action per line, although alias extraction and insertion are combined in one statement. Reading flow: Execution proceeds naturally from parsing to registration, but inconsistent spacing, a raw Iterator, and mixed qualified and unqualified collection types slightly disrupt readability.
Run 2
Code Structure: Logically groups condition resolution, validation, alias collection, and filter application, though separating these phases would improve organization. Nesting: Shallow conditionals and one simple loop make control flow easy to follow. Clarity of intent: Descriptive names and explicit fallback logic communicate the purpose well; the ordering dependency and unexplained final null argument introduce ambiguity. Code length: Reasonably concise, but the lengthy TODO interrupts the implementation and the boolean assignment is visually long. Action granularity: Most lines perform one action, although alias extraction and insertion are combined, as are condition checking and boolean conversion. Reading flow: Mostly natural and sequential, with minor distractions from inconsistent spacing, a raw iterator requiring a cast, and inconsistent use of fully qualified types.
Run 3
Code Structure: Logically groups condition resolution, validation, alias collection, and filter registration, though these phases lack explicit separation. Nesting: Shallow conditionals and a single loop make control flow easy to follow. Clarity of intent: Descriptive names and straightforward API calls communicate the purpose; the lengthy TODO explains an ordering dependency but interrupts comprehension. Code length: Mostly concise, although the TODO and long ternary assignment add visual weight. Action granularity: Generally one action per line, with the alias insertion and final registration compactly combining several arguments. Reading flow: Follows a natural progression from parsing to application, but inconsistent spacing, a raw Iterator with a cast, and the fully qualified Map declaration introduce minor distractions.