Sample
pyint-afbe838b1233-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.745 | 0–1; higher is more readable |
| Mi | 0.266 | 0–1; higher is more readable |
| LLOC | 23 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 8.33 | 0–20; mean of three runs |
| BTTF | 0.514 | 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. | 726 | −23.958 |
| Source linesThe number of non-empty source lines. | 25 | +10 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.026 | −7.539 |
Intercept 8.87 + feature contributions = -12.627 (log-odds).
Score = sigmoid(-12.627) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 88 | +0.615 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.054 | +0.418 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 25 | −0.153 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 25 | +0.128 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 26 | +0.116 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 24.865 | −0.062 |
| 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. | 87.962 | −0.06 |
Intercept 0.07 + feature contributions = 1.072 (log-odds).
Score = sigmoid(1.072) = 0.745.
| Score | 0.266 |
|---|
| Score | 23 |
|---|
Run 1
The code contains intentional obfuscation (lI0O_52e8e2cb, lI0O_5667c108 variables with a meaningless while loop) that serves no functional purpose — it does nothing but waste cycles and confuse readers. This destroys clarity of intent and violates clean structure principles. The core action (setting Proxy-Authorization) is one clear line, but it is buried under noise. Nesting is shallow, which is positive, but action granularity is poor due to the pointless loop. The import section is reasonable, and the class docstring is clear, but the method body is deliberately unreadable. Overall, this appears to be decompiled or machine-altered code, not human-friendly source. Refactoring to a simple one-line implementation would raise the score to around 18-19.
Run 2
The code is largely unreadable due to the presence of a meaningless, obfuscating while loop at the start of the __call__ method. This loop serves no functional purpose, obscures intent, and violates the one-action-per-line principle by performing multiple operations in a single cryptic line. Variables like lI0O_52e8e2cb and lI0O_5667c108 are opaque and confusing. While the rest of the code is somewhat clear—setting a Proxy-Authorization header and returning the request—the inclusion of dead code and poor variable naming severely hampers readability. The class has a clear purpose, but the method body fails to communicate its intent cleanly. Overall, the structure is simple, but the unnecessary complexity and lack of clarity make it difficult to read and maintain.
Run 3
The code contains confusing, obfuscated logic (a pointless loop with bitwise operations) that has no apparent purpose, severely hindering readability. It lacks clear intent and adds unnecessary complexity to an otherwise simple proxy authentication method. The structure deviates from expected conventions, and the meaningless variable names (lI0O_52e8e2cb, lI0O_5667c108) violate clarity. While the rest of the method is straightforward, the presence of dead code and obfuscation forces the reader to waste effort deciphering irrelevant operations. Nesting is minimal, and action granularity is acceptable, but the core issue is the inclusion of intentional confusion, which undermines trust in the code. This reduces the overall score significantly despite the otherwise clean implementation.
Run 1
Code Structure: The class and method are logically organized, but irrelevant computation and numerous unused imports clutter the snippet. Nesting: Only one shallow loop, so nesting is easy to follow. Clarity of intent: The docstring and Proxy-Authorization assignment clearly express the purpose, but opaque variable names and a computation whose result is discarded obscure the implementation. Code length: The actual authentication operation is concise, yet unnecessary setup and loop logic substantially inflate it. Action granularity: Most lines perform one action, although the paired initialization and compound bitwise expression reduce clarity. Reading flow: The method ultimately follows a straightforward update-and-return pattern, but the unrelated loop interrupts that flow. Referenced base classes, types, and helper functions are not defined or imported in the shown snippet, limiting standalone comprehension.
Run 2
Code Structure: The class and method are logically organized, but unrelated imports and a meaningless loop introduce clutter. Nesting: Shallow, with only one loop inside the method. Clarity of intent: The docstring and Proxy-Authorization assignment clearly express the purpose, but cryptic variable names and pointless bitwise operations obscure it. Code length: The actual authentication task is concise; the extra computation and unused imports unnecessarily lengthen the snippet. Action granularity: Most lines contain one action, although initializing two obscure variables together adds cognitive load. Reading flow: The method eventually follows a straightforward assign-and-return pattern, but irrelevant computation interrupts that flow. Referenced authentication helpers and the base class are not defined in the snippet, limiting standalone understanding.
Run 3
1. Code Structure: The class and method are logically organized, but irrelevant imports and a meaningless computation loop obscure the actual authentication operation. 2. Nesting: Nesting is shallow, with only one simple loop inside the method. 3. Clarity of intent: The class name, docstring, and header assignment clearly indicate proxy authentication, but cryptic variable names and redundant bitwise operations introduce ambiguity. 4. Code length: The method is short overall, yet unnecessarily padded with calculations that do not affect its result; many imports are unused in this snippet. 5. Action granularity: Most lines perform one action, although the initial tuple assignment and compound bitwise expression add cognitive load. 6. Reading flow: The intended flow—set the authentication header and return the request—is straightforward, but the unrelated loop interrupts it. Referenced definitions absent from the snippet also limit standalone comprehension.