Sample
Dorn/python/0
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 33.1Δ 17.5 |
| Scalabrino | 0.499 | 0–1; higher is more readable | 41.1Δ 9.6 |
| Dorn | 0.165 | 0–1; higher is more readable | 12.0Δ 38.7 |
| Mi | 0.037 | 0–1; higher is more readable | 5.8Δ 44.8 |
| LLOC | 24 | Logical lines; fewer is more readable | 23.7Δ 27.0 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 18.1Δ 32.6 |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs | 34.7Δ 16.0 |
| BTTF | 0.484 | 0–1; higher is more readable | 40.7Δ 10.0 |
| Human | 3.35 | 1–5; original rating | 50.7 |
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. | 1089.106 | −35.94 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.2 | −6.299 |
Intercept 8.87 + feature contributions = -21.37 (log-odds).
Score = sigmoid(-21.37) = 0.
| Score | 0.499 |
|---|
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. | 108.968 | −0.95 |
| 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. | 30 | −0.268 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.12 |
| 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.773 | +0.006 |
Intercept 0.07 + feature contributions = -1.621 (log-odds).
Score = sigmoid(-1.621) = 0.165.
| Score | 0.037 |
|---|
| Score | 24 |
|---|
Run 1
The code shows some structure but suffers from several readability issues. The findFieldName method uses a nested function which adds indirection, and the fallback prefix-matching logic is compact but cryptic. The CanGoNext method is quite tangled: it mixes counting logic inside nested loops, increments countNotNone inside the inner loop for every non-zero selection (possibly multiple times per choice), and builds a validation list simultaneously. This violates the single-responsibility principle and makes intent hard to follow. The loop has deep nesting (two levels plus a conditional) and the counting logic is ambiguous—it is unclear why countNotNone increment and count increment are in the same block. While line length is reasonable and one action per line is mostly respected, the overall flow is disorganized and the code requires careful study to understand the validation rules being enforced.
Run 2
The code has severe readability issues. The nested function `fieldNameIndex` adds unnecessary indirection and its logic around `index if index else...` is unclear and error-prone (using truthiness of index instead of explicit check). `findFieldName` has a confusing fallback that slices field names without explanation. `CanGoNext` contains deeply nested loops with tangled state tracking: `countNotNone` is incremented inside the inner loop for every non-zero selection, potentially overcounting; variable names like `count` and `countNotNone` lack distinct meaning. Multiple actions and conditionals are packed into single lines, reducing clarity. The code lacks comments or docstrings explaining intent, especially for the field-mapping logic. Structure is disorganized—some methods appear complete while others are fragmented. Overall, the code is difficult to follow, maintain, or debug, with ambiguous responsibilities and opaque data transformations.
Run 3
The code has multiple readability issues. The method `findFieldName` contains a nested helper function, adding unnecessary complexity and indirection. It also uses a cryptic fallback logic with string slicing (`fieldName[:6]`) without explanation. The `CanGoNext` method has a deeply nested loop with multiple conditionals, and the purpose of `countNotNone` is ambiguous. The loop modifies `countNotNone` inside an awkward `if` block, making the control flow hard to follow. Variable names like `count` and `countNotNone` lack clarity about what they represent. The code mixes actions and conditionals in ways that reduce readability. While each line is relatively short, the overall structure obscures intent, and the lack of comments or explanatory naming makes it hard to understand without deep analysis.
Run 1
Code Structure: Methods separate lookup and mapping validation logically, but the fragment begins mid-method and ends without showing the successful validation path. Nesting: Moderate nesting in the validation loop is manageable; the nested lookup helper adds minor complexity. Clarity of intent: Names generally communicate purpose, but using 0 for both a valid index and a missing match makes findFieldName ambiguous. countNotNone is incremented repeatedly across fields, obscuring what it measures. Code length: Mostly concise, though repeated GetSelection calls and the lookup helper could be simplified. Action granularity: Most lines perform one action, but the final lookup expression combines slicing, a comprehension, and fallback logic. Reading flow: Setup, iteration, and early returns follow naturally, while the dense fallback expression and incomplete ending interrupt readability.
Run 2
Code Structure: Methods separate lookup and validation logically, though the fragment begins mid-method and ends without showing the full validation outcome. Nesting: Moderate nesting in the validation loops remains manageable; the nested lookup helper adds some complexity. Clarity of intent: Names generally communicate field-mapping validation, but zero represents both a valid index and a missing match, making lookup behavior ambiguous. Counting nonempty selections repeatedly for every field also obscures intent. Code length: Mostly concise, although repeated selection calls and the helper could be simplified. Action granularity: Most lines perform one action; the final lookup return combines conditional logic, truncation, and a comprehension. Reading flow: Initialization, counting, and error reporting follow a natural sequence, but long expressions and inconsistent naming conventions slightly hinder readability.
Run 3
Code Structure: Methods separate lookup and validation logically, but the fragment begins mid-method and ends without a visible success return. Nesting: Moderate nesting in the validation loops adds complexity; the nested lookup helper is small. Clarity of intent: Names generally communicate field mapping validation, but index zero doubles as a valid position and a not-found sentinel. Counting nonempty selections repeatedly within the outer loop obscures intent. Code length: Fairly concise, though the lookup expression and repeated selection calls could be simplified. Action granularity: Most lines perform one action, but the final lookup return combines fallback logic, slicing, and a list comprehension. Reading flow: Initialization, counting, and error checks follow a natural sequence, although the compact fallback expression and incomplete method context interrupt readability.