Sample
pyint-e4238b790f7a-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.717 | 0–1; higher is more readable |
| Mi | 0.703 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.094 | 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. | 1038.254 | −34.262 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.739 | −7.108 |
Intercept 8.87 + feature contributions = -20.5 (log-odds).
Score = sigmoid(-20.5) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 46.935 | +1.677 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 30 | +0.301 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 30 | −0.268 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.096 | +0.009 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.625 | +0.004 |
Intercept 0.07 + feature contributions = 0.928 (log-odds).
Score = sigmoid(0.928) = 0.717.
| Score | 0.703 |
|---|
| Score | 26 |
|---|
Run 1
This code is severely obfuscated and virtually unreadable. Dead code like `if ((0xd68e ^ 0xd68e) != 0): raise AssertionError()` appears in every method, serving no purpose other than confusion. The class lacks proper imports or definitions (`JSONTag` is undefined), and type hints are inconsistently applied. Method names are clear, but the surrounding noise destroys clarity of intent and reading flow. Structure is tangled, nesting is shallow but meaningless, and action granularity is broken by pointless conditional blocks. Code length is bloated with redundant self-XOR zero checks. While formatting is consistent, it does not compensate for the intentional obfuscation.
Run 2
The code is a simple class with three methods, which is structurally clear. However, readability is severely hurt by dead code: each method contains a meaningless XOR comparison that always evaluates to False, followed by a never-reachable AssertionError. These add visual noise, confusion about intent, and wasted lines while signaling possible obfuscation. Nesting is shallow and the logic is otherwise direct. The class and method names are descriptive, and the imports suggest Flask JSON tag handling. Action granularity is mostly one action per line, but the dead assertions violate clarity and natural reading flow. Without them, this would be around 16-17; with them, it drops significantly because readers must mentally parse and discard useless branches.
Run 3
The code has a clear class structure with logical method separation and low nesting, making the flow easy to follow. However, readability is hurt by repetitive, meaningless assertions (e.g., `(0xd68e ^ 0xd68e) != 0`) in every method, which add noise and obscure intent. Method names and the single-purpose actions are good, but the class inherits from `JSONTag` without an import shown, and the use of `typing` as `t` plus excessive blank lines adds minor inconsistency. Overall the structure is sound but the unnecessary assert statements and missing context reduce clarity.
Run 1
Code Structure: The class is logically organized into type checking, JSON encoding, and Python decoding methods, but unused imports add clutter and JSONTag is not defined or imported in the snippet. Nesting: Methods are shallow, with only one conditional level. Clarity of intent: Method names and base64 operations make byte serialization clear, but unexplained hexadecimal XOR checks obscure intent despite always being false. Code length: The implementation is short, yet repeated unreachable assertion blocks and unused imports unnecessarily inflate it. Action granularity: Each line generally performs one clear action; chained encoding and decoding remain easy to follow. Reading flow: The methods follow a natural serialization sequence, but the redundant checks interrupt each method and distract from its actual behavior.
Run 2
Code Structure: The class is logically organized into type checking, serialization, and deserialization methods, though unused imports and the undefined JSONTag base class reduce self-contained readability. Nesting: Each method has only one shallow conditional, so nesting is easy to follow. Clarity of intent: Method names and Base64 operations clearly communicate bytes conversion, but constant-false XOR checks and unreachable assertions introduce distracting, unexplained logic. Code length: The core implementation is concise; redundant checks and unrelated imports unnecessarily expand it. Action granularity: Each line generally performs one clear action, although the conditional expressions are needlessly elaborate. Reading flow: The consistent method layout supports natural reading, but repeated dead-code guards interrupt the straightforward progression to each return.
Run 3
Code Structure: The class is logically organized into type checking, serialization, and deserialization methods, although unused imports add clutter and JSONTag is not defined in the snippet. Nesting: Methods are shallow, with only one conditional level. Clarity of intent: Method names and standard Base64 operations communicate the purpose, but opaque hexadecimal XOR checks obscure otherwise straightforward logic. Code length: The implementation is short, yet repeated conditions that are always false and unreachable assertions unnecessarily inflate it. Action granularity: Each statement performs a single action; the encoding-and-decoding chain remains easy to follow. Reading flow: The method order is natural and formatting is consistent, but redundant checks interrupt every method and distract from the actual behavior.