Sample
pyint-3319b9ee86c0-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.494 | 0–1; higher is more readable |
| Mi | 0.651 | 0–1; higher is more readable |
| LLOC | 58 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.347 | 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. | 3032.552 | −100.074 |
| Source linesThe number of non-empty source lines. | 127 | +50.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.398 | −6.597 |
Intercept 8.87 + feature contributions = -47.001 (log-odds).
Score = sigmoid(-47.001) = 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. | 128 | −3.496 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 97 | +2.618 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 97 | −1.805 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 126.875 | +1.364 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 78.227 | +0.458 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.051 | +0.448 |
| 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. | 78.969 | +0.32 |
Intercept 0.07 + feature contributions = -0.023 (log-odds).
Score = sigmoid(-0.023) = 0.494.
| Score | 0.651 |
|---|
| Score | 58 |
|---|
Run 1
The code is difficult to read due to poor naming conventions (e.g., 'use', 'make2', 'make3'), inconsistent method structure, and a mix of clear comments with unclear or missing ones. The token generation logic is spread across multiple methods with vague names, making it hard to follow the flow. Nesting is moderate but not deeply complex. The class lacks clear separation of concerns, and property definitions are awkwardly placed. Code length is reasonable but not concise due to redundant method names and unclear abstractions. Overall, the code is functional but not highly readable.
Run 2
The code is highly unreadable due to poorly named methods and variables (e.g., 'make', 'make2', 'make3', 'use3', 'tim2', 'sec3', 'get2', 'set2', 'num', 'now2'). These ambiguous names obscure the logic and intent, making the flow difficult to follow. The structure is tangled; for instance, the property definitions reference functions (`_get_secret`, `_get_fallbacks`) that are not defined in the provided code, creating confusion. There is unnecessary complexity and nesting in the `check` method, including a for-else construct that is hard to parse. The action granularity is inconsistent, with some lines containing multiple operations. Overall, the code requires significant mental effort to understand due to its cryptic naming and tangled organization.
Run 3
The code appears to be a modified version of Django's PasswordResetTokenGenerator with intentionally obscured naming. Methods like make, make2, make3, check, num, now2, get, set, get2, set2, use, use2, use3, use4, tim, tim2, ts2, ts3, ts4 are ambiguous and hinder clarity of intent. The class structure is logical, but the obfuscated names disrupt reading flow. Nesting is moderate, with some try/except blocks and loops. Action granularity is acceptable, with one action per line mostly. Code length is reasonable. Overall readability is significantly reduced due to unclear naming conventions.
Run 1
Code Structure: Responsibilities are separated into small methods, but property declarations reference undefined accessor names, breaking coherence. Nesting: Guard clauses keep validation mostly flat; the loop and conditional nesting are modest. Clarity of intent: Docstrings and comments explain token generation well, but names such as make2, make3, use4, and ts3 obscure distinct roles. Code length: Implementation is reasonably concise, with useful documentation rather than substantial repetition. Action granularity: Most statements perform one action per line, although chained hashing and slicing require extra interpretation. Reading flow: Generation, validation, and supporting helpers follow a logical order, but inconsistent naming and awkward multiline slicing interrupt comprehension. Overall, the organization and documentation help, while ambiguous identifiers and mismatched property accessors significantly reduce readability.
Run 2
Code Structure: Logically divided into token generation, validation, hashing, and time helpers, but property declarations reference undefined accessor names, undermining coherence. Nesting: Mostly shallow, with early returns keeping validation manageable; the loop-else requires extra attention. Clarity of intent: Docstrings and comments explain the password-reset mechanism well, but generic names such as make2, get2, use3, and ts3 obscure individual responsibilities and data roles. Code length: Reasonably concise for its functionality; extensive documentation is useful rather than redundant. Action granularity: Generally one action per statement, although chained hashing and awkward multiline slicing make one expression harder to parse. Reading flow: The overall sequence is natural, but inconsistent naming, broken accessor references, and unusual formatting interrupt comprehension.
Run 3
Code Structure: Well-separated methods organize token generation, validation, hashing, and time handling, but properties reference undefined accessor names rather than the declared methods, undermining coherence. Nesting: Shallow nesting and early returns keep validation readable; the loop-else requires some attention. Clarity of intent: Docstrings and comments explain the mechanism, but generic names such as make2, get2, use4, and ts3 obscure roles and relationships. Code length: Mostly concise, with useful explanatory documentation, though awkward multiline slicing adds visual noise. Action granularity: Statements generally perform one action each; chained hashing and slicing remain manageable. Reading flow: The overall sequence is logical, but inconsistent naming, broken accessor references, and formatting interruptions force readers to repeatedly infer meaning.