Sample
pyint-752dca2b4957-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.871 | 0–1; higher is more readable |
| Mi | 0.508 | 0–1; higher is more readable |
| LLOC | 33 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.718 | 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. | 1816.539 | −59.946 |
| Source linesThe number of non-empty source lines. | 85 | +34 |
| 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.644 | −6.966 |
Intercept 8.87 + feature contributions = -24.041 (log-odds).
Score = sigmoid(-24.041) = 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. | 86 | −2.009 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 71 | +1.719 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 84.927 | +0.777 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.965 | +0.728 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.036 | +0.587 |
| 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. | 94.965 | −0.357 |
Intercept 0.07 + feature contributions = 1.913 (log-odds).
Score = sigmoid(1.913) = 0.871.
| Score | 0.508 |
|---|
| Score | 33 |
|---|
Run 1
The code is largely unreadable due to severe naming issues and structural problems. The import section is excessively long and disorganized, making it difficult to identify what's actually used. Critical method names are truncated ('sen' instead of 'send', 'clo' instead of 'close'), obscuring their purpose entirely. Parameter names are also abbreviated ('tim' for timeout, 'ver' for verify, 'cer' for cert, 'pro' for proxies), making the `send` method signature nearly incomprehensible without the docstring. The docstring itself is well-formatted but paradoxically references parameter names ('request', 'stream', 'timeout', 'verify', 'cert', 'proxies') that do not match the actual abbreviated parameters. The code structure is flat but confusing - the BaseAdapter class has no clear organizational pattern. While the code is concise and actions are granulated (one per line), the ambiguous naming makes reading flow impossible without constant cross-referencing. The intent is unclear despite docstring documentation.
Run 2
The code has good structure with clear imports and class organization, but suffers from serious readability issues in method signatures. The parameter names 'sen', 'str2', 'tim', 'ver', 'cer', 'pro' are cryptic abbreviations that obscure intent, while the docstring uses descriptive names like 'stream', 'timeout', 'verify', 'cert', 'proxies'—showing the disconnect. The method name 'sen' and 'clo' are also truncated versions of 'send' and 'close'. Import organization is clean, and type hints are present but inconsistent (e.g., 'dict[str, str]' vs 'typing' imports). The BaseAdapter class has good documentation and logical structure. Action granularity is appropriate—one import per line, one parameter per line in method signatures. The nested imports from exceptions show good organization. Overall, the code is maintainable structurally but the cryptic naming would force developers to constantly reference documentation, significantly reducing readability.
Run 3
The code has several readability issues despite clean imports. Method names 'sen' and 'clo' are cryptic abbreviations that obscure intent, and parameter names (str2, tim, ver, cer, pro) are inconsistently abbreviated versus the docstring's descriptive parameter names (request, stream, timeout, etc.). The BaseAdapter class is straightforward with appropriate docstrings, but the method is essentially a stub - which is acceptable for an abstract base class. Import organization is logical and follows conventions. However, the parameter naming breaks reading flow and clarity of intent. The documentation partially compensates but creates a disconnect between code and comments. Structure is flat and simple, action granularity is appropriate, and length is concise. Overall, the abbreviated naming significantly undermines readability despite other strengths.
Run 1
Code Structure: The adapter class and its two methods are logically organized, but the extensive import block overwhelms the small implementation. Nesting: Very flat, with no complex control flow. Clarity of intent: The class description and docstrings explain the purpose, but abbreviated names such as sen, clo, str2, tim, and ver obscure meaning. Docstring parameter names do not match the signature, and PreparedRequest and _t are not defined or imported in the snippet, making annotations harder to interpret. Code length: The method bodies are concise, but many imports are unused in the displayed code, and the lengthy documentation is disproportionate to the implementation. Action granularity: Each executable line performs a single clear action. Reading flow: Conventional imports followed by a class provide a natural progression, but import clutter, cryptic identifiers, and inconsistent documentation interrupt comprehension.
Run 2
Code Structure: Imports and a small adapter class are logically organized, although the extensive imports overwhelm the minimal implementation. Nesting: Very flat, with no nested control flow. Clarity of intent: The adapter abstraction and docstrings communicate purpose, but abbreviated names such as sen, clo, str2, tim, ver, cer, and pro obscure meaning. Docstring parameter names do not match the signature, and PreparedRequest and _t are not defined or imported in the snippet, making annotations harder to interpret. Code length: Method bodies are concise, but many unused imports and lengthy documentation create disproportionate overhead. Action granularity: Each statement performs one action, and multiline signatures are easy to scan. Reading flow: Conventional import-to-class organization helps, but readers must pass substantial import clutter before reaching the implementation and reconcile cryptic identifiers with descriptive documentation.
Run 3
Code Structure: Imports precede a small, logically organized adapter class, though many imports are unused in this excerpt. Nesting: Methods are flat, with no complex control flow. Clarity of intent: The abstract transport interface is recognizable, but abbreviated names such as sen, clo, str2, ver, and cer obscure meaning. Docstring parameter names do not match the signature, and PreparedRequest and _t lack visible definitions or imports, increasing reader uncertainty. Code length: Method bodies are concise, but the extensive imports and lengthy documentation outweigh the minimal implementation. Action granularity: Each statement performs one action, and multiline signatures are easy to scan. Reading flow: Class and method ordering are natural, but inconsistent naming, mismatched documentation, and unexplained type references interrupt comprehension.