Sample
pyint-a5608392d88f-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.102 | 0–1; higher is more readable |
| Mi | 0.583 | 0–1; higher is more readable |
| LLOC | 75 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.414 | 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. | 5682.627 | −187.527 |
| Source linesThe number of non-empty source lines. | 272 | +108.8 |
| 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.405 | −6.608 |
Intercept 8.87 + feature contributions = -76.464 (log-odds).
Score = sigmoid(-76.464) = 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. | 273 | −8.63 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 198 | +6.111 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 198 | −4.123 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 271.967 | +3.392 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 90.63 | +0.658 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.042 | +0.533 |
| 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. | 90.967 | −0.188 |
Intercept 0.07 + feature contributions = -2.177 (log-odds).
Score = sigmoid(-2.177) = 0.102.
| Score | 0.583 |
|---|
| Score | 75 |
|---|
Run 1
The code shows mixed readability. Excellent documentation and clear class structure, but suffers from several readability issues. The __init__ method has too many parameters (17+), making it difficult to understand the full interface at a glance. Obscure variable names like 'lI0O_db4a4e62' with meaningless computations are confusing and unclear in intent. The use of bound_setattr is repetitive - multiple sequential assignments could be more concise or extracted to a helper method. While methods are generally well-organized and single-purpose, the from_counting_attr method has complex conditional logic that could be clearer. Positives include flat nesting, good comments explaining non-obvious behavior, and logical section organization. The evolve method has a confusing elif clause with nested conditions. Overall, the code is maintainable but requires effort to understand certain sections, particularly initialization logic and the evolution of attributes.
Run 2
The code exhibits mixed readability. The class structure is logical with clear separation of concerns and comprehensive docstrings, but several issues detract from readability. The __init__ method has an excessive number of parameters with cryptic names like 'cmp' and 'eq_key'. The obfuscated variable 'lI0O_db4a4e62' with meaningless boolean operations is deeply problematic—it serves no purpose and actively harms readability. The use of bound_setattr for attribute assignment adds unnecessary indirection, making simple assignments harder to follow. Nesting is generally flat, and action granularity is acceptable. The from_counting_attr and evolve methods have reasonable clarity, though the conditional logic in evolve could be clearer. The imports are well-organized but some are unused. The code's length is justified given the complexity, but parameter-heavy methods and obfuscated code significantly reduce natural reading flow. Without the obfuscation and with more descriptive parameter names or configuration objects, this could be a 15-16.
Run 3
The code has good structure with clear class design, docstrings, and logical organization, but readability is severely damaged by obfuscated artifacts. The variable 'lI0O_db4a4e62' with bitwise operations appears to be injected junk code with no purpose, making intent ambiguous. The __init__ method uses indirect 'bound_setattr' calls for every attribute assignment, adding unnecessary indirection and breaking natural reading flow. Multiple actions are packed into single expressions (e.g., the metadata MappingProxyType conditional, alias_is_default logic), reducing action granularity. Long conditional chains and type-checking comments ('XXX: unused') add confusion. While the class structure itself is sound, these issues make the code unnecessarily hard to follow.
Run 1
Code Structure: Methods are logically grouped within a single class, with initialization, copying, and serialization clearly separated. Nesting: Control flow is mostly flat, with only shallow conditionals and loops. Clarity of intent: Descriptive method names, docstrings, and explanatory comments clarify behavior, but meaningless lI0O_db4a4e62 assignments, internal dependencies, and lengthy positional constructor calls obscure intent. Code length: Extensive documentation is useful, but repeated field assignments and irrelevant imports add bulk. Action granularity: Statements generally perform one action each; multiline expressions remain reasonably readable. Reading flow: Consistent formatting and method boundaries support natural reading, though compatibility logic, descriptor-based assignment, and awkwardly wrapped expressions require extra attention.
Run 2
Code Structure: Methods are logically separated into initialization, conversion, copying, and serialization, with useful documentation. Nesting: Generally shallow; conditional expressions and multiline calls introduce only moderate complexity. Clarity of intent: Descriptive method names and comments explain immutability and compatibility handling, but the meaningless lI0O_db4a4e62 assignments, abbreviated ca, and internal dependencies obscure some intent. Code length: Mostly justified, although extensive documentation, repetitive field assignments, and apparently unused imports add bulk. Action granularity: Most statements perform one action; tuple unpacking and conditional expressions are reasonably contained. Reading flow: Consistent formatting and cohesive methods support natural reading, but the long positional constructor call requires matching arguments manually, slot-order coupling increases cognitive load, and awkwardly wrapped serialization logic interrupts the flow.
Run 3
Code Structure: Methods separate initialization, conversion, copying, and serialization logically, though initialization depends on slot ordering and a long positional constructor call. Nesting: Mostly shallow, with only modest conditional nesting in attribute updates. Clarity of intent: Descriptive method names, docstrings, and comments explain the immutable attribute model; however, the meaningless obfuscated variable, legacy cmp parameter, and external helpers obscure parts of the implementation. Code length: Generally justified by the functionality, but extensive documentation, repetitive assignments, and unused-looking imports add bulk. Action granularity: Statements usually perform one action per line, supporting easy scanning. Reading flow: Method organization is natural, but long parameter lists, positional argument mapping, and awkward wrapping in serialization logic interrupt comprehension.