Sample

Dorn/python/114

Human rating uses the original dataset scale.

DatasetDorn
Human3.82
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.1740–1; higher is more readable
75.5Δ 8.9
Dorn0.8640–1; higher is more readable
89.7Δ 5.3
Mi0.6370–1; higher is more readable
68.8Δ 15.6
LLOC7Logical lines; fewer is more readable
67.7Δ 16.7
DeepSeek V4 Pro9.670–20; mean of three runs
39.4Δ 45.0
GPT-6.1 Sol16.330–20; mean of three runs
70.8Δ 13.6
BTTF0.5910–1; higher is more readable
71.0Δ 13.4
Human3.821–5; original rating
84.4

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.253.824−8.376
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.034−6.051
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -1.557 (log-odds).
Score = sigmoid(-1.557) = 0.174.

Feature contributions

FeatureValueContribution
(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.52.727+1.432
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.648−0.275
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.074+0.227
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.53+0.051

Intercept 0.07 + feature contributions = 1.847 (log-odds).
Score = sigmoid(1.847) = 0.864.

Score0.637
Score7
Run 1

The code snippet is incomplete and lacks surrounding context, making it difficult to evaluate accurately. From what is visible, there is inconsistent indentation (the first line appears over-indented relative to the method definition), and the purpose of the 'value' variable and '_set_instance_tag_cache' call is unclear. The '_save' method is relatively straightforward but depends on external methods and caches whose behavior is not defined. The code length is concise, but action granularity is acceptable—one action per line. However, reading flow is disrupted by missing context and the dangling indentation, and clarity of intent suffers because the snippet cuts off mid-method. Overall, the fragment suggests code that may be readable in full context, but as presented it is disorganized and ambiguous.

Run 2

The code is highly readable due to its clear structure and intent. The methods are concise, each performing a single focused action. Nesting is minimal with only one conditional check, keeping the logic flat and straightforward. Naming is explicit (_save, _get_instance_tag_cache, update_tags), which clarifies purpose. Reading flow is natural, progressing from retrieving cached tags to saving them. Slight deductions are for the unused 'signal' and 'sender' parameters, which introduce ambiguity, and for the lack of visible context around the first line, which could affect clarity in isolation.

Run 3

The code is partially readable but lacks important context, reducing overall clarity. Structure is logical, with methods separated clearly, but the snippet begins mid-method, making it hard to understand the full flow. Nesting is shallow, which is good. Clarity of intent is acceptable: method names and docstrings provide some guidance, but ambiguous variables like 'value' and 'signal' are not explained. Code length is concise, which aids readability, but missing surrounding class or method definitions hinders understanding. Action granularity is reasonable, with one primary action per line. Reading flow is mostly natural, but the initial line lacks indentation context, making the flow abrupt. Overall, the code is functional but could be clearer with surrounding context and more descriptive variable names.

Run 1

Code Structure: The visible code separates cache updates from database persistence logically, although the opening lines belong to an omitted method. Nesting: The save method uses only one conditional level, making it easy to follow. Clarity of intent: Descriptive method names and the docstring explain tag persistence; the preceding normalization step lacks its surrounding context. Code length: The snippet is concise without unnecessary logic. Action granularity: Each executable line performs a single clear operation. Reading flow: Retrieving cached tags, checking their availability, and updating the database forms a natural sequence, but the truncated opening slightly disrupts readability.

Run 2

Code Structure: The _save method is logically organized, though the opening lines are an incomplete fragment that obscures surrounding context. Nesting: A single conditional keeps nesting shallow. Clarity of intent: The docstring and descriptive method names clearly communicate saving cached tags to the database. Code length: The snippet is concise without unnecessary operations. Action granularity: Each statement performs one clear action. Reading flow: Retrieving tags, checking their availability, and updating the database forms a natural sequence, but the initial indentation and missing enclosing code interrupt readability.

Run 3

Code Structure: The visible logic is organized into cache handling and a separate save method, though the opening lines lack their enclosing context. Nesting: The save method has only one conditional, making it easy to follow. Clarity of intent: The docstring and descriptive method names clearly communicate saving cached tags to the database; the purpose of the initial lowercase conversion is less clear without context. Code length: The snippet is concise with no unnecessary implementation detail. Action granularity: Each statement performs one action. Reading flow: Retrieving cached tags, checking their availability, and updating the database forms a natural sequence, but the incomplete opening fragment interrupts readability.