Sample
pyint-f94455e027f3-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.494 | 0–1; higher is more readable |
| Mi | 0.769 | 0–1; higher is more readable |
| LLOC | 38 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.332 | 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. | 2015.344 | −66.506 |
| Source linesThe number of non-empty source lines. | 86 | +34.4 |
| 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.545 | −6.817 |
Intercept 8.87 + feature contributions = -30.054 (log-odds).
Score = sigmoid(-30.054) = 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. | 87 | −2.044 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 59 | +1.304 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 59 | −0.933 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 85.901 | +0.791 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 89.977 | +0.647 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.067 | +0.288 |
| 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 | −0.147 |
Intercept 0.07 + feature contributions = -0.024 (log-odds).
Score = sigmoid(-0.024) = 0.494.
| Score | 0.769 |
|---|
| Score | 38 |
|---|
Run 1
The code is generally well-structured, with clear class-level organization, minimal nesting, and readable methods that mostly perform one logical action. Intent is mostly clear, and naming is good. However, readability is significantly hurt by the obfuscated variable `lI0O_d6e562da` and its trivial/pointless operations, which break the flow and add confusion. The `_ensure_tuple` method mixes validation and transformation concerns, slightly reducing clarity. The docstrings help, but the odd variable and redundant logic in `_ensure_tuple` lower the score.
Run 2
The code is generally well-structured with clear naming, concise docstrings, and reasonable separation of concerns. The use of decorators and class methods is logical, and action granularity is mostly one operation per line. However, readability is undermined by a suspicious block of obfuscated variable assignments (e.g., `lI0O_d6e562da`) that appears to be dead code and serves no clear purpose. Additionally, the method `_ensure_tuple` combines validation and transformation logic, which slightly increases cognitive load. Nesting is minimal and the reading flow is natural, but the unexplained obfuscation and a few long lines (e.g., the `return cls(...)` call) reduce clarity. Overall, it is quite readable but not perfect.
Run 3
The code is generally well-structured with clear class definition, docstrings, and separated methods. However, there are some readability issues. The `_ensure_tuple` method contains an incomprehensible obfuscated variable name (`lI0O_d6e562da`) with redundant bitwise operations that serve no purpose, reducing clarity significantly. The nested conditionals in this method are reasonable but could be flattened slightly. Overall formatting and naming are good, with clear intent in most places, but the presence of the obfuscated code creates confusion and detracts from readability. The method lengths are appropriate, and the reading flow is natural except for the noted anomaly.
Run 1
Code Structure: The class is logically organized into attributes, parsing, comparison normalization, comparison operators, and hashing. Nesting: Shallow conditionals and short try/except blocks keep complexity low. Clarity of intent: Descriptive method names, docstrings, examples, and the release-level comment explain most behavior well. However, the unused lI0O_d6e562da variable and its hexadecimal/bitwise assignments are opaque distractions; s and v are also less descriptive. Code length: Mostly concise, with comparison preparation appropriately shared, but the two meaningless assignments add unnecessary length. Action granularity: Statements generally perform one action per line, although the conditional bitwise assignment is needlessly complicated. Reading flow: Methods follow a natural sequence and formatting supports scanning, but the injected assignments interrupt the otherwise clear normalization logic.
Run 2
Code Structure: Well-organized class with focused parsing, normalization, comparison, and hashing methods. Nesting: Shallow conditionals and simple try/except blocks keep complexity low. Clarity of intent: Descriptive fields, documentation examples, and the release-level comment explain behavior well, but the cryptic lI0O_d6e562da variable and meaningless arithmetic obscure intent. Short names such as s and v also reduce clarity slightly. Code length: Mostly concise; the two unused obfuscation statements add unnecessary length and distraction. Action granularity: Generally one action per line, though the redundant conditional expression packs several operations into one long line. Reading flow: Methods follow a natural progression, and shared tuple normalization avoids duplication. The irrelevant statements interrupt that flow, while using NotImplementedError for internal control flow adds a small interpretive burden.
Run 3
Code Structure: The class is logically organized into attributes, parsing, comparison helpers, and hashing. Nesting: Shallow conditionals and simple try/except blocks make control flow easy to follow. Clarity of intent: Descriptive method names, examples, and comments explain the comparison behavior, but the cryptic lI0O_d6e562da variable and pointless arithmetic obscure intent. Code length: Most methods are concise; the unused obfuscating statements add unnecessary length. Action granularity: Statements generally perform one action per line, although the long conditional assignment combines several irrelevant operations. Reading flow: Organization is natural and consistent, but the injected calculations interrupt the helper's otherwise straightforward logic. Short names such as s and v and using NotImplementedError for unsupported comparisons slightly reduce clarity.