Sample
pyint-25a1bf88b3ab-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.762 | 0–1; higher is more readable |
| Mi | 0.359 | 0–1; higher is more readable |
| LLOC | 19 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs |
| BTTF | 0.39 | 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. | 720.458 | −23.775 |
| Source linesThe number of non-empty source lines. | 29 | +11.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.568 | −6.853 |
Intercept 8.87 + feature contributions = -10.158 (log-odds).
Score = sigmoid(-10.158) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.041 | +0.541 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 77.6 | +0.448 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 26 | −0.176 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 26 | +0.162 |
| 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 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.929 | −0.005 |
Intercept 0.07 + feature contributions = 1.166 (log-odds).
Score = sigmoid(1.166) = 0.762.
| Score | 0.359 |
|---|
| Score | 19 |
|---|
Run 1
The code is fairly readable with clear class documentation explaining its purpose. It uses descriptive naming (NullSession, _fail) and proper type hints. However, some issues reduce clarity: the bizarre dead condition `if ((0x2bf2 ^ 0x2bf2) != 0):` is confusing and should be removed; multiple assignments on one line (`__setitem__ = __delitem__ = ... = _fail`) compress several actions into a single statement, reducing granularity; the `del _fail` line is cryptic without context; and the class inherits from `SecureCookieSession` which isn't imported in the snippet, making the code incomplete. Several imports appear unused (`hashlib`, `datetime`, `timezone`, `BadSignature`, `URLSafeTimedSerializer`) which adds noise. The logic is flat and the flow is coherent, but the unexplained obfuscated condition and the multi-method aliasing line hurt readability.
Run 2
The code is relatively short and each method assignment is on one line, which aids action granularity. However, readability suffers from several issues: the class inherits from SecureCookieSession without an import visible in the snippet, creating ambiguity. The unnecessary XOR check in _fail is confusing and misleading. Multiple method assignments chained on a single line reduce clarity, as each assignment is not clearly separated. The 'del _fail' statement is unusual and may obscure intent. The docstring is helpful but overall the code mixes clear structure with puzzling constructs, leading to moderate readability.
Run 3
The code is moderately readable but has some notable issues. The class structure is logical with a clear docstring explaining purpose, and the error message is descriptive. However, there is a suspicious dead code segment (`if ((0x2bf2 ^ 0x2bf2) != 0):`) that adds confusion and unnecessary nesting. The method `_fail` is well-named and its intent is clear, but the multiple assignment of `_fail` to many methods on one line reduces clarity and action granularity. The `del _fail` line is also confusing without context. Overall, the code is concise but could be clearer with better separation of concerns and removal of the odd conditional check.
Run 1
Code Structure: The small class logically groups session mutation failures, although numerous unused imports and an undefined base class in the snippet distract. Nesting: Shallow, with only one conditional inside the method. Clarity of intent: The docstring and RuntimeError clearly explain read-only behavior, but the hexadecimal XOR condition is always false and unnecessarily obscures intent. Code length: Mostly concise, though the dead conditional and unused imports add noise. Action granularity: Most lines perform one action, but assigning seven mutation methods in one chained statement reduces scanability. Reading flow: The progression from documentation to failure handler to method aliases is natural; deleting the helper and the unexplained dead assertion interrupt that flow.
Run 2
Code Structure: The class is logically organized, but numerous unused imports and an undefined-in-snippet base class add clutter and context dependence. Nesting: Minimal nesting makes the method easy to follow. Clarity of intent: The docstring and RuntimeError clearly explain why session mutations fail, but the hexadecimal XOR condition is opaque, always false, and distracts from that purpose. Code length: The class is concise, although the dead assertion branch and unused imports are unnecessary. Action granularity: Most lines express a single action; the long chained assignment binds seven mutation methods at once, requiring extra interpretation. Reading flow: The progression from documentation to error handler to method bindings is natural, but the irrelevant condition and deletion of the helper interrupt straightforward reading.
Run 3
Code Structure: The class is logically organized, but numerous unused imports and an undefined base class in the snippet add clutter. Nesting: Shallow nesting makes the methods easy to follow. Clarity of intent: The docstring and RuntimeError clearly explain the read-only session behavior, while the hexadecimal XOR condition is opaque, always false, and unnecessary. Code length: The implementation is compact, though imports and dead code inflate it. Action granularity: Most lines contain one action, but assigning seven mutation methods to _fail in a single statement reduces scanability. Reading flow: The progression from documentation to failure handler to method aliases is natural, but the dead assertion branch and deletion of _fail interrupt straightforward reading.