Sample

Dorn/python/16

Human rating uses the original dataset scale.

DatasetDorn
Human3.1
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
31.2Δ 5.0
Dorn0.8220–1; higher is more readable
80.5Δ 44.3
Mi0.3990–1; higher is more readable
39.0Δ 2.8
LLOC13Logical lines; fewer is more readable
50.8Δ 14.6
DeepSeek V4 Pro120–20; mean of three runs
53.6Δ 17.4
GPT-6.1 Sol13.670–20; mean of three runs
37.7Δ 1.5
BTTF0.5310–1; higher is more readable
54.0Δ 17.8
Human3.11–5; original rating
36.2

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.1105.937−36.496
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.496−6.743

Intercept 8.87 + feature contributions = -22.369 (log-odds).
Score = sigmoid(-22.369) = 0.

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.76.484+0.43
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
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.78.935+0.322
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.065+0.306
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.31−0.061
Indentation frequencyHow rapidly indentation changes from line to line.23+0.058
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.29.8+0.007

Intercept 0.07 + feature contributions = 1.529 (log-odds).
Score = sigmoid(1.529) = 0.822.

Score0.399
Score13
Run 1

The code shows mixed readability. The first method has reasonable structure with clear conditional logic, but contains multiple actions in single lines (appending HTML, setting attributes), making it harder to follow. The nesting is shallow, which is good. However, the second method (visit_line_block) contains a large German TODO comment that adds clutter and is unclear in intent. The commented-out depart_line_block method is dead code that should be removed. Variable naming is inconsistent (CLASS vs lowercase parameters). The string concatenation for HTML tags is verbose and reduces clarity. Action granularity varies - some lines do too much while others are appropriately granular. The reading flow is disrupted by the comment block and commented code. Overall, the code is functional but lacks polish and consistency that would make it more maintainable.

Run 2

The code shows moderate readability. Structure is mostly logical, with clear method definitions and docstrings, but there are issues. The first block has awkward nesting and an incomplete conditional structure (starting with 'else:' without visible preceding 'if'). The 'field-name' class assignment is clear, but the inline conditional and string concatenation make intent slightly harder to follow. Action granularity is acceptable—most lines perform single operations. The commented-out code and TODO comment in German reduce clarity for broader audiences. The visit_footnote method is clean and flat, showing good readability. Overall, the code is understandable but could benefit from removing dead code, translating comments, and restructuring the first conditional for better flow.

Run 3

The code has some readable aspects but suffers from fragmentation and unclear context. The first block shows logical structure with clear intent: checking a field name limit, setting colspan, and appending table markup. However, the indentation and mixing of attribute assignment with HTML generation create moderate nesting. The visit_footnote method is clear but the visit_line_block contains a large German TODO comment that interrupts flow. A commented-out method adds clutter. Action granularity is mostly reasonable, though some lines chain multiple operations. The overall reading flow is disjointed because the code appears to be an excerpt without surrounding class context, making it harder to assess full structure. Score reflects acceptable clarity in parts but reduced coherence from comments, dead code, and missing context.

Run 1

Code Structure: Visitor methods provide logical organization, but the opening fragment lacks its preceding context and commented-out code adds clutter. Nesting: Shallow conditionals and mostly flat method bodies are easy to follow. Clarity of intent: Method names convey HTML-rendering purposes, although abbreviated names such as atts, embedded markup, and the German TODO reduce immediate clarity. Code length: The executable code is concise, but the lengthy TODO and disabled method add unnecessary reading overhead. Action granularity: Statements generally perform one action per line; multiline calls and string literals remain understandable. Reading flow: Sequential output construction is natural, but inconsistent spacing, mixed quotation styles, and the incomplete opening interrupt the flow.

Run 2

Code Structure: Visitor methods provide logical organization, but the opening fragment lacks context and commented-out code adds clutter. Nesting: Shallow conditionals and flat methods are easy to follow. Clarity of intent: Method names and HTML tags indicate rendering responsibilities, though the German TODO, unexplained context strings, and uppercase CLASS parameter reduce clarity. Code length: Executable code is concise, but the lengthy TODO and inactive method distract from it. Action granularity: Statements generally perform one action each; multiline HTML strings remain a single coherent append operation. Reading flow: Rendering steps follow a natural sequence, but inconsistent spacing, mixed quotation styles, and the incomplete opening interrupt smooth reading.

Run 3

Code Structure: Separate visitor methods provide logical organization, but the snippet begins with an orphaned else and ends with commented-out code. Nesting: Mostly flat, with only a simple conditional, making control flow easy to follow. Clarity of intent: Method names and HTML tags indicate rendering purposes, though unexplained context manipulation, the uppercase CLASS parameter, and a German TODO reduce accessibility. Code length: Implementation is concise, but the lengthy TODO and inactive method add clutter. Action granularity: Each statement generally performs one action; multiline calls and string concatenation remain understandable. Reading flow: Sequential HTML construction reads naturally, but inconsistent spacing, embedded markup, and incomplete surrounding context interrupt the flow.