Sample
pyint-962df57486fe-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.185 | 0–1; higher is more readable |
| Mi | 0.738 | 0–1; higher is more readable |
| LLOC | 60 | 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.403 | 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. | 4045.478 | −133.501 |
| Source linesThe number of non-empty source lines. | 197 | +78.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.105 | −6.158 |
Intercept 8.87 + feature contributions = -51.989 (log-odds).
Score = sigmoid(-51.989) = 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. | 198 | −5.974 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 170 | +5.143 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 170 | −3.48 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 196.964 | +2.343 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 108.98 | +0.954 |
| 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. | 108.975 | −0.951 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.055 | +0.41 |
Intercept 0.07 + feature contributions = -1.485 (log-odds).
Score = sigmoid(-1.485) = 0.185.
| Score | 0.738 |
|---|
| Score | 60 |
|---|
Run 1
The code has some strong organizational elements: clear imports, a well-documented internal class, __slots__ usage, and mostly flat, naturally flowing methods with explicit parameters. However, several issues reduce readability. The __attrs_attrs__ definition is overly complex with a long generator expression and a massive Attribute() constructor call, making intent difficult to discern. Many parameters like 'cmp', 'eq', 'hash', 'repr' are terse and assume domain knowledge. The __init__ method has a very long parameter list, which hurts clarity. The 'default' method contains an obfuscated, meaningless variable (lI0O_91dbb315) that serves no purpose and severely damages readability. Method docstrings are helpful but inconsistent (some methods lack detailed parameter descriptions). Mixed abstraction levels appear: simple decorator logic sits beside highly detailed internal attribute definitions. Overall, the code is readable in short method bodies but suffers from dense, opaque sections and one deliberately confusing artifact.
Run 2
The code is generally organized with clear class structure and docstrings, but has significant readability issues. The __attrs_attrs__ definition uses a complex, deeply nested tuple/generator expression that is hard to follow. The __init__ method has too many parameters (15+) making it difficult to understand. A suspicious obfuscated line (lI0O_91dbb315 assignment) appears to be either a decompilation artifact or deliberate obfuscation, which severely harms clarity. Some variable names like 'cmp' and 'repr' shadow builtins, reducing clarity. The reading flow is disrupted by inconsistent formatting and long parameter lists. However, the use of __slots__, docstrings, and clear method boundaries help maintain some readability. Overall, the code could benefit from refactoring the complex expressions, removing obfuscation, and improving naming.
Run 3
The code demonstrates mixed readability. The class structure and constructor are relatively clear, with descriptive parameter names and docstrings present. However, several issues significantly reduce readability. The `__attrs_attrs__` tuple contains a deeply nested, repetitive constructor call for `Attribute`, creating excessive boilerplate that obscures intent. The `default()` method includes an obfuscated, meaningless variable (`lI0O_91dbb315`) with confusing bitwise operations that serves no purpose and severely harms clarity. Some methods like `validator()` and `converter()` are straightforward, but the overall file is long and includes many parameters, making comprehension difficult. Nesting in the `Attribute` generation is deep and hard to follow. The mix of clear docstrings with obfuscated code creates inconsistency.
Run 1
1. Code Structure: The class is logically organized into metadata, initialization, and decorator methods, although the large attribute declaration is cumbersome. 2. Nesting: Most methods are flat, with simple conditional branches; the nested conditional expression in default() is an unnecessary exception. 3. Clarity of intent: Descriptive method names and docstrings explain the main behavior well, but the opaque lI0O_91dbb315 variable and meaningless bitwise calculations obscure intent. External helpers require context. 4. Code length: Repetitive attribute configuration and a lengthy constructor increase reading effort; the unused calculations add avoidable noise. 5. Action granularity: Statements generally perform one action per line, but the dense conditional assignment combines several operations. 6. Reading flow: Formatting and consistent method organization support natural reading, interrupted by the obfuscated statements and verbose metadata setup.
Run 2
Code Structure: The class is logically organized into attribute declarations, initialization, and focused decorator methods. Nesting: Most code is flat, with simple conditionals; the attribute-generation expression and nested conditional expression add complexity. Clarity of intent: Descriptive method names and docstrings explain the main behavior, but the meaningless lI0O_91dbb315 assignments obscure intent and distract from default handling. Code length: Extensive attribute configuration and initialization are somewhat repetitive, and many imports are unused in this excerpt. Action granularity: Most lines perform one clear assignment or operation; the obfuscated conditional expression packs unnecessary logic into one line. Reading flow: Consistent formatting and straightforward methods support natural reading, although lengthy declarations delay the behavioral code and the unrelated assignments interrupt it.
Run 3
Code Structure: The class is logically organized into attribute declarations, initialization, and focused decorator methods. Nesting: Control flow is shallow, although the attribute-building comprehension and injected conditional expression add complexity. Clarity of intent: Descriptive method names and docstrings explain the purpose well; the meaningless lI0O_91dbb315 variable and bitwise operations obscure the default method. Code length: Repeated Attribute arguments, extensive initialization, and numerous imports make the excerpt verbose, while the injected statements are entirely unnecessary. Action granularity: Most lines perform one assignment or operation, but the long conditional expression combines several operations. Reading flow: Consistent formatting and method organization support natural reading, interrupted by the obfuscated statements and references to helpers defined outside the excerpt.