Sample
pyint-e428f69abf66-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.561 | 0–1; higher is more readable |
| Mi | 0.508 | 0–1; higher is more readable |
| LLOC | 37 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.336 | 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. | 1971.501 | −65.06 |
| Source linesThe number of non-empty source lines. | 90 | +36 |
| 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.688 | −7.031 |
Intercept 8.87 + feature contributions = -27.221 (log-odds).
Score = sigmoid(-27.221) = 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. | 91 | −2.186 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 76 | +1.892 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 76 | −1.323 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 89.958 | +0.848 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.978 | +0.728 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.038 | +0.573 |
| 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. | 94.967 | −0.357 |
Intercept 0.07 + feature contributions = 0.245 (log-odds).
Score = sigmoid(0.245) = 0.561.
| Score | 0.508 |
|---|
| Score | 37 |
|---|
Run 1
The code starts with a well-organized import section and clear class/method structure, but it is severely undermined by deliberate obfuscation in the close() method. The variable name lI0O_e104235e is unreadable and the bitwise operations (0xfb3c ^ 0xfb3c, |= 0, &= 0) serve no purpose other than to confuse. This violates clarity of intent, action granularity, and reading flow. The send() method has good documentation and structure, but the close() method destroys overall readability. The code also raises NotImplementedError in both methods, suggesting it is a base class, which is fine, but the obfuscated dead code in close() makes it extremely difficult to understand. Overall, the code is a mix of professional patterns and deliberate sabotage, resulting in a low readability score.
Run 2
The code demonstrates generally good structure with clear imports, type hints, and docstrings. However, it contains a significant readability issue in the close() method where obfuscated variable names (lI0O_e104235e) and meaningless bitwise operations create confusion. The imports are logically grouped but somewhat verbose. The class structure is clear with a proper __init__ and send() method having comprehensive parameter documentation. The send() method signature is well-typed despite many parameters. The close() method's bizarre implementation detracts from otherwise clean code. Nesting is minimal and actions are generally one per line. The code appears to be a legitimate library file with an artifact of code obfuscation or a deliberate example of bad practice mixed with professional code, creating an overall score of 13 out of 20.
Run 3
The code is largely readable: imports are logically grouped, classes and methods are short and clearly documented, and method signatures use modern type hints. However, the weird obfuscated variable in the close() method significantly hurts clarity of intent and reading flow. It introduces unnecessary complexity and suggests either leftover debugging or intentional obfuscation. Additionally, some annotations reference types not imported in the shown snippet (e.g., PreparedRequest, _t), and the unused socket import with a noqa comment adds minor noise. Overall, structure and length are good, but the odd code block and incomplete type context prevent a higher score.
Run 1
Code Structure: Imports and the adapter interface are logically organized, but the extensive imports distract from this small snippet. Nesting: Mostly flat, with only one shallow conditional. Clarity of intent: The send method has a clear signature and explanatory docstring, while close contains an opaque variable and meaningless bitwise operations that obscure its simple purpose. Unresolved annotation names such as PreparedRequest and _t also reduce clarity within the snippet. Code length: The documentation is useful, but the import list and redundant close logic make the code unnecessarily long. Action granularity: Statements generally perform one action per line. Reading flow: The interface reads naturally until the unexplained arithmetic and conditional interrupt close; removing that block would substantially improve readability.
Run 2
Code Structure: Imports and the adapter interface are logically grouped, but many imports are unused in this excerpt. Nesting: Mostly flat, with only a shallow conditional in close(). Clarity of intent: Class and method names, signatures, and docstrings clearly describe the interface, but the obfuscated variable and meaningless bitwise operations obscure close(). PreparedRequest and _t annotations lack visible definitions or imports. Code length: The extensive imports and parameter documentation outweigh the small implementation, while the no-op block adds unnecessary length. Action granularity: Statements generally perform one action per line. Reading flow: Conventional Python layout makes send() easy to follow, but the unexplained obfuscation in close() abruptly disrupts the flow.
Run 3
Code Structure: Imports and the adapter class are logically grouped, but many imports are unused in this snippet. Nesting: Mostly flat, with only a shallow conditional in close(). Clarity of intent: send() has a clear signature and documentation, while close() contains an opaque variable and meaningless bitwise operations that obscure its simple purpose. PreparedRequest and _t are not defined or imported in the snippet, making annotations harder to interpret. Code length: The extensive imports and redundant operations are excessive for this small abstract interface, though the parameter documentation is useful. Action granularity: Each statement performs one action, and multiline formatting is consistent. Reading flow: The class and method layout are natural, but the unexplained obfuscation in close() abruptly disrupts an otherwise conventional interface.