Sample
pyint-881ac436fade-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.955 | 0–1; higher is more readable |
| Dorn | 0.271 | 0–1; higher is more readable |
| Mi | 0.77 | 0–1; higher is more readable |
| LLOC | 60 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.67 | 0–20; mean of three runs |
| BTTF | 0.566 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 194 | +77.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 2321.797 | −76.619 |
| 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.532 | −6.798 |
Intercept 8.87 + feature contributions = 3.053 (log-odds).
Score = sigmoid(3.053) = 0.955.
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. | 195 | −5.868 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 119 | +3.379 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 119 | −2.31 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 193.976 | +2.302 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.024 | +0.709 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 79.359 | +0.476 |
| 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. | 80.579 | +0.252 |
Intercept 0.07 + feature contributions = -0.99 (log-odds).
Score = sigmoid(-0.99) = 0.271.
| Score | 0.77 |
|---|
| Score | 60 |
|---|
Run 1
The code is generally well-structured with clear class organization, comprehensive docstrings, and logical attribute grouping. However, readability suffers in several areas: the __init__ method has 17 parameters with repetitive assignment lines, creating unnecessary verbosity. The is_hashable property contains obfuscated dead code (variable lI0O_c3f740b9 with meaningless bitwise operations that have no effect), which severely hurts clarity of intent and appears to be intentionally confusing or leftover debug code. The flat nesting is good, with no deep indentation issues. Action granularity is mostly one action per line, which is positive. The docstrings are thorough and helpful for understanding the ClassProps purpose. The enum definitions nested within the class are clear and well-documented. Overall, the code would be much more readable without the obfuscated property implementation and with a more concise initialization pattern.
Run 2
The code is generally well-structured and readable despite its length. The class documentation is excellent, clearly explaining the purpose and attributes. The nested enums and __slots__ declaration show intentional organization. However, a bizarre obfuscated expression in the is_hashable property (lI0O_c3f740b9 with XOR/OR operations) severely hurts readability—it appears to be dead code or accidentally included. The __init__ method is long but straightforward, with one assignment per line and clear parameter-to-attribute mapping. Imports are organized alphabetically. The deeply nested enum classes within ClassProps add visual nesting but are logically grouped. Overall, the code follows consistent patterns, has minimal control flow, and avoids complex nesting, but the mysterious obfuscated line and repetitive __init__ boilerplate prevent a higher readability score.
Run 3
The code is generally well-structured and readable, with clear class documentation, logical organization, and consistent formatting. The docstrings are informative and the use of enums and slots is clean. However, there is a significant readability issue in the `is_hashable` property, which contains obfuscated variable names and meaningless bitwise operations that serve no apparent purpose, breaking the clarity of intent. Additionally, the class has many attributes (16), making it somewhat long but still manageable. The nesting is minimal, and the reading flow is mostly natural except for that anomalous property. Overall, the code demonstrates good practices but is marred by the unexplained, confusing segment.
Run 1
1. Code Structure: Imports, documented enums, slots, initialization, and the property are logically organized. However, the property contains unrelated obfuscated code. 2. Nesting: Generally shallow; nested enums are appropriate, but the property's conditional is unnecessary. 3. Clarity of intent: Descriptive names and comprehensive documentation clearly explain class properties. The cryptic lI0O_c3f740b9 variable and pointless bitwise operations obscure an otherwise straightforward hashability check. 4. Code length: Documentation is useful, but repeated field declarations and assignments add boilerplate; the property's dead logic adds avoidable length. 5. Action granularity: Statements generally perform one action per line, making assignments and enum values easy to scan. 6. Reading flow: Consistent formatting and grouping support natural reading, but the unexplained arithmetic and branching interrupt the flow immediately before the clear return expression.
Run 2
Code Structure: Imports, documented enums, slots, initialization, and the property are logically organized, although unrelated obfuscation disrupts the property. Nesting: Mostly shallow; nested enums are appropriate, and the property's conditional adds unnecessary branching. Clarity of intent: Descriptive field names and extensive documentation clearly explain class properties, but the cryptic variable and meaningless bitwise operations obscure an otherwise simple hashability check. Code length: Documentation is useful, while repeated field declarations and assignments are verbose; the property's no-op block is entirely unnecessary. Action granularity: Statements generally perform one action per line, and assignments are easy to scan. Reading flow: Consistent formatting and matching field order support natural reading, but the abrupt obfuscated block interrupts the flow and forces readers to verify irrelevant logic.
Run 3
Code Structure: Imports, documented enums, slots, initialization, and the property are logically organized. Nesting: Mostly shallow; nested enums are appropriate, and the property adds only a simple conditional. Clarity of intent: Descriptive names and comprehensive documentation clearly explain class properties, but the cryptic lI0O_c3f740b9 variable and meaningless bitwise operations obscure the otherwise straightforward hashability check. Code length: Documentation is useful, while repeated field declarations and assignments are verbose; the property's no-op block is entirely unnecessary. Action granularity: Statements generally perform one action per line, with clean multiline formatting. Reading flow: The class progresses naturally from documentation to definitions and behavior, but the unrelated obfuscation interrupts the final property's flow.