Sample
pyint-6d4470261d83-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.609 | 0–1; higher is more readable |
| Mi | 0.502 | 0–1; higher is more readable |
| LLOC | 46 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.466 | 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. | 2561.757 | −84.538 |
| Source linesThe number of non-empty source lines. | 73 | +29.2 |
| 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.626 | −6.939 |
Intercept 8.87 + feature contributions = -53.407 (log-odds).
Score = sigmoid(-53.407) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 68 | +1.615 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 74 | −1.584 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 68 | −1.14 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 87.946 | +0.615 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 72.91 | +0.609 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.064 | +0.319 |
| 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. | 87.959 | −0.06 |
Intercept 0.07 + feature contributions = 0.444 (log-odds).
Score = sigmoid(0.444) = 0.609.
| Score | 0.502 |
|---|
| Score | 46 |
|---|
Run 1
The code is mostly readable but degraded by an obfuscated block in the clean() method. Imports are organized and the class structure is logical with clear docstring and error messages. Nesting depth is moderate and mostly acceptable. The InlineForeignKeyField methods are generally concise, with clear intent in __init__ and has_changed. However, the clean() method begins with a nonsensical variable (lI0O_b9382977) and dead code involving bitwise operations and a useless conditional, which severely hurts clarity and reading flow. This appears to be deliberately obfuscated or leftover junk code. Action granularity is reasonable— one meaningful operation per line for the most part— but the presence of the dead block violates that. If that block were removed, the code would rate much higher. Overall structure and naming are solid, but readability suffers from this unnecessary complexity and ambiguity.
Run 2
The code is generally well-structured with clear imports, logical class organization, and consistent indentation. Most methods are concise and have a single clear purpose. However, several issues reduce readability: the `clean()` method contains obfuscated dead code (the `lI0O_b9382977` variable and its conditional logic) that serves no purpose and is confusing. The nesting in `clean()` is moderate but acceptable. While the class is readable overall, the unclear variable naming and unnecessary complexity in the obfuscated block drag down clarity. Some lines are dense due to long conditional expressions. Overall, it is readable but would benefit from removing dead code and simplifying logic.
Run 3
The code contains a deliberately obfuscated block (lI0O_b9382977 variable with XOR operations and dead branches) unrelated to the method's purpose, severely hurting clarity of intent. While the imports are organized and the class structure is logical, the clean() method's obfuscated code breaks reading flow and action granularity. The nesting is low, and the overall length is reasonable, but the injected irrelevant code makes this hard to read. Without that block, the code would be quite readable (around 10-12), but the obfuscation undermines it significantly.
Run 1
Code Structure: The class is logically organized into initialization, validation, and change detection, but many unused imports and an unrelated block weaken cohesion. Nesting: Most nesting is shallow, though the unnecessary nested conditions in clean() add complexity. Clarity of intent: Descriptive method names, attributes, comments, and the docstring explain the field's purpose; the cryptic lI0O_b9382977 variable and pointless bitwise operations obscure it. Code length: Core functionality is reasonably concise, but unused imports and unreachable conditional logic unnecessarily extend the snippet. Action granularity: Statements generally perform one action per line, with readable formatting for longer calls. Reading flow: Initialization and validation follow a natural sequence, but the irrelevant arithmetic at the start of clean() interrupts that flow and forces readers to verify that it has no effect.
Run 2
Code Structure: The class is logically organized into initialization, validation, and change detection, but numerous unused imports add clutter. Nesting: Mostly shallow, with manageable conditionals; the irrelevant nested block in clean() adds needless complexity. Clarity of intent: Descriptive method and attribute names, a docstring, and comments explain the field’s purpose, but the cryptic variable and meaningless bitwise operations obscure validation logic. Code length: Core functionality is reasonably concise, though unused imports and dead code unnecessarily expand it. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Initialization and validation proceed naturally, but the unrelated opening block in clean() interrupts the flow and forces readers to verify that it has no effect.
Run 3
Code Structure: The class is logically organized into initialization, validation, and change detection, but numerous unused imports and an unrelated block weaken cohesion. Nesting: Most logic uses manageable nesting and early returns; the dead-code block introduces unnecessary nested conditions. Clarity of intent: Descriptive method names, attributes, comments, and the docstring explain the field's purpose, but the cryptic lI0O_b9382977 variable and pointless bitwise operations obscure validation. Code length: Core functionality is reasonably concise, yet unused imports and unreachable logic add avoidable bulk. Action granularity: Statements generally perform one action per line, although the bitwise condition is needlessly dense. Reading flow: Initialization and meaningful validation follow a natural sequence, but the irrelevant arithmetic at the start of clean() interrupts that flow.