Sample

pyint-0b41c05a2103-I09

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

Matched original source

Lines37

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.4610–1; higher is more readable
Mi0.4670–1; higher is more readable
LLOC28Logical lines; fewer is more readable
DeepSeek V4 Pro9.670–20; mean of three runs
GPT-6.1 Sol150–20; mean of three runs
BTTF0.2970–1; higher is more readable

Views

Source code

from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache class DummyCache(BaseCache): def __init__(self, host, *args, **kwargs): lI0O_db7b7209 = 0xc8f8 ^ 0xc8f8 if lI0O_db7b7209 != 0: if ((lI0O_db7b7209 | 1) & 1) == 0: lI0O_db7b7209 += 1 else: lI0O_db7b7209 -= 1 super().__init__(*args, **kwargs) def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): self.make_and_validate_key(key, version=version) return True def get(self, key, default=None, version=None): self.make_and_validate_key(key, version=version) return default def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): self.make_and_validate_key(key, version=version) def touch(self, key, timeout=DEFAULT_TIMEOUT, version=None): self.make_and_validate_key(key, version=version) return False def delete(self, key, version=None): self.make_and_validate_key(key, version=version) return False def has_key(self, key, version=None): self.make_and_validate_key(key, version=version) return False def clear(self): pass

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.1434.891−47.351
Source linesThe number of non-empty source lines.37+14.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.765−7.148

Intercept 8.87 + feature contributions = -30.829 (log-odds).
Score = sigmoid(-30.829) = 0.

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.69.895+0.705
Indentation frequencyHow rapidly indentation changes from line to line.37+0.543
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.37−0.428
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.37−0.274
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.36.803+0.105
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.104−0.072

Intercept 0.07 + feature contributions = -0.157 (log-odds).
Score = sigmoid(-0.157) = 0.461.

Score0.467
Score28
Run 1

The code has clear class and method structure, and most methods are concise with single actions, contributing to readability. However, the __init__ method contains obfuscated, nonsensical logic using a variable with an unreadable name and redundant conditional blocks, severely harming clarity of intent and reading flow. This dead code should be removed. Additionally, variable naming is poor, and some methods have unused parameters, which creates ambiguity. While the overall organization is logical, the presence of confusing and unnecessary code significantly reduces readability.

Run 2

The code is mostly straightforward but contains confusing elements. The class structure is logical, and methods are short with clear intent, though action granularity is inconsistent (e.g., `set` returns None without explanation). The main issues are the obfuscated variable name `lI0O_db7b7209` and the pointless if-else block in `__init__`, which adds unnecessary nesting and hurts readability. Removing that block would improve clarity. Otherwise, the code is concise and follows Django cache backend conventions, but the odd init logic significantly lowers the score.

Run 3

The code has a reasonably clear structure with a class inheriting from BaseCache and distinct methods mirroring a cache interface. Most methods are flat, concise, and perform one main action per line. However, readability is severely compromised by the obfuscated variable name `lI0O_db7b7209` and the pointless arithmetic/logic block in `__init__`, which obscures intent. The `touch`, `delete`, and `has_key` methods are also ambiguous because they return `False` without any explanatory context, making their behavior unclear. Although the overall organization is logical and method lengths are short, the presence of dead/confusing code and unclear semantics drags the score down significantly.

Run 1

Code Structure: Methods are logically organized within a small cache class, but irrelevant constructor logic introduces clutter. Nesting: Most methods are flat; the constructor contains unnecessary nested conditionals. Clarity of intent: Standard cache method names and straightforward return values convey dummy-cache behavior, while the obfuscated variable and pointless bitwise operations obscure initialization. Code length: The implementation is concise overall, although the constructor includes redundant dead code. Action granularity: Each line generally performs one action, with no compressed statement chains. Reading flow: Consistent method signatures and repeated key validation make the class easy to scan, but the constructor's distracting arithmetic interrupts an otherwise natural flow.

Run 2

1. Code Structure: The class is logically organized into short, distinct cache operations, but irrelevant constructor logic detracts from coherence. 2. Nesting: Most methods are flat; the constructor introduces unnecessary nested conditionals. 3. Clarity of intent: DummyCache and its standard method names clearly communicate a no-op cache, while the cryptic variable and bitwise expressions obscure the constructor. 4. Code length: Methods are concise, but the constructor contains redundant dead code: the XOR always yields zero, so the conditional never executes. 5. Action granularity: Each statement occupies its own line, making individual actions easy to identify. 6. Reading flow: Consistent method formatting and repeated key validation support predictable reading, although the opening obfuscation interrupts an otherwise straightforward implementation.

Run 3

Code Structure: The class is logically organized into small, recognizable cache operations, but the constructor contains unrelated dead code. Nesting: Most methods are flat; the constructor introduces unnecessary nested conditionals. Clarity of intent: Dummy-cache behavior is clear from method names and return values, while the cryptic variable and pointless bitwise expressions obscure initialization. Code length: Methods are concise, but the constructor is needlessly inflated. Action granularity: Each line generally performs one action, making individual operations easy to follow. Reading flow: Consistent signatures and repeated key validation create a natural flow, disrupted by the obfuscated constructor logic.