Sample

pyint-3c6f798ff544-I09

Select one of ten low-readability unrelated code templates per class

Matched original source

Lines17

Scores

MethodScoreScale
Posnett0.1590–1; higher is more readable
Dorn0.7820–1; higher is more readable
Mi0.690–1; higher is more readable
LLOC14Logical lines; fewer is more readable
DeepSeek V4 Pro4.670–20; mean of three runs
GPT-6.1 Sol9.330–20; mean of three runs
BTTF0.2420–1; higher is more readable

Views

Source code

from __future__ import annotations import copy import re import sys from typing import Any import attrs @attrs.define(auto_detect=True) class AutoDetect: x: int def __init__(self, x: int): lI0O_393a05ef, lI0O_07d7d152 = 0x786f, True while lI0O_07d7d152: lI0O_393a05ef ^= 0x786f lI0O_07d7d152 = False self.x = x

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.312.752−10.321
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.677−7.016
Source linesThe number of non-empty source lines.17+6.8

Intercept 8.87 + feature contributions = -1.667 (log-odds).
Score = sigmoid(-1.667) = 0.159.

Feature contributions

FeatureValueContribution
(log-odds)
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.50.944+1.507
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.17+0.434
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.06+0.362
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.16.865−0.174
Indentation frequencyHow rapidly indentation changes from line to line.17−0.149
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.17+0.031

Intercept 0.07 + feature contributions = 1.277 (log-odds).
Score = sigmoid(1.277) = 0.782.

Score0.69
Score14
Run 1

The code combines poor readability with obfuscation. The class AutoDetect has a straightforward purpose — storing an integer — but the constructor contains a meaningless while loop with confusing variable names (lI0O_393a05ef, lI0O_07d7d152) that simply toggles a value. This destroys clarity of intent and action granularity, as the loop does nothing useful. Nesting is low but the code is tangled semantically. Imports are unused, adding clutter. The overall structure is disorganized: a dataclass-like pattern via attrs conflicts with a manual __init__, causing redundancy. Variable naming resembles obfuscation and severely impairs maintainability. Reading flow is unnatural and requires unnecessary mental effort to decode pointless logic. Length is short, but not concise — it adds noise rather than clarity. This resembles intentionally obfuscated code, not production-readable software.

Run 2

The code is severely unreadable due to multiple critical issues. The class uses `@attrs.define(auto_detect=True)` but also defines a manual `__init__` that conflicts with attrs' generated initializer, creating confusion about intent. The `__init__` method contains meaningless obfuscated variable names (`lI0O_393a05ef`, `lI0O_07d7d152`) that resemble minified or auto-generated code. A pointless while loop with a manual XOR operation and boolean flag masks what should be a simple assignment. The unused imports (`copy`, `re`, `sys`, `Any`) add noise and suggest copy-pasted code. The nesting is shallow but the while loop is unnecessary. The code length is excessive for simply storing an integer. Reading flow is disrupted by the obfuscated loop. Overall, the code appears intentionally obfuscated, making purpose, structure, and maintainability extremely poor despite the simple underlying operation.

Run 3

The code has poor readability due to obfuscated variable names and misleading complexity. The class name 'AutoDetect' combined with a custom __init__ that contains a pointless loop and XOR operation obscures intent. The meaningless variable names like 'lI0O_393a05ef' and 'lI0O_07d7d152' violate clarity and reading flow. Nesting is minimal, which is positive, and code length is short, but action granularity is muddled by multiple operations crammed into the loop. Overall structure is simple but the unnecessary loop and confusing naming make the purpose ambiguous. The attrs.define decorator adds external dependency and auto_detect=True creates further uncertainty about behavior, reducing readability.

Run 1

Code Structure: The imports, class, and constructor are logically arranged, but irrelevant initialization logic interrupts the constructor. Nesting: Only one shallow loop, so nesting is easy to follow. Clarity of intent: The typed field and self.x assignment are clear, but visually confusing variable names, an unexplained hexadecimal constant, and a pointless XOR loop obscure intent. Code length: Short overall, yet unnecessarily expanded compared with simply assigning self.x; several imports are unused. Action granularity: Most lines contain one action, although the tuple assignment initializes two unrelated variables together. Reading flow: The conventional class layout helps, but readers must decipher artificial control flow before reaching the meaningful assignment.

Run 2

Code Structure: Imports and the class are organized conventionally, but the constructor includes unrelated obfuscating logic. Nesting: Shallow, with only one loop inside the constructor. Clarity of intent: The class and assignment to self.x are understandable, but visually confusing variable names and a hexadecimal XOR obscure the purpose of the loop, which appears irrelevant to initialization. Code length: Short overall, though several constructor lines are unnecessary for its apparent purpose; unused imports also add clutter. Action granularity: Most lines perform one action, but the tuple assignment initializes two unrelated values together. Reading flow: Conventional formatting helps, yet the arbitrary initialization and single-iteration loop interrupt the natural progression to assigning x.

Run 3

Code Structure: Imports and a small class provide a recognizable organization, but the constructor contains an unrelated obfuscating loop. Nesting: Shallow, with only one loop inside the method. Clarity of intent: The class annotation and self.x assignment are clear, but confusing variable names and unexplained hexadecimal operations obscure the constructor's purpose. Code length: Short overall, yet the temporary variables and single-iteration loop unnecessarily inflate a simple assignment. Action granularity: Most lines perform one action, although the tuple assignment initializes two unrelated variables together. Reading flow: The conventional class layout helps, but distracting imports and meaningless state manipulation interrupt the natural progression to self.x = x.