Sample
pyint-2dc03acb8d01-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.681 | 0–1; higher is more readable |
| Mi | 0.688 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 2.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.358 | 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. | 945.102 | −31.188 |
| 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.894 | −7.341 |
Intercept 8.87 + feature contributions = -18.059 (log-odds).
Score = sigmoid(-18.059) = 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. | 54.933 | +1.338 |
| 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. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.08 | +0.163 |
| 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.875 | −0.006 |
Intercept 0.07 + feature contributions = 0.757 (log-odds).
Score = sigmoid(0.757) = 0.681.
| Score | 0.688 |
|---|
| Score | 25 |
|---|
Run 1
The code contains obfuscated variables (lI0O_4ce1b04b, lI0O_c973eddd) with meaningless names and a pointless loop that performs no useful function, severely damaging clarity of intent. The structure has a mix of imports but lacks coherent organization. The to_json method includes multiple unclear operations that obscure the actual base64 encoding purpose. The while loop adds unnecessary complexity and confusion. Action granularity is violated in to_json with multiple unrelated statements. Reading flow is disrupted by the nonsensical loop. Only the class methods check and to_python are somewhat readable, but they are surrounded by confusing code. Overall, this code is extremely difficult to understand and maintain, scoring near the bottom of the readability scale.
Run 2
The code has severe readability issues. The class structure is simple but the methods contain obfuscated logic—particularly in to_json, where two meaningless loop variables (lI0O_4ce1b04b, lI0O_c973eddd) perform a pointless bitwise operation that accomplishes nothing before encoding. Variable names give no indication of purpose. The nesting is minimal but the intent is completely obscured. Action granularity is inconsistent, with multiple statements crammed into loop bodies and line breaks where a single-line expression would suffice. The reading flow is disrupted by the nonsensical loop. While the class itself is short and flat, the lack of clarity and deliberate obfuscation make it nearly unreadable despite being concise.
Run 3
The code has several readability issues. The class structure is clear but the to_json method contains obfuscated variable names (lI0O_4ce1b04b, lI0O_c973eddd) and pointless operations that make intent unclear. There's unnecessary dead code - a loop that XORs values but results in 0, and a self-XOR operation. The nesting is flat, which is good, but the action granularity is poor with meaningless multi-step operations. The reading flow is disrupted by these confusing elements. While the base64 encode/decode logic is simple, the obfuscated dead code makes it hard to understand what the method actually does at a glance.
Run 1
Code Structure: Imports and a focused class with three small methods provide logical organization, but an unrelated computation disrupts serialization. Nesting: Shallow, with only one loop. Clarity of intent: Type annotations, method names, and Base64 calls clearly convey bytes conversion; cryptic variable names and unused calculations obscure to_json. Code length: Mostly concise, but the loop and bitwise operations add unnecessary lines without affecting the result. Action granularity: Most lines perform one action, although the tuple assignment initializes two variables together. Reading flow: check, to_json, and to_python follow a natural sequence, but the irrelevant loop interrupts the straightforward encoding path. JSONTag is not defined or imported in the excerpt, leaving some context unclear.
Run 2
Code Structure: Imports and class methods are logically organized, but unrelated computations clutter to_json. Nesting: Shallow, with only one simple loop. Clarity of intent: check and to_python clearly express their purpose, and the final encoding expression is straightforward; opaque variable names and a meaningless loop obscure to_json. Code length: Otherwise concise, but several unnecessary lines inflate a simple conversion. Action granularity: Most lines perform one action, although the tuple assignment initializes two variables and the bitwise expression combines several operations. Reading flow: Method boundaries and type hints help navigation, but the irrelevant arithmetic interrupts the natural check/encode/decode flow. JSONTag is not defined or imported in the excerpt, leaving its origin unclear.
Run 3
Code Structure: Imports and a small class with clearly separated methods provide logical organization, but irrelevant computation disrupts to_json. Nesting: Only one shallow loop keeps nesting manageable. Clarity of intent: Method names and base64 operations make byte serialization recognizable, while cryptic variable names and unused calculations obscure the encoding method's purpose. Code length: Most code is concise, but the loop and XOR operations add unnecessary length without affecting the returned result. Action granularity: Statements generally perform one action per line, although the paired initialization combines assignments and the XOR expression is needlessly complex. Reading flow: The check, serialization, and deserialization sequence is natural, but the inserted computation interrupts an otherwise straightforward flow.