Sample
pyint-425c3cf1d11f-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.729 | 0–1; higher is more readable |
| Mi | 0.263 | 0–1; higher is more readable |
| LLOC | 20 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.468 | 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. | 770.626 | −25.431 |
| Source linesThe number of non-empty source lines. | 31 | +12.4 |
| 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.599 | −6.898 |
Intercept 8.87 + feature contributions = -11.059 (log-odds).
Score = sigmoid(-11.059) = 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.906 | +0.598 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.056 | +0.394 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.773 | +0.02 |
| 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.938 | −0.017 |
Intercept 0.07 + feature contributions = 0.989 (log-odds).
Score = sigmoid(0.989) = 0.729.
| Score | 0.263 |
|---|
| Score | 20 |
|---|
Run 1
The code has a clear class-based structure with a well-defined purpose, but is severely undermined by the injected obfuscated variable 'lI0O_216670bc' that performs pointless arithmetic operations. This variable breaks clarity of intent, adds unnecessary lines, and disrupts reading flow. Nesting is minimal (single if block), and action granularity is mostly one action per line, but the obfuscation lines violate conciseness. The docstring and f-string error message are clear, and the class structure is logical, but the arbitrary obfuscation suggests possible malware or anti-tampering code, reducing trust in readability.
Run 2
The code is severely unreadable due to obfuscated variable lI0O_216670bc with meaningless bit operations that serve no purpose. While the class structure is simple, the injected noise destroys clarity of intent and reading flow. The __call__ method is otherwise clear with a straightforward isinstance check and error message, and action granularity is acceptable. However, the meaningless variable and operations make the code appear malicious or auto-generated, violating core readability principles. The nesting is flat and code length is not excessive, but the obfuscation dominates the evaluation. The code would be readable (around 15-16) without the lI0O_216670bc lines.
Run 3
The code has a clear class structure with type annotations and a docstring, but contains several readability issues. The presence of three meaningless lines (lI0O_216670bc variable assignments) adds confusion and unnecessary complexity. The __call__ method raises TypeError with multiple positional arguments without explaining their purpose. The f-string message is clear, but the validator's intent is somewhat obscured by the odd variable lines. Nesting is minimal (single if statement), which is good. Action granularity is reasonable apart from the meaningless lines. Overall, the core logic is understandable but the dead code and unclear exception arguments make it less readable. The import section is straightforward, with no unused imports visible.
Run 1
Code Structure: The validator class logically separates validation and representation, but several imports are unused in this snippet. Nesting: Shallow nesting makes control flow easy to follow. Clarity of intent: The class name, subclass check, and descriptive error clearly communicate the purpose; however, the cryptic variable and pointless bitwise operations distract from it, while the call-method docstring explains representation rather than validation. Code length: The implementation is fairly short, but the irrelevant calculations and unused imports add unnecessary length. Action granularity: Each statement performs a single action, and the multiline exception construction is easy to scan. Reading flow: The core validation reads naturally, but the unrelated calculations interrupt the transition from method entry to the subclass check.
Run 2
Code Structure: Imports and a small validator class are logically organized, but unrelated bit manipulation interrupts the validation logic. Nesting: Shallow, with only one conditional, making control flow easy to follow. Clarity of intent: The class name, issubclass check, error message, and repr clearly convey subclass validation; however, the cryptic lI0O_216670bc variable and unused arithmetic obscure intent. Code length: Mostly concise, but three ineffective arithmetic statements add unnecessary length, and the docstring explains representation customization rather than validation behavior. Action granularity: Each statement performs a single action, and the multiline exception arguments are easy to scan. Reading flow: Generally natural from imports to class definition and methods, but the irrelevant arithmetic creates a distracting detour before the central check.
Run 3
Code Structure: Imports and the validator class are logically organized, but unrelated bit manipulation disrupts the validation method. Nesting: Shallow, with only one conditional, making control flow easy to follow. Clarity of intent: The class name, subclass check, error message, and representation communicate the validator's purpose; the cryptic variable and purposeless operations introduce ambiguity, while the docstring explains the class design rather than the method's behavior. Code length: Mostly compact, but three unnecessary statements and several imports unused in this snippet add clutter. Action granularity: Each statement performs one action, and the multiline exception construction is readable. Reading flow: The progression from declaration to validation and representation is natural, except for the unexplained arithmetic inserted before the meaningful check.