Sample
pyint-2170233ac73f-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.589 | 0–1; higher is more readable |
| Mi | 0.615 | 0–1; higher is more readable |
| LLOC | 44 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.551 | 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. | 2849.414 | −94.031 |
| Source linesThe number of non-empty source lines. | 83 | +33.2 |
| 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.678 | −7.017 |
Intercept 8.87 + feature contributions = -58.978 (log-odds).
Score = sigmoid(-58.978) = 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. | 84 | −1.938 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 76 | +1.892 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 76 | −1.323 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 82.918 | +0.749 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82.024 | +0.519 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.068 | +0.283 |
| 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.952 | +0.109 |
Intercept 0.07 + feature contributions = 0.361 (log-odds).
Score = sigmoid(0.361) = 0.589.
| Score | 0.615 |
|---|
| Score | 44 |
|---|
Run 1
The code begins well with clear imports and a structured model definition, following Django conventions. However, readability drops significantly in the latter half. Method names like close(), updateAccount(), validateBuffer(), and createUser() are misleading: their names do not match their actual behavior (e.g., close() cleans and normalizes email, updateAccount() returns a full name). This creates ambiguous intent. Parameter names like 'history', 'nextKey', and 'config' obscure meaning. The single-purpose principle is violated, and reading flow is disorganized due to mismatched names and functionality. While the model fields are well-formatted and the class docstring is helpful, the confusing methods and inconsistent naming reduce overall clarity. The code is not deeply nested and length is moderate, but logical organization suffers because related functionality is mislabeled.
Run 2
The code has a clear initial structure with well-formatted model fields, but becomes confusing after the Meta class. Several methods have misleading names and unclear purposes: 'close()' calls clean and normalizes email, 'updateAccount()' returns a full name string, 'validateBuffer()' returns a first name, and 'createUser()' sends an email. The parameter names in createUser (history, nextKey, recentPath, config) are ambiguous and do not match their actual use in send_mail. This creates significant ambiguity about intent. While the code layout is flat and generally well-indented, the mismatch between method names and their behavior makes it difficult to understand what the class is supposed to do beyond the admin-compliant user model. Some method docstrings appear copied from other functionality and do not describe the actual operations. Overall, the class reads as if it has been auto-generated or refactored poorly, undermining clarity and maintainability.
Run 3
The code has significant readability issues despite organized imports and field definitions. The methods at the bottom have misleading names that don't reflect their actual behavior: 'close' calls clean and normalizes email, 'updateAccount' returns the full name, 'validateBuffer' returns the first name, and 'createUser' sends an email. Method parameters use vague names like 'history', 'nextKey', and 'recentPath' that don't correspond to their email purpose (subject, message, from_email). The docstrings contradict the method bodies—'updateAccount' says it returns first_name plus last_name, which matches its logic, but the method name suggests updating an account. The class structure is reasonable with clear Django model field definitions, but the method naming and parameter choices make the code's intent ambiguous and confusing to read. The code appears to be intentionally obfuscated or poorly refactored, severely impacting clarity of intent and reading flow.
Run 1
Code Structure: Fields, model configuration, and methods are logically grouped, although numerous unused imports and undefined PermissionsMixin/UserManager references distract. Nesting: Minimal nesting; multiline field declarations remain easy to follow. Clarity of intent: Field names and help text are clear, but method names are misleading: close cleans data, updateAccount returns a full name, validateBuffer returns a first name, and createUser sends email. Generic email parameter names further obscure intent. Code length: Mostly appropriate for a declarative Django model, with avoidable import clutter. Action granularity: Statements generally perform one action per line, and field options are clearly separated. Reading flow: The progression from fields to metadata to methods is natural, but inconsistent camelCase naming and contradictions between method names and docstrings interrupt comprehension.
Run 2
Code Structure: Fields, configuration, metadata, and methods are logically grouped, but unused imports and undefined PermissionsMixin and UserManager weaken self-containment. Nesting: Shallow nesting and simple methods make the code easy to scan. Clarity of intent: Field names, help text, and docstrings are clear, but method names such as close, updateAccount, validateBuffer, and createUser misleadingly describe cleaning, name retrieval, and email sending; email parameters are similarly obscure. Code length: Mostly concise, with justified multiline field declarations, though unnecessary imports add clutter. Action granularity: Each statement performs a distinct action, with no compressed multi-statement lines. Reading flow: The model follows a natural Django layout, but inconsistent camelCase naming and mismatches between method names and behavior interrupt comprehension.
Run 3
Code Structure: Fields, configuration, metadata, and methods are logically grouped, but unused imports and undefined PermissionsMixin and UserManager weaken self-contained readability. Nesting: Shallow nesting and simple method bodies make the code easy to scan. Clarity of intent: Field names and help text are clear, but method names are misleading: close cleans data, updateAccount returns a full name, validateBuffer returns a first name, and createUser sends email. Generic email parameters further obscure intent, despite helpful docstrings. Code length: Mostly concise; multiline field declarations are justified, while unused imports add clutter. Action granularity: Each statement generally performs one action, with no compressed multi-statement lines. Reading flow: The declarative model layout flows naturally, but inconsistent camelCase method naming and mismatches between names and behavior interrupt comprehension.