Sample
pyint-71361bdf495a-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.389 | 0–1; higher is more readable |
| Mi | 0.372 | 0–1; higher is more readable |
| LLOC | 54 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.438 | 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. | 3071.956 | −101.375 |
| Source linesThe number of non-empty source lines. | 97 | +38.8 |
| 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.578 | −6.867 |
Intercept 8.87 + feature contributions = -60.571 (log-odds).
Score = sigmoid(-60.571) = 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. | 98 | −2.434 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 83 | +2.134 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 83 | −1.484 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 96.798 | +0.943 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 106.908 | +0.92 |
| 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. | 107.969 | −0.908 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.065 | +0.306 |
Intercept 0.07 + feature contributions = -0.452 (log-odds).
Score = sigmoid(-0.452) = 0.389.
| Score | 0.372 |
|---|
| Score | 54 |
|---|
Run 1
The code has a clear class structure and generally follows OOP principles, with methods separated logically. However, several issues severely impact readability. The most glaring problem is the obfuscated code at the bottom - the `host` property contains meaningless variable names (`lI0O_27c1193e`, `lI0O_965327c3`) and a pointless while loop that serves no purpose other than confusion. This is a major red flag for readability and maintainability. The `get_full_url` method has reasonable logic but could be more concise. The nesting is minimal and flat, which is good. Action granularity is mostly one action per line, but the obfuscated section violates this. The reading flow is natural in the first portion but completely breaks down at the end. The type annotations are helpful. Overall, the solid structure is undermined by the deliberately confusing code segment, making this difficult to trust or maintain.
Run 2
The code is generally well-structured with clear class and method names that convey intent. There is minimal nesting and mostly one action per line, which aids readability. However, the final 'host' property contains cryptic variable names (lI0O_27c1193e, lI0O_965327c3) and an unnecessary loop that obscures its true purpose—a serious clarity violation. The imports appear unorganized and include unused modules like calendar, copy, CookieJar, and Morsel, which adds noise. The 'get_full_url' method has a multi-line list passed to urlunparse, slightly interrupting flow but still understandable. Overall, the code is mostly readable but weakened by purposeful obfuscation and import clutter.
Run 3
The code is generally well-structured with clear class and method separation, but it suffers from inconsistent conventions. The MockRequest class has a clear purpose and the methods are logically named, aiding readability. Nesting is minimal and action granularity is mostly appropriate, but the final 'host' property contains an obfuscated, pointless loop that severely impacts clarity of intent and reading flow. The typing imports are extensive but some (like TYPE_CHECKING, TypeVar, overload) appear unused, adding noise. The use of type hints and docstrings improves structure in places, but the obfuscated block and inconsistent comment density keep the score from being higher.
Run 1
Code Structure: The request adapter is logically organized into small methods and properties, although threading is imported separately from other standard-library imports. Nesting: Most methods are flat, with only shallow conditional and loop nesting. Clarity of intent: The class docstring, descriptive method names, and annotations explain the interface well. However, the host property contains opaque variable names and meaningless state manipulation that obscure its simple purpose. Code length: Most code is appropriately concise; the redundant loop in host adds unnecessary length. Action granularity: Statements generally perform one action per line, except the combined assignment in host. Reading flow: Methods follow a coherent adapter-interface pattern, but the unexplained hexadecimal values and loop abruptly disrupt that flow. Overall, the code is readable apart from a conspicuous obfuscated section.
Run 2
Code Structure: The request adapter is logically organized into focused methods and properties, although imports are inconsistently grouped. Nesting: Most code is flat, with only simple conditionals and one shallow loop. Clarity of intent: Descriptive method names, type annotations, and the class docstring explain the interface well. However, the host property contains opaque variable names and meaningless state manipulation that obscure its simple purpose. Code length: Most methods are concise; the host loop and some repetitive comments add unnecessary length. Action granularity: Statements generally perform one action per line, though the host property's initial tuple assignment combines unrelated state setup. Reading flow: The adapter methods follow a coherent progression, but the unexplained obfuscated block abruptly disrupts that flow. Overall, the code is mostly readable, with a conspicuous localized readability defect.
Run 3
Code Structure: The request wrapper is logically organized into focused methods, although import ordering is inconsistent. Nesting: Most methods are flat, with only a simple conditional and loop. Clarity of intent: Descriptive method names, type hints, and documentation explain the adapter well; however, the host property contains meaningless operations and cryptic identifiers that obscure its otherwise straightforward purpose. Code length: Generally concise, but the redundant loop and assignments unnecessarily inflate the final property. Action granularity: Most lines perform one action; the tuple assignment introduces two unrelated values together. Reading flow: Methods follow a coherent progression from request access to header handling and properties, but the unexplained obfuscation at the end sharply interrupts that flow.