Sample

pyint-a1b949b85a9a-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines20

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.5860–1; higher is more readable
Mi0.3810–1; higher is more readable
LLOC15Logical lines; fewer is more readable
DeepSeek V4 Pro11.670–20; mean of three runs
GPT-6.1 Sol170–20; mean of three runs
BTTF0.5820–1; higher is more readable

Views

Source code

from django.apps import AppConfig from django.contrib.contenttypes.checks import ( check_generic_foreign_keys, check_model_name_lengths, ) from django.core import checks from django.db.models.signals import post_migrate, pre_migrate from django.utils.translation import gettext_lazy as _ from .management import create_contenttypes, inject_rename_contenttypes_operations class ContentTypesConfig(AppConfig): default_auto_field = "django.db.models.AutoField" name = "django.contrib.contenttypes" verbose_name = _("Content Types") def a(self): pre_migrate.connect(inject_rename_contenttypes_operations, sender=self) post_migrate.connect(create_contenttypes) checks.register(check_generic_foreign_keys, checks.Tags.models) checks.register(check_model_name_lengths, checks.Tags.models)

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.659.022−21.748
Source linesThe number of non-empty source lines.20+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.589−6.883

Intercept 8.87 + feature contributions = -11.761 (log-odds).
Score = sigmoid(-11.761) = 0.

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.059+0.373
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.21+0.293
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.81.905+0.196
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.19.771−0.133
Indentation frequencyHow rapidly indentation changes from line to line.20−0.045

Intercept 0.07 + feature contributions = 0.347 (log-odds).
Score = sigmoid(0.347) = 0.586.

Score0.381
Score15
Run 1

The code is very short and each action is on its own line, which is good for granularity. However, it suffers from several readability problems. The method 'a' has a completely meaningless name, making the code's intent unclear. The structure is flat but the logical organization is poor: connecting signals and registering checks are conceptually different activities, yet they are grouped together without explanation. The docstring is absent, and the method name prevents any natural reading flow. The imports are well organized, and the class attributes are clear, but the core logic is opaque. The lack of context about when this method is called (likely 'ready()') further obscures the purpose. A proper method name like 'ready' with comments or separation of concerns would significantly improve readability.

Run 2

The code is generally readable: imports are grouped logically, class structure is clear, and method body contains one action per line with reasonable nesting. However, clarity of intent is reduced by the cryptic method name 'a' which does not describe its purpose (e.g., 'ready'), and connecting signals directly in this method lacks explicit context. The class definition and registration setup are concise but could benefit from a more descriptive method name and possibly a comment explaining the signal wiring. Overall, the structure is fairly flat and readable, losing points only for ambiguous naming and minimal intent documentation.

Run 3

The code is relatively concise and each action is on its own line, which is good. However, the method name 'a' is meaningless and completely obscures the intent of the registration/setup actions. The organization is okay but could be improved by grouping or commenting the signal connections and checks registrations. The nesting is flat, which is positive, but the reading flow suffers due to the cryptic method name and lack of context about when it runs. The imports are clean but slightly verbose. Overall, the structure is not tangled, but clarity of intent is severely undermined by poor naming and missing docstrings.

Run 1

Code Structure: Imports, configuration attributes, and initialization logic are logically grouped. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive imports and function names explain the signal connections and check registrations, but the method name 'a' obscures its purpose and whether Django invokes it as a lifecycle hook. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one clear action. Reading flow: Configuration naturally precedes setup operations, though an additional blank line before the class would improve visual separation.

Run 2

Code Structure: Imports, configuration attributes, and initialization logic are logically grouped. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive imports and registration calls communicate their purposes, but the method name 'a' obscures its role, particularly where Django would normally use 'ready'. Code length: Compact without unnecessary statements. Action granularity: Each statement performs one clear configuration or registration action. Reading flow: The progression from imports to class metadata to signal and check registration is natural; slightly more spacing between import groups and before the class would improve presentation.

Run 3

Code Structure: Imports, configuration attributes, and initialization logic are logically grouped. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive imports and function names explain the signal connections and check registrations, but the method name 'a' obscures its purpose and whether it is intended as a Django lifecycle hook. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Each statement performs one clear action. Reading flow: Configuration followed by registration logic reads naturally; additional spacing before the class and a meaningful method name would improve readability.