Sample
Dorn/python/106
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 16.4Δ 3.3 |
| Scalabrino | 0.432 | 0–1; higher is more readable | 33.3Δ 20.2 |
| Dorn | 0.211 | 0–1; higher is more readable | 17.5Δ 4.5 |
| Mi | 0.004 | 0–1; higher is more readable | 1.4Δ 11.7 |
| LLOC | 22 | Logical lines; fewer is more readable | 26.7Δ 13.6 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 18.1Δ 5.0 |
| GPT-6.1 Sol | 10 | 0–20; mean of three runs | 10.2Δ 2.9 |
| BTTF | 0.354 | 0–1; higher is more readable | 20.1Δ 7.0 |
| Human | 2.57 | 1–5; original rating | 13.1 |
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. | 1583.249 | −52.247 |
| 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.573 | −6.859 |
Intercept 8.87 + feature contributions = -38.637 (log-odds).
Score = sigmoid(-38.637) = 0.
| Score | 0.432 |
|---|
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. | 168 | −3.451 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 168 | +1.906 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.233 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 26 | −0.176 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 25 | +0.128 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.87 | −0.006 |
Intercept 0.07 + feature contributions = -1.322 (log-odds).
Score = sigmoid(-1.322) = 0.211.
| Score | 0.004 |
|---|
| Score | 22 |
|---|
Run 1
This code is highly unreadable due to multiple serious issues. The structure is tangled with inconsistent indentation and comment formatting. Deep nesting exists in both conditional blocks, with the first containing four nested levels and the second containing five. Intent is obscured by cryptic variable names like '_mSeqCounters', '_mModel', and unclear magic numbers (SAMPLE_SIZE, thresholds). The code violates action granularity by cramming complex array indexing and arithmetic operations onto single lines. Reading flow is disrupted by commented-out debug prints scattered throughout the logic. The mix of constants with different naming conventions (uppercase vs underscored) adds confusion. Overall, this code would be very difficult to understand, maintain, or modify safely without extensive study of the surrounding context.
Run 2
The code suffers from deeply nested conditionals (up to four levels), making the reading flow disorganized and intent difficult to follow. The first block with `if not self._mReversed:` contains long, dense lines with multiple operations compressed together, reducing action granularity. The `else` branch handles the reversed case but the comment adds clarity without fixing the underlying complexity. The state detection logic chains multiple nested `if` statements, creating a pyramid effect that obscures the decision tree. Magic numbers and constants (like `SAMPLE_SIZE`, `SB_ENOUGH_REL_THRESHOLD`) appear without context, and some debug prints are fine but the commented-out debug code adds noise. The `get_confidence` method is relatively more readable but still mixes calculations with unclear variable names like `r`. Overall, the code would benefit from early returns, extraction of helper methods, and better naming to improve structure and readability.
Run 3
The code suffers from several readability issues. Deep nesting makes the logic hard to follow, particularly in the confidence-checking block where four levels of indentation obscure the decision flow. The complex one-line expressions for sequence counters pack multiple operations into a single line, violating action granularity principles. The intent is somewhat clear for domain experts but nearly opaque to newcomers due to cryptic variable names like '_mSeqCounters', 'SB_ENOUGH_REL_THRESHOLD', and 'mTypicalPositiveRatio'. Comments are sparse and one is actually commented-out debug code, adding noise rather than value. The inverted condition in the first 'if' block creates unnecessary cognitive overhead compared to a positive-first structure. Reading flow is choppy, jumping from sequence counting directly into state detection without transitional context. While the code is functionally compact, it prioritizes terseness over clarity, making maintenance and debugging significantly more difficult than necessary.
Run 1
Code Structure: Sequence counting, detection decisions, and confidence calculation form logical sections, but the fragment starts mid-block and includes commented-out debugging code. Nesting: Detection logic reaches several conditional levels, making it harder to scan. Clarity of intent: Threshold constants and the reversal comment help, but abbreviated names such as cf and r, legacy member prefixes, and dense matrix indexing obscure meaning. Code length: Mostly compact, although duplicated indexing expressions and lengthy debug statements add clutter. Action granularity: Each line generally performs one action, but some expressions combine several lookups and calculations. Reading flow: State checks and confidence thresholds follow a sensible progression, while long lines, deep indentation, and poorly aligned comments interrupt readability.
Run 2
Code Structure: Sequence counting, detection decisions, and confidence calculation are logically grouped, but the fragment starts mid-block and includes obsolete commented-out debugging. Nesting: Several layers of conditionals, including nested debug checks, make the detection logic harder to scan. Clarity of intent: Named thresholds and states communicate the detection purpose, but prefixed member names, the variable r, and dense matrix indexing obscure details. Code length: Fairly compact, though repeated lookup and logging expressions create unnecessary visual bulk. Action granularity: Most lines perform one action, but individual expressions combine indexing, arithmetic, and access operations. Reading flow: The progression from counting to confidence-based state changes is sensible, but long lines, uneven comment indentation, and missing surrounding context interrupt comprehension.
Run 3
Code Structure: Sequence counting, detection decisions, and confidence calculation are logically grouped, but the incomplete excerpt and commented-out debugging reduce cohesion. Nesting: Multiple nested conditionals, including debug checks inside threshold branches, make the decision logic harder to scan. Clarity of intent: Method names, threshold constants, and the reversal comment convey purpose, but abbreviated variables such as cf and r, prefixed member names, and complex matrix indexing obscure details. Code length: Generally compact, though lengthy indexing expressions, logging statements, and obsolete comments add clutter. Action granularity: Most lines perform one action, but counter updates combine lookup, index arithmetic, and mutation. Reading flow: The overall progression is understandable, but deep indentation, long lines, and repeated member-access chains interrupt natural reading.