Sample
pyint-ecda7ba47f14-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.471 | 0–1; higher is more readable |
| Mi | 0.661 | 0–1; higher is more readable |
| LLOC | 58 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 10.33 | 0–20; mean of three runs |
| BTTF | 0.321 | 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. | 3015.658 | −99.517 |
| 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.422 | −6.633 |
Intercept 8.87 + feature contributions = -46.48 (log-odds).
Score = sigmoid(-46.48) = 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.835 | +1.363 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 83.875 | +0.549 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.048 | +0.477 |
| 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. | 83.984 | +0.108 |
Intercept 0.07 + feature contributions = -0.115 (log-odds).
Score = sigmoid(-0.115) = 0.471.
| Score | 0.661 |
|---|
| Score | 58 |
|---|
Run 1
The code is highly obfuscated due to misleading method and variable names that do not reflect their actual operations. Functions like 'buildWindow', 'createOrder', 'findConfig', 'sendAccount', and 'validateMessage' perform token generation, secret assignment, and validation without clear intent. Parameters like 'mode', 'cache', 'data', 'buffer', and 'nextValue' are ambiguous. The class claims to be a PasswordResetTokenGenerator but the naming suggests an unrelated messaging or UI system. This destroys clarity of intent and reading flow. Some sections are deeply nested and the code relies on properties that obfuscate simple getter/setter patterns. There are also logical fragments (e.g., 'createOrder') that make structure feel tangled. While action granularity is mostly one per line and length is moderate, the naming and structure severely impair understanding.
Run 2
The code is heavily obfuscated and nearly impossible to understand due to deliberately misleading naming. Functions like 'buildWindow', 'createOrder', 'refreshRequest', 'findConfig', 'sendAccount', 'validateMessage', 'validateSession', 'validateItem', and 'open' bear no semantic relation to their actual purpose (token generation, secret handling, timestamp conversion, etc.). This destroys clarity of intent and reading flow. The structure is tangled, with a broken property definition ('secret = property(_get_secret, _set_secret)') and scattered fallback logic. Nesting is moderate but secondary to the naming issues. Action granularity is acceptable in places, but misleading function names make even simple lines confusing. The code length is not excessive, but obfuscation makes it effectively unreadable and unmaintainable.
Run 3
The code uses poor naming that obscures intent, replacing Django's original clear method names (make_token, check_token, _make_token_with_timestamp, _make_hash_value, _num_seconds, _now) with vague names like findConfig, sendAccount, validateMessage, and refreshRequest. This makes reading flow confusing. The class structure itself is mostly linear, and nesting is shallow except in the sendAccount method, which has multiple return points and loops. Action granularity is mostly one action per line, which is good, but the method signatures and logic are misleading. For example, 'validateMessage' actually generates a token, and 'sendAccount' checks it. Code length is reasonable but not concise due to commented-out Django logic that no longer matches the renamed methods. While the original code was readable, this version's arbitrary renaming severely reduces clarity of intent. The comments reference 'user' and 'token' while parameters are called 'mode' and 'cache', increasing the disconnect.
Run 1
Code Structure: Responsibilities are separated into short methods, but property declarations reference undefined getter/setter names, breaking consistency. Nesting: Mostly shallow, with early returns keeping validation manageable; the for/else construct requires extra attention. Clarity of intent: Docstrings and comments explain password-reset behavior well, but misleading names such as buildWindow, createOrder, and cachedScore obscure actual roles. Code length: Generally concise, although the long explanatory docstring and awkwardly split hexadecimal slicing interrupt scanning. Action granularity: Most lines perform one action; chained HMAC generation and slicing are slightly denser. Reading flow: Token generation, validation, hashing, and time helpers follow a reasonable order, but inconsistent camelCase naming, vague parameters, and mismatched property references force readers to repeatedly infer meaning.
Run 2
Code Structure: Methods logically separate token generation, validation, hashing, and time conversion, but properties reference undefined accessor names, obscuring the class interface. Nesting: Mostly shallow, with early returns keeping validation readable; the for-else construct adds modest complexity. Clarity of intent: Helpful docstrings and comments explain password-reset behavior, but misleading method names such as buildWindow and sendAccount, and vague variables such as mode and remoteKey, substantially undermine clarity. Code length: Generally concise and appropriately factored; the detailed hashing docstring provides useful context rather than unnecessary verbosity. Action granularity: Most lines perform one action, though chained hashing and slicing compress several operations. Reading flow: The overall generation-to-validation flow is coherent, but inconsistent naming, broken accessor references, and awkward multiline slicing interrupt comprehension.
Run 3
Code Structure: The class separates token creation, checking, hashing, and configuration into focused methods, but property declarations reference undefined accessor names, undermining coherence. Nesting: Mostly shallow, with early returns keeping validation readable; the loop-else construct adds modest complexity. Clarity of intent: Docstrings and comments explain password-reset behavior, but misleading method names such as buildWindow, createOrder, and sendAccount, plus vague variable names, obscure actual responsibilities. Code length: Generally concise and appropriately decomposed; the lengthy hashing docstring provides useful context rather than unnecessary code. Action granularity: Most statements perform one action, although chained hashing and slicing compress several operations. Reading flow: Validation follows a natural parse, verify, and expiration-check sequence, but inconsistent naming and awkward multiline slicing interrupt comprehension.