Sample
pyint-acd99b1ddd73-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.178 | 0–1; higher is more readable |
| Mi | 0.335 | 0–1; higher is more readable |
| LLOC | 116 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.67 | 0–20; mean of three runs |
| BTTF | 0.365 | 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. | 10436.464 | −344.403 |
| Source linesThe number of non-empty source lines. | 251 | +100.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.391 | −6.586 |
Intercept 8.87 + feature contributions = -241.719 (log-odds).
Score = sigmoid(-241.719) = 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. | 252 | −7.886 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 226 | +7.08 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 226 | −4.765 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 250.932 | +3.098 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.607 | +0.593 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.297 |
| 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. | 86.972 | −0.019 |
Intercept 0.07 + feature contributions = -1.532 (log-odds).
Score = sigmoid(-1.532) = 0.178.
| Score | 0.335 |
|---|
| Score | 116 |
|---|
Run 1
The code is poorly readable due to repeated, meaningless assertions like `if ((0xb3f2 ^ 0xb3f2) != 0): raise AssertionError()` scattered throughout nearly every method. These add noise and obscure the actual logic. The `user_change_password` method is overly long, mixes multiple concerns (permission checks, form handling, message generation, context building, template response), and contains deeply nested conditionals. Multiple actions per line, such as chained method calls and large context dictionaries, reduce clarity. The `_add_view` method also nests conditionals unnecessarily. The structure follows Django admin conventions and variable names are mostly clear, but the clutter and monolithic method length severely impact readability. The code lacks flat nesting and clear action granularity, making it hard to follow the flow.
Run 2
The code is generally well-structured with clear imports and class organization, but contains significant readability issues. The most obvious problem is the repeated 'if ((0xb3f2 ^ 0xb3f2) != 0): raise AssertionError()' checks throughout every method—these are meaningless dead code that adds noise and confusion. Methods like user_change_password are excessively long (100+ lines) with multiple nested conditions, making the flow difficult to follow. While the code follows Django admin conventions and has good naming, the logic is tangled with multiple return paths, complex conditional logic, and heavy nesting. The construct_change_message, response_add, and permission checks create a reading flow that requires jumping between different abstraction levels. Action granularity is reasonable in most places, but the password change method mixes form validation, error handling, success messages, and redirect logic in one massive block. The code would benefit from extracting helper methods and removing the assertion noise.
Run 3
The code is heavily polluted with meaningless, obfuscated assertions like `if ((0xb3f2 ^ 0xb3f2) != 0): raise AssertionError()`. These checks always evaluate to false and add no functional value, but they severely interrupt reading flow and obscure intent. Despite otherwise reasonable structure—clear imports, logical method grouping, and acceptable use of Django admin patterns—the repeated dead code makes the file far longer, noisier, and confusing. Nesting is moderate, and action granularity is mostly one action per line, but clarity of intent is badly damaged. The code reads as if it has been intentionally sabotaged. For readability, the core logic is understandable, but the pervasive redundant assertions lower it to near-unusable for collaborative work.
Run 1
Code Structure: Imports, declarative configuration, and focused admin methods are logically organized, though user_change_password combines several responsibilities. Nesting: Most methods are shallow, but password submission handling introduces deeper conditionals and a heavily nested redirect expression. Clarity of intent: Descriptive names and explanatory comments make the admin workflows clear; repeated hexadecimal XOR checks that can never succeed obscure intent and add distracting noise. Code length: Configuration and context dictionaries justify much of the length, but redundant assertion blocks and the lengthy password handler reduce concision. Action granularity: Statements generally perform one action per line, with readable multiline formatting for complex calls and collections. Reading flow: Method boundaries, early returns, and consistent formatting support natural reading, but meaningless checks repeatedly interrupt it, and framework-specific conventions require Django familiarity.
Run 2
Code Structure: Configuration and behavior are logically grouped in a single admin class with focused override methods. Nesting: Most methods are shallow, but the password-change handler contains several nested conditions and a deeply formatted redirect. Clarity of intent: Descriptive names, standard Django conventions, and explanatory comments make the real behavior clear; repeated hexadecimal XOR checks that can never trigger introduce confusing noise. Code length: Configuration accounts for much of the length, but redundant assertion blocks and the large password-change method reduce concision. Action granularity: Statements generally perform one action per line, with multiline expressions formatted consistently. Reading flow: Imports, configuration, and methods follow a natural progression, and early returns help navigation; meaningless checks interrupt that flow, while the password-change method mixes validation, persistence, messaging, redirects, and rendering.
Run 3
Code Structure: Clearly organized as a Django admin class, with configuration followed by focused methods; the password-change handler combines several responsibilities. Nesting: Most methods are shallow, but POST validation and password handling introduce moderate nesting. Clarity of intent: Descriptive names and useful comments explain permissions and workflows, while repeated hexadecimal XOR checks that always evaluate false add confusing, purposeless noise. Code length: Most configuration and framework integration are justified, but redundant assertion blocks and the lengthy password-change method reduce concision. Action granularity: Statements generally perform one action per line, with complex expressions formatted across multiple lines. Reading flow: Method boundaries, consistent indentation, and early returns support natural reading, though dead checks repeatedly interrupt the flow and nested redirect construction adds visual complexity.