Sample
Dorn/python/31
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 15.6Δ 27.6 |
| Scalabrino | 0.098 | 0–1; higher is more readable | 6.2Δ 37.0 |
| Dorn | 0.308 | 0–1; higher is more readable | 24.2Δ 18.9 |
| Mi | 0.578 | 0–1; higher is more readable | 61.0Δ 17.8 |
| LLOC | 32 | Logical lines; fewer is more readable | 8.2Δ 35.0 |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs | 15.3Δ 27.9 |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs | 34.7Δ 8.5 |
| BTTF | 0.561 | 0–1; higher is more readable | 63.8Δ 20.6 |
| Human | 3.24 | 1–5; original rating | 43.2 |
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. | 1887.575 | −62.29 |
| Source linesThe number of non-empty source lines. | 49 | +19.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.105 | −6.157 |
Intercept 8.87 + feature contributions = -39.977 (log-odds).
Score = sigmoid(-39.977) = 0.
| Score | 0.098 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 90.96 | +0.663 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 35 | −0.382 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.88 | +0.273 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.077 | +0.19 |
| 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. | 91 | −0.189 |
Intercept 0.07 + feature contributions = -0.811 (log-odds).
Score = sigmoid(-0.811) = 0.308.
| Score | 0.578 |
|---|
| Score | 32 |
|---|
Run 1
The code has poor readability due to multiple issues. It lacks a clear logical structure with mixed concerns: parsing, side effects (add() calls), and output generation are interleaved. Several conditions are redundant (e.g., checking l[0] == '#' then later l[:2] == '#,' then another l[0] == '#'), causing confusing control flow. Magic numbers (l[5:], l[6:]) have no explanation. Multiple actions occur per line in some places (e.g., 'msgid = msgstr = \'\''), while other lines are unnecessarily verbose. The eval() usage is dangerous and unclear. Comments are sparse and don't explain the 'why' (e.g., 'XXX: Does this always follow Python escape semantics?'). State is managed through globals and mutable variables, making the flow hard to follow. Reading flow jumps between comment handling, string parsing, and error handling. Variable names like 'l' are cryptic. Overall, the code requires significant mental effort to understand, making it difficult to maintain.
Run 2
This code scores low on readability. The structure is a tangled series of conditional checks without clear separation or context (the enclosing loop/function is absent). It uses ambiguous one-letter variables like 'l', 'ID', 'STR', and numeric slicing ('l[5:]', 'l[6:]'), which obscures intent. Nesting is moderate but logic flow jumps between 'msgid' and 'msgstr' handling with repeated 'add()' calls. Action granularity is mixed: some lines do multiple things (e.g., 'section = ID; l = l[5:]; msgid = msgstr = '''), while others are single. The reading flow is disorganized—comment blocks and pylint directives further clutter the code. Magic numbers and eval() usage add confusion. A clearer structure with named constants, descriptive variables, and helper functions would drastically improve readability.
Run 3
The code is difficult to read due to poorly named variables (e.g., 'l' instead of 'line'), unclear state management via a 'section' flag, multiple actions per line, and reliance on inline comments to explain branching rather than using functions or clear control flow. The logic is tangled, with a heavy mix of parsing, state transitions, and side effects occurring in a flat, imperative style. Nesting is moderate but the flow is disorganized, and the use of eval() is unsafe and unclear. While some separation via comments exists, the overall structure lacks modularity and readability.
Run 1
Code Structure: Parsing proceeds through logically grouped stages, followed by output generation, but state tracking and error handling are interwoven. Nesting: Mostly shallow conditionals and early continues keep complexity manageable. Clarity of intent: Comments explain the parsing stages, but terse names such as l, STR, and ID require context; the truth-value use of l.find('fuzzy') is especially misleading. Code length: Generally concise, with little unnecessary code. Action granularity: Most lines perform one action, though chained assignments and open(...).write(...) combine operations. Reading flow: The sequence is reasonably natural, but repeated comment checks, reassignment of l from raw text to evaluated content, legacy Python syntax, and inline lint suppressions interrupt readability.
Run 2
Code Structure: Logically organized into comment handling, section parsing, final entry handling, and output, though mutable parser state couples these steps. Nesting: Mostly flat, with only shallow nested conditions. Clarity of intent: Comments and names such as msgid and msgstr explain the purpose, but l, numeric fuzzy flags, and implicit section transitions require interpretation. The l.find('fuzzy') condition is misleading because its truthiness does not clearly express a substring check. Code length: Compact without substantial repetition or unnecessary expansion. Action granularity: Most lines perform one action, although chained assignment and open(...).write(...) combine operations. Reading flow: Generally follows the parsing sequence naturally, but repeated comment checks, reassignment of l, legacy Python syntax, and inline pylint directives interrupt readability.
Run 3
Code Structure: Parsing proceeds in logical stages, followed by output generation, but state management and error handling are interleaved. Nesting: Mostly flat conditionals and early continues keep nesting shallow. Clarity of intent: Comments explain entry boundaries and parsing sections, but abbreviated names such as l, STR, and ID obscure meaning; the truth test on find('fuzzy') is also confusing. Code length: Concise overall, though repeated comment checks and error-printing statements add minor clutter. Action granularity: Most lines perform one action, but chained assignment and open(...).write(...) combine operations. Reading flow: The progression from comments to section detection to content accumulation is understandable, although mutable parser state, eval, line continuation, and legacy Python syntax make it harder to follow.