Sample
pyint-41351d8b9657-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.585 | 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 | 11.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.67 | 0–20; mean of three runs |
| BTTF | 0.55 | 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.674 | −7.011 |
Intercept 8.87 + feature contributions = -58.971 (log-odds).
Score = sigmoid(-58.971) = 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.894 | +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.07 | +0.266 |
| 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.344 (log-odds).
Score = sigmoid(0.344) = 0.585.
| Score | 0.615 |
|---|
| Score | 44 |
|---|
Run 1
The code demonstrates generally good structure with logical organization, appropriate use of Django model fields, clear naming conventions, and flat nesting. However, several issues impact readability: undefined imports (UserManager, PermissionsMixin), inconsistent method naming (cle, get, get2, email2 instead of clean, get_full_name, get_short_name, email_user), and method name 'get2' lacks clarity. Docstrings are helpful but placement after improperly named methods suggests incomplete refactoring. Field definitions are well-formatted with one parameter per line where appropriate. The code is concise and maintains good action granularity. Reading flow is natural for Django models but disrupted by the naming inconsistencies and missing imports. The abstract class structure is clear, and the Meta class is appropriately defined. Overall, the code follows Django conventions but is undermined by what appears to be incomplete renaming or placeholder names that obscure intent.
Run 2
The code has good structure in the model field definitions, with clear formatting and helpful help_text/error_messages. However, it suffers from severe readability issues in the method names: 'cle', 'get', 'get2', 'email2' are ambiguous and don't convey intent. The imports contain unused modules (apps, auth, make_password, ContentType, PermissionDenied, EmptyManager) which adds noise. The 'get' method's docstring describes concatenation but the method name is unclear; 'get2' returns first_name but is poorly named. The email method's parameter names ('sub', 'mes', 'from2', 'kwa') are extremely cryptic and obscure meaning. Method ordering feels arbitrary - email functionality appears after name methods without logical grouping. While the field declarations are well-structured with consistent formatting and good verbosity levels, the poor naming choices significantly reduce overall readability and maintainability.
Run 3
The code has significant readability issues. While the model field definitions are well-structured with consistent formatting and clear help texts, the method names are cryptic and misleading: 'cle()' instead of 'clean()', 'get()' instead of 'get_full_name()', 'get2()' instead of 'get_short_name()', and 'email2()' instead of 'email_user()'. Parameter names like 'sub', 'mes', 'from2', and 'kwa' obscure intent rather than clarifying it. The docstrings are minimal and don't compensate for the poor naming. Additionally, some imports appear unused (Iterable, apps, auth, ContentType, PermissionDenied, EmptyManager), and the class lacks proper method ordering—custom methods should typically follow Django's standard conventions. The overall structure follows Django model patterns, but the obfuscated naming severely impacts clarity and maintainability.
Run 1
Code Structure: Fields, configuration, metadata, and methods are logically grouped, although numerous unused imports add clutter and PermissionsMixin and UserManager are not defined or imported in the snippet. Nesting: Shallow nesting and simple methods make the code easy to follow. Clarity of intent: Descriptive field names, help text, and docstrings explain the model well, but method names such as cle, get, get2, and email2 and parameters such as sub, mes, from2, and kwa obscure intent. Code length: Mostly concise; multiline field declarations are justified by their configuration, while unused imports unnecessarily lengthen the snippet. Action granularity: Statements generally perform one action per line, with readable argument formatting. Reading flow: The progression from fields to metadata to behavior is natural, but vague method names and unresolved references interrupt comprehension.
Run 2
Code Structure: Imports, model fields, configuration, metadata, and methods are logically grouped, though several unused imports add clutter and PermissionsMixin and UserManager are not defined or imported in the snippet. Nesting: Minimal nesting; multiline field declarations are easy to follow. Clarity of intent: Descriptive field names, help text, and docstrings explain the model well, but method names cle, get, get2, and email2 and parameters sub, mes, from2, and kwa obscure intent. Code length: Mostly concise, with justified verbosity for field configuration, although imports could be trimmed. Action granularity: Each statement generally performs one clear action, without compressed compound statements. Reading flow: Consistent formatting and conventional Django organization support natural reading, but cryptic method names and missing dependencies interrupt understanding.
Run 3
Code Structure: Fields, configuration, metadata, and methods are logically grouped, although unused imports and undefined PermissionsMixin/UserManager references distract. Nesting: Minimal nesting makes the class easy to scan; multiline field declarations remain manageable. Clarity of intent: Descriptive field names, help text, and docstrings explain the model well, but cle, get, get2, email2, sub, mes, from2, and kwa obscure method purposes and parameters. Code length: Generally appropriate for a Django model, with unnecessary imports adding clutter. Action granularity: Statements generally perform one action per line, and field options are clearly separated. Reading flow: Progression from fields to metadata to behavior is natural, but cryptic method naming interrupts comprehension and requires readers to inspect implementations.