Sample

Dorn/python/48

Human rating uses the original dataset scale.

DatasetDorn
Human3.98
Lines30

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
30.1Δ 61.6
Dorn0.8550–1; higher is more readable
86.6Δ 5.0
Mi0.5690–1; higher is more readable
59.9Δ 31.8
LLOC8Logical lines; fewer is more readable
63.9Δ 27.7
DeepSeek V4 Pro14.670–20; mean of three runs
74.1Δ 17.5
GPT-6.1 Sol16.670–20; mean of three runs
73.8Δ 17.8
BTTF0.6870–1; higher is more readable
90.3Δ 1.4
Human3.981–5; original rating
91.6

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.1112.273−36.705
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.895−7.342

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

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.017+0.773
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.73+0.573
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.68.387+0.299
Indentation frequencyHow rapidly indentation changes from line to line.13−0.287
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.959+0.009

Intercept 0.07 + feature contributions = 1.773 (log-odds).
Score = sigmoid(1.773) = 0.855.

Score0.569
Score8
Run 1

The code is generally readable with a clear structure: license header, imports, then class definition. However, there are notable issues. The license block is verbose for a code snippet, though acceptable. There is a redundant duplicate import of urllib modules on consecutive lines, which is confusing and unnecessary. The class has clear attributes (url, name, supported_categories) with straightforward intent. Nesting is minimal and flat, which is good. Action granularity is fine as each import and attribute is on its own line. Reading flow is natural but disrupted by the duplicated imports and the inconsistent spacing before 'url' (missing space after '=') compared to 'name'. Overall, it is clear and simple but has minor inconsistencies and redundancy that reduce readability.

Run 2

The code is generally readable with clear intent and logical structure. The license header is well-organized and the class definition is concise. However, there are minor issues: duplicate import lines (urllib.request, urllib.parse, urllib.error appear twice), redundant imports, and a missing newline at the end. The class name 'btdigg' is lowercase, which violates PEP 8 naming conventions. The code is flat and not deeply nested, with good action granularity (one action per line). Overall, it is quite readable but has some redundancy and style inconsistencies that slightly reduce clarity.

Run 3

The code is relatively short and readable, with clear structure and purpose. It defines a simple search plugin class with configuration attributes. However, it has issues: duplicate imports of urllib modules (lines 21-22), unused imports (sys, urllib modules are imported but not used), and a trailing empty line after the class body. The license header, while verbose, is standard boilerplate. Naming is clear, nesting is flat, and action granularity is reasonable, but the redundancy and dead imports detract from clarity. The class lacks a docstring or methods, so its intent is only partially clear from context.

Run 1

Code Structure: Imports and class metadata are logically organized, although duplicated imports and unused sys/prettyPrinter imports add clutter. Nesting: Only one shallow class level, making the code easy to scan. Clarity of intent: The class clearly identifies a BTDigg provider and its supported categories, but no behavior is shown, so its broader purpose remains implicit. Code length: Executable code is concise; the lengthy license header is conventional rather than unnecessary logic. Action granularity: Class attributes each occupy their own line, though grouped imports reduce granularity. Reading flow: The progression from header to imports to class is natural, with redundant imports and minor spacing inconsistencies slightly interrupting it.

Run 2

Code Structure: Imports and class metadata are logically grouped, though duplicate imports and the unused sys import add clutter. Nesting: The code is almost entirely flat, with only a simple class body. Clarity of intent: The class attributes clearly identify a search provider and its supported category, but no behavior is shown and prettyPrinter's role is unexplained. Code length: Executable code is concise; the lengthy license header adds scanning overhead without obscuring the implementation significantly. Action granularity: Class attributes each occupy their own line, but multiple module imports are combined on individual lines. Reading flow: The progression from header to imports to class is natural, although redundant imports, inconsistent spacing, and the lowercase class name reduce polish.

Run 3

Code Structure: Simple, logically ordered imports and a class containing related metadata, though duplicate imports add clutter. Nesting: Minimal, with only one class level. Clarity of intent: Descriptive metadata fields make the purpose reasonably clear, but the snippet provides no behavior, and imported utilities are unused here. Code length: The implementation is concise; the lengthy license header is legitimate documentation rather than unnecessary code. Action granularity: Class attributes each occupy their own line, although grouping several modules in import statements slightly reduces scanability. Reading flow: Straightforward from header to imports to class definition, weakened slightly by repeated imports and inconsistent spacing.