Sample
pyint-c34b9622dc25-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.75 | 0–1; higher is more readable |
| Mi | 0.261 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs |
| BTTF | 0.513 | 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. | 685.268 | −22.614 |
| Source linesThe number of non-empty source lines. | 27 | +10.8 |
| 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.736 | −7.105 |
Intercept 8.87 + feature contributions = -10.048 (log-odds).
Score = sigmoid(-10.048) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.929 | +0.598 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.049 | +0.463 |
| 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. | 28 | +0.045 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 26.773 | −0.036 |
| 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. | 86.964 | −0.018 |
Intercept 0.07 + feature contributions = 1.097 (log-odds).
Score = sigmoid(1.097) = 0.75.
| Score | 0.261 |
|---|
| Score | 21 |
|---|
Run 1
The code has some readable elements — it uses modern attrs features (frozen, slots), a clear class structure, and a descriptive docstring. However, it is severely undermined by an obfuscated segment inside __call__: a meaningless while-loop with encoded variable names (lI0O_a0ac513d, lI0O_d345b7ff) that performs a no-op XOR operation. This destroys clarity of intent, breaks action granularity, and disrupts natural reading flow. The core validation logic itself is straightforward, but nested inside the method after the confusing block. Additionally, the method mixes multiple concerns: obfuscation, length check, message formatting, and exception raising. The import list and class-level structure are fine, but the presence of dead/obfuscated code makes the codebase feel tangled and unprofessional. Overall, despite a clean outer structure, the central method's lack of transparency drops readability substantially.
Run 2
The code mixes clear, readable attrs class patterns with highly obfuscated and meaningless lines. The `_MinLengthValidator` structure is mostly clear, but the while loop introducing `lI0O_a0ac513d` and `lI0O_d345b7ff` with cryptic XOR operations serves no functional purpose and severely damages readability. The import section is not directly used in the snippet, which adds confusion. The validator's `__call__` is straightforward aside from the variable noise, and the error message is helpful. However, the obfuscated block and unused imports cause major issues with clarity of intent, reading flow, and action granularity, making the code difficult to maintain or review.
Run 3
The code has a clear class structure and type hints, but readability is severely damaged by obfuscated variable names (lI0O_a0ac513d, lI0O_d345b7ff) and dead code that performs meaningless bitwise operations. The while loop with boolean switching has no functional purpose and obscures intent. Imports include 'operator' and 'Pattern' that are unused. The validator method itself is readable, but the surrounding noise makes the code appear intentionally obfuscated - likely minified or auto-generated, not written for human consumption. Nesting is flat but the confusing variables violate clarity of intent and reading flow.
Run 1
Code Structure: The callable validator class logically separates validation and representation, but irrelevant imports and an unrelated loop add clutter. Nesting: Mostly shallow; the single-level loop and conditional are easy to follow. Clarity of intent: The class name, min_length attribute, comparison, and error message clearly convey minimum-length validation, while cryptic variable names and meaningless bitwise operations obscure intent. Code length: The actual validation is concise, but the loop and unused imports unnecessarily lengthen the snippet. Action granularity: Most statements perform one action per line, although the tuple assignment initializes two unrelated variables together. Reading flow: Class organization and the final validation read naturally, but the unexplained loop interrupts the path from method entry to the length check.
Run 2
Code Structure: The validator class logically groups configuration, validation, and representation, but unrelated imports and an irrelevant loop introduce clutter. Nesting: Shallow nesting makes the control flow easy to follow mechanically. Clarity of intent: The class name, length comparison, and error message clearly express minimum-length validation; cryptic variable names and meaningless bitwise operations obscure that purpose. Code length: The actual validation is concise, but the redundant initialization and loop unnecessarily extend it. Action granularity: Most lines perform one action, although the tuple assignment initializes two unrelated variables together. Reading flow: The class layout is natural, but the irrelevant loop interrupts the path from the method declaration to the validation check, and the docstring explains the callable-class design rather than the method's behavior.
Run 3
Code Structure: The validator class is logically organized, but irrelevant imports and an unrelated obfuscation block distract from its purpose. Nesting: Mostly shallow, with a simple loop and conditional. Clarity of intent: The length check, error message, and representation are clear; cryptic variable names and unexplained hexadecimal operations obscure intent. Code length: The core validation is concise, but the redundant loop and unused imports add unnecessary length. Action granularity: Most lines perform one action, although the paired initialization combines assignments. Reading flow: The class layout is natural, but meaningless state manipulation interrupts the path from the method documentation to the actual validation.