Sample
Scalabrio51
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 41.7Δ 1.8 |
| Scalabrino | 0.581 | 0–1; higher is more readable | 57.8Δ 17.8 |
| Dorn | 0.702 | 0–1; higher is more readable | 79.4Δ 39.4 |
| Mi | 0.327 | 0–1; higher is more readable | 60.3Δ 20.4 |
| LLOC | 9 | Logical lines; fewer is more readable | 72.6Δ 32.7 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 31.4Δ 8.5 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 19.6Δ 20.4 |
| BTTF | 0.601 | 0–1; higher is more readable | 70.9Δ 30.9 |
| Human | 3.44 | 1–5; original rating | 39.9 |
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. | 988.157 | −32.609 |
| 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.06 | −6.091 |
Intercept 8.87 + feature contributions = -17.43 (log-odds).
Score = sigmoid(-17.43) = 0.
| Score | 0.581 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 79.935 | +0.485 |
| 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. | 79.968 | +0.278 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.152 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 21 | −0.061 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 21 | −0.011 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.679 | +0.005 |
Intercept 0.07 + feature contributions = 0.857 (log-odds).
Score = sigmoid(0.857) = 0.702.
| Score | 0.327 |
|---|
| Score | 9 |
|---|
Run 1
The code has a clear purpose and follows a logical structure with a single loop and a three-way conditional. However, readability suffers from deep nesting: the if-else chain contains nested conditions with multiple method calls, including chained `getCurrentShortcut()` calls. Lines are long and break awkwardly, making the reading flow feel fragmented. Action granularity is inconsistent — some lines bundle several operations (e.g., `Configuration.setString(Configuration.makeKey(oldAction.getKey()), "")`), while others are stretched across multiple lines. Variable naming is okay, but the repeated `newActions[i]` adds noise; extracting a local variable would help. Comments are present but slightly verbose. Overall, the code is understandable but requires effort to parse due to the dense conditions and formatting.
Run 2
The method's intent is clear from its Javadoc and name, but the implementation has readability issues. The loop contains a deeply nested if-else chain with three branches, each performing different actions. Multiple method calls are chained on single lines, violating action granularity. The conditions themselves are complex multi-line expressions with negated checks (e.g., '== null' followed by '!= null'), making the logic harder to follow. Accessing 'oldAction' repeatedly and mixing it with 'newActions[i]' creates confusion about which action is being referenced. The comments help explain each branch's purpose but don't compensate for the tangled structure. The code would benefit from extracting the three branches into separate methods and simplifying conditions with helper methods like 'isDefaultShortcutVoided()' or 'isCustomShortcutSet()'. Line breaks within method calls are inconsistent, and the overall flow requires careful reading to understand the decision logic.
Run 3
The code is moderately readable but suffers from several issues. It has a logical three-branch conditional structure, but the nested method calls and multi-line conditions create complexity. The intent is partially clear through comments, but the comments describe 'what' rather than 'why', and the variable naming ('oldAction', 'newActions') is confusing since the code operates on the same action object retrieved from the hash. Lines are excessively long due to chained method calls, making the reading flow choppy. Action granularity is violated - each line performs multiple operations. The loop structure is standard but the method does too much: it retrieves, compares, formats, saves, and removes configuration in one dense block. Extracting helper methods for shortcut comparison, formatting, and configuration updates would significantly improve readability. The exception handling and null checks add necessary depth but could be simplified with early returns or a cleaner decision table approach.
Run 1
Code Structure: A single-purpose method with logically organized branches for saving cleared shortcuts, saving overrides, or removing configuration entries. Nesting: Only a loop and one conditional chain, keeping nesting manageable. Clarity of intent: The method name, documentation, and comments explain the purpose, but repeated array access and the indirect use of oldAction obscure details. Code length: Reasonably concise, though local variables for the action, shortcuts, and configuration key would reduce repetition. Action granularity: Each statement performs one primary action, although nested method calls make individual statements harder to parse. Reading flow: The branches follow a natural progression, but awkward line wrapping and somewhat imprecise comments interrupt readability.
Run 2
Code Structure: A single loop with three logically organized branches handles shortcut persistence. Nesting: Shallow nesting keeps control flow easy to follow. Clarity of intent: The method name, documentation, and comments explain the purpose, though the role of oldAction and some comment wording are unclear. Code length: Reasonably concise, but repeated newActions[i] accesses and configuration-key construction add avoidable verbosity. Action granularity: Each statement performs one main action, although nested calls make some statements visually dense. Reading flow: The branch sequence is natural, but awkward line wrapping and repeated expressions interrupt scanning. Local variables for the current action, shortcuts, and configuration key would improve readability.
Run 3
Code Structure: A single method organizes shortcut persistence into three logical cases. Nesting: Only a loop and one conditional chain, keeping depth manageable. Clarity of intent: The method name, documentation, and comments explain the purpose, although awkward comment wording and the distinction between oldAction and newActions obscure details. Code length: Reasonably short, but repeated array indexing, shortcut getters, and configuration-key construction add avoidable verbosity. Action granularity: Each statement performs one primary action, though nested calls make some statements harder to scan. Reading flow: The sequence from clearing a default shortcut to saving an override to removing an unnecessary entry is natural; excessive line wrapping and repeated expressions interrupt readability.