Sample
pyint-fec57ee3efda-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.869 | 0–1; higher is more readable |
| Mi | 0.38 | 0–1; higher is more readable |
| LLOC | 40 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs |
| BTTF | 0.413 | 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. | 2149.209 | −70.924 |
| Source linesThe number of non-empty source lines. | 60 | +24 |
| 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.411 | −6.617 |
Intercept 8.87 + feature contributions = -44.671 (log-odds).
Score = sigmoid(-44.671) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 57 | +1.234 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 61 | −1.123 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 88 | +0.615 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 59.854 | +0.427 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.063 | +0.332 |
| 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. | 88 | −0.062 |
Intercept 0.07 + feature contributions = 1.891 (log-odds).
Score = sigmoid(1.891) = 0.869.
| Score | 0.38 |
|---|
| Score | 40 |
|---|
Run 1
The code is nearly impossible to understand due to egregious naming violations. Function parameters (token, context, user, secureAccount, event) and local variables (count, batch, defaultRecord, currentRecord) are misleading, failing to convey their actual purposes. This makes the code deeply ambiguous and obscures intent. While the structure is logically organized and the nesting is flat, the variable naming renders it unreadable. The code is concise and has good action granularity, but the poor naming destroys the reading flow. The logic, such as the boolean inversion in __call__, is also unclear due to misleading variable names.
Run 2
The code has a clear class structure and each method's purpose is understandable, but several readability issues undermine clarity. The constructor parameters use misleading names like 'token', 'context', 'user', 'secureAccount', and 'event' instead of descriptive names matching their actual use (regex pattern, message, code, inverse_match, flags), making intent confusing. The __call__ method uses poorly named variables ('count', 'defaultRecord', 'currentRecord') that obscure the validation logic, and the boolean logic for inverse matching is inverted compared to expectations. While nesting is minimal and line-level action granularity is acceptable, the unnatural parameter naming disrupts reading flow and requires unnecessary mental mapping. The code appears to be obfuscated Django source, but in its current form, clarity suffers significantly from semantic mislabeling rather than structural complexity.
Run 3
The code has some readable aspects but suffers from confusing variable naming and mixed parameter purposes. The class structure is logical, but the __init__ method uses misleading parameter names (token, context, user, secureAccount, event) that don't reflect what they actually set (regex, message, code, inverse_match, flags). This obscures intent significantly. The __call__ method uses variable names like 'count', 'defaultRecord', and 'currentRecord' that don't align with validation concepts, making the logic harder to follow. Nesting is minimal and action granularity is reasonable, but the boolean logic in __call__ is inverted from what a reader would expect, reducing clarity. The code is relatively concise but would benefit from better naming and alignment with Django conventions. Overall, the structure is serviceable, but the inconsistent naming conventions and unclear variable semantics make it difficult to read and maintain.
Run 1
Code Structure: The class is logically organized into defaults, initialization, validation, and equality checking, though unused imports add clutter. Nesting: Shallow conditionals keep the code easy to navigate. Clarity of intent: The class name and validation docstring explain its purpose, but misleading parameter names such as token, context, user, secureAccount, and event obscure their actual roles. Names like count, batch, defaultRecord, and currentRecord likewise weaken understanding. Code length: The implementation is reasonably concise, although unused imports and redundant parentheses create minor noise. Action granularity: Each statement performs a focused action, with no crowded multi-statement lines. Reading flow: Method ordering and formatting are natural, but inconsistent naming conventions and the indirect match-to-error boolean transformation require extra mental effort.
Run 2
Code Structure: The class is logically organized into initialization, validation, and equality methods, although numerous unused imports add clutter. Nesting: Control flow remains shallow, with straightforward conditionals and no deeply nested blocks. Clarity of intent: The class name and validation docstring explain its purpose, but misleading parameter names such as token, context, user, secureAccount, and event obscure their actual roles. Likewise, count, batch, defaultRecord, and currentRecord weaken understanding; mixed naming conventions compound this issue. Code length: The implementation is reasonably concise, though unused imports and repetitive assignments create some noise. Action granularity: Statements generally perform one action per line, and multiline expressions are formatted clearly. Reading flow: Methods follow a natural order, but readers must repeatedly translate arbitrary names into regex, message, code, matching, and flag concepts, interrupting otherwise smooth reading.
Run 3
Code Structure: The class is logically organized into configuration, initialization, validation, and equality methods, though numerous unused imports add clutter. Nesting: Control flow is shallow, with simple conditionals and no deeply nested blocks. Clarity of intent: The class name and validation docstring communicate its purpose, but misleading parameter names such as token, context, user, secureAccount, and event obscure their actual roles. Variables like defaultRecord and currentRecord similarly hide regex-match and failure semantics. Code length: The implementation is reasonably concise, although unused imports and repetitive initialization checks increase visual overhead. Action granularity: Statements generally perform one action per line, and multiline expressions are appropriately formatted. Reading flow: Method ordering and consistent indentation support natural reading, but inconsistent naming conventions and indirect boolean logic require readers to mentally translate names into behavior.