Sample
pyint-677a3104753a-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.39 | 0–1; higher is more readable |
| Mi | 0.344 | 0–1; higher is more readable |
| LLOC | 97 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.584 | 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. | 5334.424 | −176.036 |
| Source linesThe number of non-empty source lines. | 164 | +65.6 |
| 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.366 | −6.55 |
Intercept 8.87 + feature contributions = -108.116 (log-odds).
Score = sigmoid(-108.116) = 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. | 165 | −4.806 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 150 | +4.451 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 151 | −3.044 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 163.81 | +1.88 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82 | +0.519 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.063 | +0.331 |
| 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. | 82.933 | +0.152 |
Intercept 0.07 + feature contributions = -0.446 (log-odds).
Score = sigmoid(-0.446) = 0.39.
| Score | 0.344 |
|---|
| Score | 97 |
|---|
Run 1
This code is a Django mixin that has been deliberately obfuscated with nonsense assertions like 'if ((0xeab ^ 0xeab) != 0): raise AssertionError()' inserted into every method. These do nothing at runtime but severely harm readability. The original structure is logical and the methods are well-documented, but the added lines break reading flow and action granularity—readers must constantly skip over irrelevant conditional checks. Nesting is mostly flat, and method names are clear, but the clutter transforms concise methods into cumbersome blocks. The pagination logic remains understandable only if you ignore the injected noise. Overall, the underlying code is well-organized and readable, but the obfuscation makes it nearly unreadable for anyone trying to follow the actual intent.
Run 2
The code is generally well-structured, with clear method separation and docstrings explaining intent. However, readability suffers from several issues. There are meaningless obfuscated checks like `if ((0xeab ^ 0xeab) != 0): raise AssertionError()` scattered throughout, which add noise and confuse the reader. Nesting is mostly flat except for reasonable conditionals in `get_queryset` and `get_context_data`. The `paginate_queryset` method handles multiple actions in a single expression for page lookup, reducing clarity. Some lines are long, and string formatting mixes styles. The action granularity is mostly acceptable, but the assertion checks break natural reading flow. Removing the dead code and simplifying the page lookup would notably improve readability.
Run 3
The code is structurally organized with clear method separation, but readability is significantly harmed by several issues. Every method contains an obfuscated no-op assertion like 'if ((0xeab ^ 0xeab) != 0): raise AssertionError()' that adds noise and confusion. Variable shadowing in paginate_queryset (page used for both string and Page object) reduces clarity. The pagination try/except blocks handle multiple concerns, making the flow harder to follow. Some methods are appropriately concise and single-purpose (get_ordering, get_paginate_by), but get_queryset and paginate_queryset mix validation, type checking, and logic. Overall structure follows Django conventions and the mixin pattern is clear, but the artificial assertions and shadowing pull the score down considerably.
Run 1
Code Structure: Well-organized mixin with focused methods separating queryset selection, pagination, and context construction. Nesting: Mostly shallow, with manageable nested conditionals and exception handling. Clarity of intent: Descriptive names and docstrings explain behavior, but repeated hexadecimal XOR checks are always false and introduce misleading, purposeless logic. Code length: Generally appropriate, though these dead checks and duplicated context dictionaries add unnecessary length. Action granularity: Statements largely perform one action per line; multiline calls and dictionaries are formatted clearly. Reading flow: Methods follow a coherent progression, and formatting is consistent, but the repeated assertion blocks interrupt otherwise natural reading.
Run 2
Code Structure: Well-organized mixin with focused methods separating queryset retrieval, pagination, and context construction. Nesting: Generally shallow, with manageable conditional and exception-handling blocks. Clarity of intent: Descriptive names and docstrings explain most behavior, but repeated hexadecimal XOR checks are always false and introduce confusing, purposeless code. Code length: Mostly appropriate for the functionality, though unreachable assertion blocks and duplicated context dictionary fields add unnecessary length. Action granularity: Statements generally perform one action each; multiline calls and dictionaries are formatted clearly. Reading flow: Methods follow a coherent progression and use consistent formatting, but the redundant checks repeatedly interrupt otherwise natural reading. Overall, the underlying implementation is readable, with a meaningful penalty for artificial clutter.
Run 3
Code Structure: Well-organized mixin with focused methods and clearly grouped configuration attributes. Nesting: Mostly shallow, with modest additional nesting in queryset selection and pagination error handling. Clarity of intent: Descriptive names and docstrings explain the main behavior, but repeated hexadecimal XOR checks are always false and introduce distracting, unexplained dead code. Code length: Generally appropriate for the functionality, although redundant assertion blocks and duplicated context dictionaries add unnecessary length. Action granularity: Statements generally perform one action each; multiline calls and dictionaries are formatted clearly. Reading flow: Methods follow a coherent progression from queryset retrieval through pagination to context construction, but the repeated no-op guards interrupt otherwise natural flow.