Sample
pyint-9cdf8f70a1d7-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.018 | 0–1; higher is more readable |
| Mi | 0.598 | 0–1; higher is more readable |
| LLOC | 147 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.497 | 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. | 9022.912 | −297.756 |
| Source linesThe number of non-empty source lines. | 300 | +120 |
| 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.424 | −6.636 |
Intercept 8.87 + feature contributions = -175.522 (log-odds).
Score = sigmoid(-175.522) = 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. | 301 | −9.621 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 200 | +6.181 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 200 | −4.169 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 299.822 | +3.781 |
| 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. | 133.98 | −2.01 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 133.983 | +1.357 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.052 | +0.437 |
Intercept 0.07 + feature contributions = -3.973 (log-odds).
Score = sigmoid(-3.973) = 0.018.
| Score | 0.598 |
|---|
| Score | 147 |
|---|
Run 1
The code is generally well-structured with clear intent and good documentation. It follows a logical organization with related methods grouped together, and each method has a clear purpose. The nesting is mostly flat with readable control flow. However, there is a major readability issue in the `_find` method with the oddly obfuscated integer calculation (`lI0O_27806409`) that appears to be deliberate code obfuscation or a bug. This completely breaks the natural reading flow and clarity of intent at that point. Many methods call `iter(self)` instead of using `super().__iter__()` explicitly, which is slightly less clear. The class lacks proper handling for `CookieConflictError` (not imported or defined), making the exception flow incomplete. Some methods like `set` and `update` have good action granularity, while others could be more concise. Overall, it's readable but the obfuscated code and minor inconsistencies prevent a higher score.
Run 2
The code is generally well-structured with clear class organization, good docstrings, and consistent method patterns. However, there are notable readability issues. The `_find` method contains obfuscated dead code (`lI0O_27806409`) that is completely unnecessary and confusing. Several methods have deep nesting (3-4 levels) which impacts reading flow. The `multiple_domains` method has redundant logic and an unclear return comment. Variable naming is inconsistent (`toReturn` vs snake_case, `dictionary` vs `dict`). Some methods mix type checking, logic, and loops in ways that reduce clarity. The overall structure is logical and most methods follow the dict-like interface pattern well, but the nesting and occasional obfuscated code prevent a higher score.
Run 3
The code is largely unreadable due to several major issues. The most severe is the presence of obfuscated nonsense code in the `_find` method (`lI0O_27806409` with bitwise operations) that serves no purpose and completely obscures intent. The class is excessively long and mixes many responsibilities, though most individual methods are simple. Nesting in `_find` and `_find_no_duplicates` reaches three levels of `if` statements, hurting flatness. Reading flow is disrupted by the obfuscation and inconsistent style, such as `toReturn` violating snake_case. While some methods have clear docstrings, the overall clarity of intent is undermined by the jarring dead code. Action granularity is generally acceptable. Code length is high but not unreasonable for a compatibility layer, though the obfuscated lines add unnecessary bloat.
Run 1
Code Structure: Methods are logically organized around a cookie jar's mapping interface, lookup helpers, and serialization. Nesting: Most methods are shallow, but lookup helpers contain three to four nested conditions that could be flattened. Clarity of intent: Descriptive method names, type annotations, and docstrings generally explain purpose well; however, the meaningless lI0O_27806409 assignments obscure intent, and some docstrings do not match implementation behavior. Code length: Individual methods are mostly concise, though repetitive documentation, duplicated filtering logic, and dead assignments add unnecessary length. Action granularity: Statements generally perform one action per line; the dense conditional assignment and assignment expression require extra attention. Reading flow: Consistent formatting and small methods support natural reading, but inconsistent import placement, long suppression comments, and the abrupt obfuscated code interrupt the flow.
Run 2
Code Structure: Methods are logically separated into mapping operations, cookie lookup, and serialization, though imports are poorly grouped. Nesting: Most methods are flat, but lookup methods contain three to four nested conditions that could be combined. Clarity of intent: Descriptive method names, type annotations, and docstrings explain most behavior; the meaningless obfuscated variable in _find and the mismatch between multiple_domains' description and implementation undermine clarity. Code length: Individual methods are generally concise, but repetitive docstrings, duplicated filtering logic, and dead calculations add unnecessary length. Action granularity: Most lines perform one clear action, although the long conditional assignment in _find is difficult to parse. Reading flow: Consistent formatting and related method groupings support natural reading, while verbose type-ignore comments, inconsistent naming such as toReturn, and unexplained quote handling interrupt it.
Run 3
Code Structure: Well-organized class with focused methods and clear separation of mapping, lookup, and serialization operations. Nesting: Most methods are shallow, but lookup methods contain three to four nested conditions that could be flattened. Clarity of intent: Descriptive method names, type hints, and docstrings generally explain behavior well; however, the meaningless obfuscated assignments in _find obscure intent, and multiple_domains checks repeated domains rather than distinct domains as documented. Code length: Mostly justified by functionality, though repetitive documentation, similar iteration methods, and dead assignments add bulk. Action granularity: Generally one action per line, with an unnecessarily complex conditional assignment and a walrus expression adding local density. Reading flow: Method grouping and consistent formatting support navigation, but inconsistent naming such as toReturn, long inline comments, and threading's placement after local imports interrupt the flow.