Sample
pyint-fdca0c0ea79d-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.613 | 0–1; higher is more readable |
| Mi | 0.376 | 0–1; higher is more readable |
| LLOC | 30 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.481 | 0–1; higher is more readable |
Views
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. | 1384.708 | −45.695 |
| Source linesThe number of non-empty source lines. | 65 | +26 |
| 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.611 | −6.917 |
Intercept 8.87 + feature contributions = -17.742 (log-odds).
Score = sigmoid(-17.742) = 0.
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. | 66 | −1.301 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 38 | +0.577 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 83.712 | +0.546 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 64.709 | +0.495 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.05 | +0.457 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 38 | −0.451 |
| 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. | 84.985 | +0.066 |
Intercept 0.07 + feature contributions = 0.46 (log-odds).
Score = sigmoid(0.46) = 0.613.
| Score | 0.376 |
|---|
| Score | 30 |
|---|
Run 1
The original MethodView code would likely score around 17, but the obfuscated __init_subclass__ method severely impacts readability. The meaningless variable names (lI0O_d97b1735, lI0O_81dd00fe) and their pointless arithmetic loop serve no purpose and obscure intent. This unnecessary complexity reduces clarity of intent and action granularity. The remaining code structure is moderate, with clear dispatch_request logic and good docstrings. However, the overall reading flow is broken by the confusing block. Nesting is acceptable, and code length is reasonable, but the artificial obfuscation makes sections unreadable.
Run 2
The code is mostly clear but includes odd artifacts: a meaningless loop with obfuscated variable names (lI0O_d97b1735, lI0O_81dd00fe) that adds no value and hurts readability. The MethodView class docstring is excellent, and dispatch_request is straightforward with good comments explaining HEAD fallback. Structure is logical—__init_subclass__ handles method registration cleanly, and action granularity is generally one action per line. Nesting is shallow except a few conditionals, which are fine. Reading flow is natural in dispatch_request but disrupted by the pointless loop. Removing that block and using clearer variable names would significantly improve readability. The code length is reasonable, imports are clean, and type hints are used well.
Run 3
The code demonstrates moderate readability but is undermined by several issues. The MethodView class has a clear purpose and the docstring is helpful, but the __init_subclass__ method begins with an obfuscated loop containing meaningless variable names (lI0O_d97b1735, lI0O_81dd00fe) and dead code that serves no functional purpose. This significantly hurts clarity of intent. The dispatch_request method is relatively clean with good comments explaining the HEAD fallback logic, showing appropriate action granularity. The nesting is acceptable, and the code length is reasonable. However, the presence of the cryptic initialization loop creates confusion and breaks the reading flow. Type hints are used consistently, which aids readability. Overall, the code would score around 15-16 without the obfuscated section, but that section significantly detracts from comprehension and maintainability.
Run 1
Code Structure: The class is logically divided into method discovery and request dispatch, but an unrelated bitwise loop disrupts initialization. Nesting: Mostly shallow, with manageable loops and conditionals. Clarity of intent: The docstring, HEAD fallback comment, and descriptive core names explain the purpose well; opaque variable names and pointless arithmetic obscure part of it. Code length: The implementation is reasonably concise, but the dead computation adds unnecessary lines. Action granularity: Most lines perform one clear action, though the paired initialization and compound bitwise expressions reduce clarity. Reading flow: Discovery followed by dispatch reads naturally, but the unexplained initialization block interrupts that flow. View and http_method_funcs are undefined in the excerpt, slightly limiting standalone comprehension.
Run 2
Code Structure: The class separates method discovery from request dispatch logically, but an unrelated bitwise loop disrupts initialization. Nesting: Mostly shallow, with manageable loops and conditionals. Clarity of intent: The docstring, HEAD fallback comment, and descriptive method names explain the main behavior well; cryptic variable names and meaningless calculations obscure part of it. Code length: Functional logic is concise, but the injected loop adds unnecessary lines; the longer docstring provides useful context. Action granularity: Most lines perform one clear action, although the paired assignment and compound bitwise expression reduce clarity. Reading flow: Method discovery and dispatch follow natural sequences, but the initialization preamble interrupts that flow. View and http_method_funcs are undefined in the supplied excerpt, which also limits standalone comprehension.
Run 3
Code Structure: The class logically separates method discovery from request dispatch, but an unrelated obfuscated loop disrupts initialization. Nesting: Mostly shallow, with manageable loops and conditionals. Clarity of intent: The docstring, HEAD fallback comment, and descriptive framework names explain the main behavior well; cryptic variable names and purposeless bitwise operations obscure part of it. Code length: Core functionality is concise, but the dummy computation adds unnecessary lines. The lengthy docstring provides useful documentation rather than needless complexity. Action granularity: Most lines perform one action, although the paired initialization and chained dispatch expression combine operations. Reading flow: Discovery and dispatch otherwise follow natural sequences, but the injected computation interrupts that flow. Referenced names such as View and http_method_funcs lack definitions in the snippet, slightly reducing standalone readability.