Sample
pyint-0b41c05a2103-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.461 | 0–1; higher is more readable |
| Mi | 0.467 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.297 | 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. | 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
| Feature | Value | Contribution (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.
| Score | 0.467 |
|---|
| Score | 28 |
|---|
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.