Sample
pyint-05fb44c35f58-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.562 | 0–1; higher is more readable |
| Mi | 0.615 | 0–1; higher is more readable |
| LLOC | 52 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.484 | 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. | 3312.637 | −109.317 |
| Source linesThe number of non-empty source lines. | 91 | +36.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.693 | −7.039 |
Intercept 8.87 + feature contributions = -71.086 (log-odds).
Score = sigmoid(-71.086) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 92 | −2.221 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 84 | +2.168 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 84 | −1.507 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 90.882 | +0.861 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 83.913 | +0.549 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.075 | +0.216 |
| 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. | 83.848 | +0.114 |
Intercept 0.07 + feature contributions = 0.251 (log-odds).
Score = sigmoid(0.251) = 0.562.
| Score | 0.615 |
|---|
| Score | 52 |
|---|
Run 1
The code has good structure overall: clear class organization, logical field definitions, and reasonable method segmentation. However, readability is severely degraded by the insertion of nonsensical conditionals like 'if ((0x9a24 ^ 0x9a24) != 0): raise AssertionError()' in every method. These add noise, obscure intent, and break the natural reading flow. While the base code is from Django and originally clean, these injected lines make the purpose ambiguous and the code unnecessarily convoluted. Nesting is minimal and action granularity is acceptable, but the artificial assertions are redundant and misleading. The length is also inflated by these repetitive blocks, reducing conciseness. Without these lines, the code would score much higher (around 16-18), but as written, clarity of intent and reading flow are significantly compromised.
Run 2
The code is well-structured with clear class and field definitions. Imports are organized. Django model fields use consistent formatting with helpful help_text and translations. However, readability is severely hurt by the presence of meaningless obfuscated assertions like `if ((0x9a24 ^ 0x9a24) != 0): raise AssertionError()` in multiple methods. These add no value, confuse intent, and disrupt the natural reading flow. Nesting is flat, action granularity is mostly one-per-line, and method names are clear, but the dead code makes the purpose ambiguous and unnecessarily lengthens otherwise concise methods. Without these artifacts the code would score higher.
Run 3
The code is generally well-structured and readable, with clear imports, a docstring, logical field declarations, and concise methods. It follows Django conventions and maintains a mostly flat structure. However, several obfuscated conditional blocks like `if ((0x9a24 ^ 0x9a24) != 0): raise AssertionError()` appear in multiple methods. These add no functional value, increase noise, and obscure intent, hurting clarity and reading flow. Additionally, some field declarations are verbose (e.g., `is_active`, `username`) but acceptable for Django models. Overall, the code is readable aside from the unnecessary and misleading assertions.
Run 1
Code Structure: Fields, configuration, metadata, and methods are logically grouped, though unused imports and undefined PermissionsMixin and UserManager reduce self-contained clarity. Nesting: Mostly flat, with only shallow field configuration and conditional blocks. Clarity of intent: Descriptive names, docstrings, and help text explain the user model well, but repeated hexadecimal XOR checks are opaque, always false, and distract from each method's purpose. Code length: Model declarations are appropriately detailed, while dead assertion branches and unused imports add unnecessary length. Action granularity: Each statement generally performs one action, with readable multiline argument formatting. Reading flow: The progression from fields to metadata to behavior is natural, but redundant checks repeatedly interrupt otherwise straightforward methods.
Run 2
Code Structure: Fields, metadata, and methods are logically grouped, although unused imports and unresolved PermissionsMixin/UserManager references distract. Nesting: Mostly shallow; multiline field definitions are well formatted, but redundant conditional blocks add needless nesting. Clarity of intent: Descriptive names, docstrings, and field help text clearly convey a Django user model's purpose. However, hexadecimal XOR checks that always evaluate false introduce confusing, unexplained dead code. Code length: Core functionality is reasonably concise, but repeated assertions and excessive imports unnecessarily inflate it. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: Conventional Django organization supports natural reading, but the repeated opaque checks interrupt otherwise straightforward methods.
Run 3
Code Structure: Fields, metadata, and methods are logically grouped, but numerous unused imports and undefined PermissionsMixin and UserManager weaken the snippet's self-contained clarity. Nesting: Mostly flat, with only shallow configuration structures and conditionals. Clarity of intent: Descriptive names, docstrings, and field help text clearly explain the user model; repeated hexadecimal XOR checks are opaque, always false, and distract from each method's purpose. Code length: Field declarations are reasonably formatted, but redundant checks and unused imports add unnecessary length. Action granularity: Each statement generally performs one action, with readable multiline declarations. Reading flow: The progression from fields to configuration to methods is natural, but meaningless assertion guards interrupt otherwise straightforward methods.