Sample
pyint-c47af8d8b709-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.018 | 0–1; higher is more readable |
| Dorn | 0.579 | 0–1; higher is more readable |
| Mi | 0.679 | 0–1; higher is more readable |
| LLOC | 12 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 4.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs |
| BTTF | 0.218 | 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. | 359.452 | −11.862 |
| 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.666 | −6.998 |
| Source linesThe number of non-empty source lines. | 15 | +6 |
Intercept 8.87 + feature contributions = -3.99 (log-odds).
Score = sigmoid(-3.99) = 0.018.
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. | 66.938 | +0.83 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 15 | +0.505 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 15 | −0.218 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 14.779 | −0.203 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 15 | +0.077 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.091 | +0.061 |
Intercept 0.07 + feature contributions = 0.317 (log-odds).
Score = sigmoid(0.317) = 0.579.
| Score | 0.679 |
|---|
| Score | 12 |
|---|
Run 1
The code is short but confusing. It mixes two similar libraries (attr and attrs), uses a class decorator with auto_detect=True, and adds dead, obfuscated lines (bitwise operations that reduce to zero) inside __init__. The intent is unclear and the structure is poor. Nesting is flat, length is small, but clarity and action granularity suffer due to redundant and misleading code. The cryptic variable name signals obfuscation.
Run 2
The code is highly unreadable due to obfuscated variable naming, dead code, and misleading structure. The class AutoDetect is decorated with auto_detect=True yet defines a manual __init__, which is contradictory and unclear. The __init__ contains meaningless operations: a variable named lI0O_dcc73efd is assigned a hex value, shifted, XORed, then zeroed with &= 0, serving no purpose. This introduces confusion and suggests either intentional obfuscation or poor coding. Nesting is minimal, but action granularity is poor—multiple unrelated operations are crammed together. Reading flow is unnatural, and intent is completely obscured. Even the imports include both 'attr' and 'attrs' with no apparent reason. Code length is short, but that does not compensate for the complete lack of clarity. Overall, the code violates almost every readability criterion and appears deliberately obfuscated.
Run 3
The code is difficult to read and understand. Structure is minimal but cluttered. Nesting is flat, but that's the only positive. Clarity of intent is absent: the variables `lI0O_dcc73efd` are obfuscated and meaningless, and the operations (bit shifts, XOR, AND with 0) have no apparent purpose. Code length is short, but it includes unnecessary complexity. Action granularity is reasonable: one assignment per line, but each line is cryptic. Reading flow is natural (top to bottom), but the content is confusing. Overall, this code appears intentionally obfuscated, which severely hurts readability despite its simple structure.
Run 1
Code Structure: The class and constructor are logically organized, but unused imports and irrelevant calculations add clutter. Nesting: The code is flat and easy to navigate. Clarity of intent: Assigning x is clear, but the opaque variable name and pointless bitwise operations obscure the constructor's purpose. Code length: Short overall, yet unnecessarily long for simply initializing one attribute. Action granularity: Each line contains one assignment or operation, making individual steps easy to distinguish. Reading flow: The conventional class layout helps, but unrelated calculations interrupt the natural progression to self.x = x.
Run 2
Code Structure: The class and initializer are logically organized, but unrelated calculations and unused imports add clutter. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The typed field and self.x assignment are clear, but the cryptic variable name and calculations obscure an otherwise simple initializer. Code length: Short overall, yet unnecessarily long for assigning one attribute. Action granularity: Each statement occupies its own line, supporting readability. Reading flow: Conventional imports and class layout help, but meaningless bitwise operations interrupt the natural progression to initialization.
Run 3
Code Structure: The class and initializer are logically organized, but unused imports and irrelevant calculations add clutter. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Assigning x is clear, but the cryptic variable name and hexadecimal bit manipulation obscure the initializer's purpose. Code length: Short overall, yet three statements perform unnecessary work on a local variable that is never used. Action granularity: Each statement occupies its own line, although the bitwise expression combines several operations. Reading flow: The standard class layout is familiar, but unrelated calculations interrupt the direct flow from initialization to self.x assignment.