Sample
pyint-f91f026097f3-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.405 | 0–1; higher is more readable |
| Mi | 0.459 | 0–1; higher is more readable |
| LLOC | 50 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.551 | 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. | 2946.021 | −97.219 |
| Source linesThe number of non-empty source lines. | 93 | +37.2 |
| 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.52 | −6.78 |
Intercept 8.87 + feature contributions = -57.928 (log-odds).
Score = sigmoid(-57.928) = 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. | 94 | −2.292 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 79 | +1.995 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 79 | −1.392 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.849 | +0.888 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 103.872 | +0.871 |
| 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. | 104.947 | −0.78 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.071 | +0.256 |
Intercept 0.07 + feature contributions = -0.383 (log-odds).
Score = sigmoid(-0.383) = 0.405.
| Score | 0.459 |
|---|
| Score | 50 |
|---|
Run 1
The code has a clear conceptual purpose (wrapping a requests object for cookiejar compatibility) but suffers from poor naming and structure. Methods like `get2`, `get3`, `get4`, `get5`, `get6`, `get7`, `add2`, `has`, `is2`, `unv`, `hos` are largely meaningless and obscure intent, forcing readers to infer function by implementation. Naming such as `nam`, `def2`, `hos2`, `nam2` reduces clarity further. While nesting is low and lines are generally concise, the reading flow is disjointed because method names do not reflect their actions. The class is not excessively long, but duplicated logic (e.g., repeated `urlparse`) and unclear abstractions reduce readability. Action granularity is mostly one action per line. Overall, the structure is coherent but the lack of descriptive identifiers significantly hampers understanding.
Run 2
The code suffers from severe readability issues. Method names like 'get2', 'get3', 'add2', 'is2', 'has', etc. are completely opaque and provide no indication of their purpose. The class docstring is helpful, but the methods themselves obscure intent. The code uses multiple aliases (e.g., 'get3' vs 'get4') and the parameter names ('nam', 'nam2', 'nam3', 'def2', 'val2', 'hos2') are meaningless. The logic in 'get5' is convoluted for reconstructing a URL. The structure is somewhat flat and logical, and actions are mostly one per line, but the terrible naming undermines clarity of intent and reading flow. The code is not excessively long, but the cryptic naming makes it effectively unreadable. The use of TYPE_CHECKING, typing, and internal imports is fine, but the method names make it impossible to understand what the code does without significant investigation.
Run 3
This code is significantly unreadable due to obfuscated method names (get2, get3, get4, get5, get6, get7, add2), vague parameter names (nam, nam2, nam3, def2, val2), and meaningless type hints. The class structure is present but undermined by unclear intent throughout. While there is minimal nesting and action granularity is acceptable, the reading flow is severely disrupted by cryptic naming. Code length is concise for what it does, but clarity of intent is almost entirely absent. The original functionality (mocking a request for cookiejar) is hard to discern without significant effort. The imports are excessive and unused ones appear, further clouding intent. Overall, the logic is recognizable but the naming choices render it nearly unreadable.
Run 1
Code Structure: A single wrapper class groups related behavior logically, but unused imports and inconsistent import ordering add clutter. Nesting: Methods are flat, with only one simple conditional, making control flow easy to follow. Clarity of intent: The class docstring and URL-reconstruction comments help, but names such as get2, get5, hos2, nam2, and unv obscure method purposes and data meanings. Code length: Most methods are concise, although trivial forwarding methods and unused imports introduce overhead. Action granularity: Statements generally perform one action per line; the nested header lookup is slightly denser but still manageable. Reading flow: Initialization, accessors, and header operations form a reasonably natural sequence, but cryptic naming and documentation references to methods not present under those names interrupt comprehension.
Run 2
Code Structure: A single, logically organized wrapper class separates initialization, request access, and header handling, though import ordering is inconsistent. Nesting: Very shallow; the conditional in get5 is easy to follow. Clarity of intent: The class docstring, comments, and type annotations provide useful context, but names such as get2 through get7, is2, hos2, nam2, and unv obscure method purposes and relationships. Code length: Generally concise, although several imports are unused in this snippet and trivial forwarding methods add some overhead. Action granularity: Statements generally perform one action per line; the nested dictionary lookup in get6 is slightly denser. Reading flow: Consistent formatting and short methods help navigation, but opaque naming forces readers to inspect implementations repeatedly, and properties placed at the end require tracing back to ambiguously named methods.
Run 3
Code Structure: The wrapper is logically organized into small methods and properties, though imports are inconsistently grouped and several appear unused. Nesting: Almost entirely flat, with one simple conditional, making control flow easy to follow. Clarity of intent: The class docstring and URL-reconstruction comments explain the overall purpose, but names such as get2–get7, is2, nam2, hos2, and par obscure individual responsibilities. Comments and error messages also reference descriptive methods absent under those names, increasing confusion. Code length: Generally concise, although trivial forwarding methods and properties introduce some indirection. Action granularity: Statements typically perform one action per line; the nested header lookup is slightly denser but manageable. Reading flow: Formatting, type annotations, and short methods support scanning, but deciphering numbered names and following aliases interrupts an otherwise natural flow.