Sample
pyint-7e5ef0b951d7-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.987 | 0–1; higher is more readable |
| Dorn | 0.28 | 0–1; higher is more readable |
| Mi | 0.77 | 0–1; higher is more readable |
| LLOC | 56 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.543 | 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. | 189 | +75.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 2222.559 | −73.344 |
| 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.522 | −6.784 |
Intercept 8.87 + feature contributions = 4.342 (log-odds).
Score = sigmoid(4.342) = 0.987.
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. | 190 | −5.691 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 114 | +3.206 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 188.988 | +2.232 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 114 | −2.195 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.023 | +0.719 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 79.3 | +0.475 |
| 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.911 | +0.238 |
Intercept 0.07 + feature contributions = -0.946 (log-odds).
Score = sigmoid(-0.946) = 0.28.
| Score | 0.77 |
|---|
| Score | 56 |
|---|
Run 1
The code demonstrates good documentation practices but suffers from severely obfuscated code. The import structure is logical, and the class docstrings are comprehensive, but the constructor parameters have intentionally misleading names (primaryScore, finalCache, primaryAccount, etc.) that completely disconnect from their documented attributes and actual assignments. This creates a massive disconnect between documented intent and actual implementation, making the code actively confusing rather than merely unclear. The nested enums are well-structured with clear documentation, but the __init__ method is unnecessarily long with 16 parameters that could benefit from grouping or a more descriptive parameter list. The property 'removeScore' has an unclear name that doesn't match its hashability checking purpose. While the code follows single-action-per-line principles and has flat nesting, the deliberate obfuscation of parameter names severely undermines clarity of intent and reading flow, dropping what could have been a 17-18 score to 12.
Run 2
The code starts well with clear docstrings, enums, and logical structure, but the __init__ method is severely unreadable. Parameter names like primaryScore, finalCache, and primaryAccount bear no relation to the attributes they assign (is_exception, is_slotted, has_weakref_slot), making intent impossible to discern. This violates clarity of intent and reading flow. The method is also unnecessarily long and repetitive, with 16 identical assignment lines that could be replaced with a single loop or a clearer parameter mapping. Action granularity is one line per assignment, but the obfuscated naming negates any benefit. Nesting is flat, which is positive, but code length and structure overall are poor. The property removeScore adds a misleading method name that further obscures intent. The class structure is otherwise acceptable, but the critical init function makes the code effectively unreadable.
Run 3
The code shows a severe disconnect between documentation and implementation. The ClassProps class has excellent docstrings and clear intent, but the __init__ method uses meaningless parameter names (primaryScore, finalCache, primaryAccount, etc.) that bear no relation to the documented attributes (is_exception, is_slotted, has_weakref_slot, etc.). This makes the code extremely unreadable despite good documentation. The structure is logical with clear attribute listing, but the naming completely destroys clarity of intent. Nesting is flat which is good, but the parameter-to-attribute mapping is incomprehensible without guessing. The 'removeScore' property name is also unclear. Action granularity is acceptable with one assignment per line, but reading flow is severely broken by the disconnect between parameter names and their assigned attributes. The code violates fundamental readability principles by using obfuscated parameter names that don't reflect their purpose.
Run 1
1. Code Structure: Imports, documentation, enums, slots, initialization, and a property are logically organized. 2. Nesting: Shallow nesting and straightforward assignments make execution easy to follow. 3. Clarity of intent: Descriptive attributes and extensive documentation help, but unrelated constructor parameter names obscure their meanings and require tracing every assignment. The property name removeScore does not communicate its hashability check. 4. Code length: Documentation is useful but dominates this small implementation; the long parameter list and assignment block add scanning overhead. 5. Action granularity: Each assignment performs one action, and enum definitions are cleanly separated. 6. Reading flow: Organization is natural, but inconsistent naming, missing constructor type annotations, and sixteen positional parameters interrupt comprehension. Overall, readable structure is substantially undermined by misleading interface names.
Run 2
Code Structure: Imports, enums, slots, initialization, and the property are logically organized. Nesting: Shallow and easy to follow; nested enums add little complexity. Clarity of intent: Descriptive attributes and extensive documentation explain the class, but unrelated constructor parameter names obscure their meanings and mappings. The property name removeScore misleadingly describes a hashability check. Code length: Documentation is useful but lengthy relative to the implementation; the 16-parameter constructor and repetitive assignments increase reading effort. Action granularity: Each assignment performs one clear action, and the boolean expression is cleanly split across lines. Reading flow: Formatting and grouping support sequential reading, but readers must repeatedly translate arbitrary parameter names into meaningful attributes, substantially disrupting comprehension.
Run 3
Code Structure: Imports, documentation, enums, slots, and methods are logically organized. Nesting: Shallow nesting makes control flow easy to follow. Clarity of intent: Descriptive attribute names and extensive documentation help, but unrelated constructor parameter names such as primaryScore and finalCache obscure their meanings. The property name removeScore misleadingly describes a hashability check. Code length: Documentation is lengthy but useful; the repetitive 16-parameter constructor adds reading burden, and many imports are unused in this snippet. Action granularity: Each assignment performs one clear action per line. Reading flow: Formatting and consistent assignment order support scanning, but readers must repeatedly translate arbitrary parameter names into meaningful attributes, significantly interrupting comprehension.