Sample
pyint-d702ad3bb762-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.666 | 0–1; higher is more readable |
| Mi | 0.407 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.552 | 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. | 1455.767 | −48.04 |
| Source linesThe number of non-empty source lines. | 43 | +17.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.636 | −6.953 |
Intercept 8.87 + feature contributions = -28.924 (log-odds).
Score = sigmoid(-28.924) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 43 | +0.75 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 43 | −0.566 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 44 | −0.522 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82 | +0.519 |
| 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. | 81.955 | +0.194 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 42.843 | +0.189 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.091 | +0.056 |
Intercept 0.07 + feature contributions = 0.69 (log-odds).
Score = sigmoid(0.69) = 0.666.
| Score | 0.407 |
|---|
| Score | 31 |
|---|
Run 1
The code demonstrates moderately readable structure with clear class organization and method separation, but the use of generic parameter names (a through i) obscures intent and harms readability. The class has a logical flow with straightforward __init__, comparison, and call methods. Nesting is minimal, keeping the code flat and easy to follow. The overload decorators add complexity but serve a purpose for type checking. However, the generic naming convention severely impacts clarity - parameter names like 'e', 'f', 'g' provide no semantic meaning, making it harder to understand what arguments are expected. The action granularity is good with one operation per line. The reading flow is somewhat disjointed due to parameter names and overload declarations interrupting the natural understanding of method signatures. Code length is appropriately concise for the functionality provided.
Run 2
The code is technically correct but demonstrates poor readability practices. The variable names 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i' are meaningless and obscure the intent of the parameters. The overload decorators use confusing parameter names, making it unclear which overload handles strings versus bytes. The class structure is overly complex for a simple authentication mechanism - the overload patterns, type hints, and dual comparison methods create unnecessary overhead. While the logic follows a linear flow, the cryptic naming forces readers to decode each variable's purpose. The code would be significantly more readable with descriptive names like 'username', 'password', 'other_auth', 'request', etc. The imports appear unused (hashlib, os, re, threading, time, warnings) further contributing to confusion. The action granularity is acceptable, but the overall intent is buried under naming obfuscation and unnecessary complexity.
Run 3
The code is generally readable but has several issues. The class structure is logical, with clear separation of methods, and the purpose is evident - implementing HTTP Basic Authentication. Nesting is minimal, with only one level in the __eq__ method's list comprehension. However, the parameter naming is poor and confusing: a, b, c, d, e, f, g, h, i are placeholder names that obscure intent and reduce readability significantly. While the overload decorators show type flexibility, the single-letter parameters make the code harder to understand than necessary. Action granularity is good - each line performs one clear operation. The reading flow is natural with methods in logical order. Code length is concise without being overly compressed. The __ne__ method could be improved by implementing __hash__ too, but this is a minor design concern rather than readability issue. The main deduction is for cryptic parameter names throughout the class.
Run 1
1. Code Structure: The class is logically organized into initialization, comparison, and request authentication methods, but numerous unused imports clutter the snippet. 2. Nesting: Methods are flat, with no complex branching or deep nesting. 3. Clarity of intent: The class name, docstring, attributes, and Authorization assignment clearly convey its purpose, but single-letter parameter names obscure meaning. AuthBase, PreparedRequest, and _basic_auth_str are not defined or imported in the snippet, reducing self-contained clarity. 4. Code length: Methods are concise, although the overloads and list-based all() comparison add verbosity for simple operations. 5. Action granularity: Each statement generally performs one clear action. 6. Reading flow: The method sequence is natural, but sparse spacing between imports and overload declarations, combined with inconsistent parameter naming across signatures, makes scanning less smooth.
Run 2
Code Structure: Methods are logically organized within a focused authentication class, but numerous unused imports clutter the excerpt. Nesting: Very shallow, making control flow easy to follow. Clarity of intent: The class docstring, method names, and username/password attributes explain the purpose, but single-letter parameters obscure meaning, and referenced types and helpers are not defined in the excerpt. Code length: Mostly concise, though the overloads and all() over a two-item list add verbosity to simple operations. Action granularity: Generally one action per line; inline overload bodies are compact but slightly less readable. Reading flow: Initialization, comparison, and request modification follow a natural sequence, although arbitrary parameter names and tightly spaced overload declarations interrupt that flow.
Run 3
Code Structure: The class is logically organized into initialization, comparison, and request authentication methods, although numerous unused imports and unresolved names in the snippet distract. Nesting: Minimal nesting makes control flow easy to follow. Clarity of intent: The class name, docstring, attributes, and Authorization assignment clearly communicate its purpose, but single-letter parameters obscure meaning and inconsistent overload parameter names reduce clarity. Code length: Methods are concise, though the import block and list-based all() comparison add unnecessary bulk. Action granularity: Most lines perform one clear action; compact overload declarations are understandable but visually compressed. Reading flow: Method ordering is natural, but sparse spacing around imports and overloads, excessive imports, and cryptic parameter names interrupt otherwise straightforward reading.