Sample

Dorn/python/10

Human rating uses the original dataset scale.

DatasetDorn
Human3.97
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0150–1; higher is more readable
69.4Δ 21.4
Dorn0.8370–1; higher is more readable
83.0Δ 7.8
Mi0.4610–1; higher is more readable
47.9Δ 42.9
LLOC14Logical lines; fewer is more readable
49.0Δ 41.8
DeepSeek V4 Pro16.670–20; mean of three runs
91.4Δ 0.6
GPT-6.1 Sol170–20; mean of three runs
80.4Δ 10.4
BTTF0.6080–1; higher is more readable
74.9Δ 15.9
Human3.971–5; original rating
90.8

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.566.193−18.684
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.26−6.39

Intercept 8.87 + feature contributions = -4.204 (log-odds).
Score = sigmoid(-4.204) = 0.015.

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.043+0.527
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.75.452+0.413
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+0.361
Indentation frequencyHow rapidly indentation changes from line to line.19−0.08
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.785+0.007

Intercept 0.07 + feature contributions = 1.634 (log-odds).
Score = sigmoid(1.634) = 0.837.

Score0.461
Score14
Run 1

The code is highly readable, well-structured, and clearly documented. Methods are short, focused, and have descriptive names with docstrings that explain intent. Each method performs one logical action, and nested checks are minimal and flat. The add_name method has a slightly denser block with multiple operations, but each line is concise and purposeful. The convert_directive_function stub is appropriately minimal. Overall, the structure follows a clean order, and the reading flow is natural.

Run 2

The code is well-structured with clear separation of concerns, using convenience methods that encapsulate specific functionality. The methods have descriptive names and useful docstrings that explain their purpose. Nesting is minimal with only one level of conditional logic in each method. The code is concise without being overly abbreviated. Each line performs a single logical action, maintaining good action granularity. Reading flow is natural as the code progresses logically from validation to name processing. Minor issues include slightly dense conditional blocks in add_name() where multiple operations occur within the if statement, and the string formatting in assert_has_content() could be more readable with f-strings. Overall, this is maintainable, self-documenting code.

Run 3

The code is highly readable with clear logical organization. Each method has a single, focused purpose with docstrings explaining intent. Nesting is minimal, with only one level in `add_name`. The code is concise but not obfuscated — no unnecessary verbosity. Action granularity is appropriate: individual operations on separate lines. Reading flow is natural, following a logical sequence of validation, name normalization, and target registration. Minor deductions: `del(node['name'])` uses parenthesized syntax which is slightly unconventional, and the `convert_directive_function` function has an incomplete docstring (one-line summary only). The conditional deletion inside `add_name` could be marginally clearer, but overall the code is clean, maintainable, and easy to understand.

Run 1

Code Structure: Methods are logically separated by responsibility, though the final function is incomplete. Nesting: Shallow conditionals keep the code easy to follow. Clarity of intent: Descriptive names and docstrings explain content validation, name normalization, and target registration; the missing conversion implementation limits assessment. Code length: Concise, with little unnecessary text or repetition. Action granularity: Statements generally perform one action each, although popping and normalizing the name combines mutation with transformation. Reading flow: Validation and name processing follow a natural sequence. The split error string and unconventional del(node['name']) syntax slightly interrupt readability.

Run 2

Code Structure: Methods are logically separated by responsibility, though the surrounding class context is absent and the final function has no implementation beyond its docstring. Nesting: Shallow conditionals keep control flow easy to follow. Clarity of intent: Descriptive names and helpful docstrings explain validation, naming, and conversion; popping an option while normalizing it slightly obscures the mutation. Code length: Concise, with little unnecessary code. Action granularity: Most lines perform one clear action, although normalization and option removal are combined. Reading flow: Consistent indentation and straightforward sequencing support natural reading; the abrupt transition to an unfinished conversion function and the unconventional del(node['name']) syntax introduce minor friction.

Run 3

Code Structure: Small, logically separated methods provide clear organization, though the excerpt ends with an incomplete function definition. Nesting: Shallow conditional nesting is easy to follow. Clarity of intent: Descriptive names and useful docstrings explain validation, name normalization, and target registration; popping the option introduces a side effect that could be documented more explicitly. Code length: Concise, with little unnecessary code. Action granularity: Statements generally perform one action per line, although normalization and option removal are combined in one expression. Reading flow: Conventional indentation and straightforward statement order support natural reading; the split error string and unusual del(...) style create minor friction.