Sample
Scalabrio15
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 23.6Δ 18.3 |
| Scalabrino | 0.218 | 0–1; higher is more readable | 16.6Δ 11.3 |
| Dorn | 0.098 | 0–1; higher is more readable | 15.6Δ 10.3 |
| Mi | 0.089 | 0–1; higher is more readable | 32.7Δ 27.4 |
| LLOC | 22 | Logical lines; fewer is more readable | 19.3Δ 14.1 |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs | 21.1Δ 15.8 |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs | 11.6Δ 6.3 |
| BTTF | 0.361 | 0–1; higher is more readable | 8.0Δ 2.8 |
| Human | 2.67 | 1–5; original rating | 5.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. | 1411.187 | −46.569 |
| Source linesThe number of non-empty source lines. | 39 | +15.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. | 3.591 | −5.387 |
Intercept 8.87 + feature contributions = -27.486 (log-odds).
Score = sigmoid(-27.486) = 0.
| Score | 0.218 |
|---|
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. | 121 | −1.46 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 39 | +0.612 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 39 | −0.474 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 38 | −0.309 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 37.73 | +0.118 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.032 |
Intercept 0.07 + feature contributions = -2.216 (log-odds).
Score = sigmoid(-2.216) = 0.098.
| Score | 0.089 |
|---|
| Score | 22 |
|---|
Run 1
The code has moderate readability issues. While it uses a simple loop structure and clear if-else branching for option parsing, it suffers from deep nesting (try block containing if-else, with nested if-else inside that), which makes the logic harder to follow. The filter parsing section is particularly complex with several levels of conditional logic. Action granularity is mostly good with one main action per line, but some lines are quite long. The intent is somewhat clear (parsing command-line options), but the distinction between different option types could be clearer. Variable names are descriptive, which helps. The method could benefit from extracting the filter parsing logic into a separate method to reduce nesting and improve reading flow. The error handling is straightforward but adds to the nesting complexity. Overall, the code is functional but requires careful reading to understand all paths through the filter option handling.
Run 2
The code has some positive aspects: it uses descriptive variable names and each line generally performs one action, keeping action granularity manageable. However, the code is deeply nested — up to five levels inside a try block with multiple if-else branches and a nested conditional for handling the '--filter' option. This hurts readability and makes the logic harder to follow. The intent is partially clear (parsing command-line options), but the branching complexity obscures the main flow. The method mixes several responsibilities: parsing, validation, error handling, and filtering, which reduces clarity. The length is moderate but could be shortened by extracting helper methods (e.g., for filter handling or error reporting). Reading flow is disrupted by frequent early returns and breaks within nested blocks. Overall, the code would benefit from flatter structure, fewer nested conditionals, and extracted helper methods to improve clarity.
Run 3
The code's structure is somewhat logical but suffers from deep nesting and multiple responsibilities. The main if-else chain with several nested conditionals makes the intent harder to follow. While each line generally performs one action, the overall flow is convoluted: the filter parsing logic is buried inside nested blocks, and the break/return control flow requires careful tracing. The function mixes argument validation, error handling, and filter creation, increasing cognitive load. Method extraction for parsing the filter argument and for handling different option types would significantly improve readability. Variable names are clear, but the deep indentation and mixed levels of abstraction reduce the score.
Run 1
Code Structure: Logically organized around scanning arguments, handling options, and recording errors, though filter parsing is embedded in the main loop. Nesting: Several nested conditionals inside a loop and try block make the filter branch harder to follow. Clarity of intent: Descriptive names and explicit option checks communicate the purpose well; mutating the loop index and external state adds some complexity. Code length: Reasonably concise, but extracting filter-value parsing could simplify the method. Action granularity: Statements generally perform one action each, although filter creation and intersection are combined in a dense expression. Reading flow: Argument processing follows a natural order, and early returns clearly separate options from remaining arguments; the missing-value break and exception handling require additional attention.
Run 2
Code Structure: The argument-processing loop is logically organized, but option recognition, value extraction, filter construction, and error handling are combined in one method. Nesting: Multiple nested conditionals inside a try block make the filter-value path harder to follow. Clarity of intent: Descriptive names and explicit option comparisons clearly communicate command-line parsing behavior. Code length: Reasonably compact, though extracting filter parsing into a helper would simplify the main loop. Action granularity: Most lines perform one action; the chained filter construction expression is comparatively dense. Reading flow: Arguments are processed in a natural sequence, and early returns clearly handle positional arguments. However, modifying the loop index within a branch and mixing break, return, and exception handling require extra attention.
Run 3
Code Structure: The method logically groups option detection, filter-value extraction, and error handling, but combines parsing and filter construction. Nesting: Several nested conditionals inside a loop and try block make the filter branch harder to scan. Clarity of intent: Descriptive names and explicit error messages convey purpose, although the loop condition using != rather than < is unconventional. Code length: Reasonably concise, but extracting filter-value handling into a helper could simplify the main method. Action granularity: Most lines perform one action; the nested filter-construction expression is denser. Reading flow: Early returns naturally handle the option terminator and positional arguments, while repeated --filter checks, index mutation, and the missing-value break interrupt an otherwise coherent flow.