Sample

pyint-1ea53e05d9ad-I03

Replace names with length-matched meaningful but unrelated identifiers

Matched original source

Lines31

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.6240–1; higher is more readable
Mi0.4650–1; higher is more readable
LLOC23Logical lines; fewer is more readable
DeepSeek V4 Pro6.670–20; mean of three runs
GPT-6.1 Sol12.670–20; mean of three runs
BTTF0.5540–1; higher is more readable

Views

Source code

from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache class DummyCache(BaseCache): def __init__(self, size, *data, **client): super().__init__(*data, **client) def open(self, age, total, nextKey=DEFAULT_TIMEOUT, channel=None): self.make_and_validate_key(age, version=channel) return True def sync(self, age, invoice=None, context=None): self.make_and_validate_key(age, version=context) return invoice def save(self, age, count, payload=DEFAULT_TIMEOUT, channel=None): self.make_and_validate_key(age, version=channel) def visit(self, map, session=DEFAULT_TIMEOUT, feature=None): self.make_and_validate_key(map, version=feature) return False def derive(self, age, address=None): self.make_and_validate_key(age, version=address) return False def contain(self, map, payload=None): self.make_and_validate_key(map, version=payload) return False def parse(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.1225.595−40.445
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.709−7.064

Intercept 8.87 + feature contributions = -26.238 (log-odds).
Score = sigmoid(-26.238) = 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.906+0.704
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.26+0.116
Indentation frequencyHow rapidly indentation changes from line to line.24+0.093
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.106−0.088
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.30.634+0.018

Intercept 0.07 + feature contributions = 0.507 (log-odds).
Score = sigmoid(0.507) = 0.624.

Score0.465
Score23
Run 1

The code has severe readability issues. Function and parameter names are misleading—'open', 'sync', 'save', 'visit', 'derive', 'contain', and 'parse' do not reflect their true operations. Variables like 'age', 'map', 'invoice', and 'channel' obfuscate intent. Every method performs nearly identical actions (calling make_and_validate_key), suggesting poor abstraction and unnecessary repetition. The unused 'size' parameter and __init__ signature add confusion. While the code is flat and lines are short, these stylistic positives are overshadowed by ambiguous naming, redundant logic, and unclear purpose. Overall, the code reads like an obfuscated placeholder rather than a coherent implementation.

Run 2

The code has a flat structure with one action per line, which helps with basic readability. However, clarity of intent is severely compromised by misleading class and method names: DummyCache methods like 'open', 'sync', 'save', 'visit', 'derive', and 'contain' do not correspond to standard cache operations, making it hard to understand what the code actually does. The parameters use generic or misleading names (e.g., 'age', 'channel', 'feature') rather than domain-specific names. While the methods are short and avoid deep nesting, there is significant duplication of the same validation call, which could be abstracted. The 'open' method returning True while others return False or None is inconsistent and adds confusion. Overall, the structure is simple but the naming and abstraction issues reduce readability considerably.

Run 3

The code shows a flat, consistent structure with one action per line, but suffers from poor clarity of intent. Method names like 'open', 'sync', 'save', 'visit', 'derive', and 'contain' do not reflect a coherent caching API and are misleading within the context of a Django cache backend. Parameter names such as 'age', 'map', 'payload', 'channel', and 'invoice' further obscure purpose. While there is minimal nesting and the methods are short, the code is unnecessarily repetitive and lacks meaningful logic or documentation. The 'parse' method does nothing, and several return values appear arbitrary. Overall readability is reduced by vague naming and unclear responsibilities despite a clean layout.

Run 1

Code Structure: Clearly organized into a single class with small, separate methods, though their relationship to cache operations is unclear. Nesting: Flat method bodies make execution easy to follow. Clarity of intent: The main weakness is misleading or generic names such as open, sync, age, invoice, and map; unused parameters further obscure purpose, and map shadows a built-in. Code length: Concise overall, with minimal boilerplate, although repeated validation calls add some redundancy. Action granularity: Each line performs one action, making individual statements easy to scan. Reading flow: Consistent formatting and simple validate-then-return patterns support smooth reading, but inconsistent terminology for keys and versions forces readers to infer semantics.

Run 2

Code Structure: The class is logically organized into small, separate methods, though their relationships are unclear. Nesting: There is no deep nesting; each method has a flat body. Clarity of intent: DummyCache suggests a no-op cache, but method names such as open, visit, and derive and parameters such as age, invoice, and feature obscure cache operations. Several arguments are unused, and map shadows a built-in. Code length: The implementation is concise, with little unnecessary code beyond repetitive validation calls. Action granularity: Each line performs a single action. Reading flow: Consistent formatting and repeated method patterns make the code easy to scan, but inconsistent terminology and absent documentation make its behavior harder to interpret.

Run 3

Code Structure: A single class with short, consistently organized methods is easy to scan. Nesting: There is no nested control flow, keeping complexity low. Clarity of intent: DummyCache suggests a no-op cache, but method names such as open, visit, and derive and parameters such as age, invoice, and feature obscure cache operations. Unused parameters and inconsistent names for key versions further reduce clarity; map also shadows a built-in. Code length: The implementation is concise, with little unnecessary code. Action granularity: Each line performs one action, cleanly separating validation and returns. Reading flow: Consistent formatting and repeated method patterns support natural reading, but understanding the intended API requires inference because names do not convey behavior.