Sample

pyint-45f1f4b1f86e-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines13

Scores

MethodScoreScale
Posnett0.0020–1; higher is more readable
Dorn0.7980–1; higher is more readable
Mi0.4910–1; higher is more readable
LLOC11Logical lines; fewer is more readable
DeepSeek V4 Pro3.330–20; mean of three runs
GPT-6.1 Sol15.330–20; mean of three runs
BTTF0.6150–1; higher is more readable

Views

Source code

from django.apps import AppConfig from django.contrib.messages.storage import base from django.contrib.messages.utils import get_level_tags from django.core.signals import setting_changed from django.utils.functional import SimpleLazyObject from django.utils.translation import gettext_lazy as _ class MessagesConfig(AppConfig): name = "django.contrib.messages" verbose_name = _("Messages") def a(self): setting_changed.connect(update_level_tags)

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.408.424−13.478
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.614−6.921
Source linesThe number of non-empty source lines.13+5.2

Intercept 8.87 + feature contributions = -6.329 (log-odds).
Score = sigmoid(-6.329) = 0.002.

Feature contributions

FeatureValueContribution
(log-odds)
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.55.929+1.296
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.14+0.541
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.057+0.388
Indentation frequencyHow rapidly indentation changes from line to line.13−0.287
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.12.86−0.23

Intercept 0.07 + feature contributions = 1.371 (log-odds).
Score = sigmoid(1.371) = 0.798.

Score0.491
Score11
Run 1

The code is relatively short and imports are organized, but readability is severely hindered by unclear naming and a major logical issue. The method name 'a' conveys no intent, making the code impossible to understand without reading the entire function body. Even then, the method attempts to connect a signal to an undefined function 'update_level_tags', which suggests a bug or missing code. The logical organization is also flawed: the class is named MessagesConfig, but the method 'a' does not follow any conventional AppConfig lifecycle method (like 'ready'), so its execution context is ambiguous. Nesting is flat, which is good, but clarity of intent is very poor. Code length is concise, but brevity here works against readability because key information is missing. Action granularity is one action per line, fine, but reading flow is disrupted by the abrupt, unexplained signal connection in an incorrectly named method. Overall, the code is difficult to understand and maintain.

Run 2

The code is nearly unreadable due to a severe clarity issue. The method is named `a`, which gives no indication of its purpose. While the class structure is simple and imports are logically grouped, the action inside `a` uses a callback `update_level_tags` that is not imported or defined in this snippet, making the intent ambiguous. The code is short and not deeply nested, but the meaningless method name and missing context severely hurt readability. Action granularity and structure are acceptable, but clarity of intent is effectively zero.

Run 3

The code is minimal but has serious readability issues. The class method `a` gives no indication of its purpose, violating clarity of intent. The use of a single-letter method name is ambiguous and uninformative. While the structure is mostly flat and logical, with imports organized and one action per line, the method name undermines overall comprehension. The reading flow is disrupted by the cryptic method name and lack of docstring or comments. Additionally, the method appears disconnected from the class's purpose, making the code feel incomplete or accidentally placed. To improve: rename `a` to something meaningful like `register_signal_handlers`, add a brief docstring, and ensure the action is relevant to the config class.

Run 1

Code Structure: Imports and class definition are logically organized, though several unused imports add clutter. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name and attributes are descriptive, but the method name 'a' conveys no purpose, and update_level_tags is not defined or imported in the snippet. Code length: Short and mostly concise, with unnecessary imports. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom flow, slightly weakened by the unexplained method and callback.

Run 2

Code Structure: Imports and the AppConfig subclass are logically organized, though several imports are unused and update_level_tags is not defined or imported in the snippet. Nesting: Minimal and easy to follow. Clarity of intent: The class attributes clearly identify the application, but the method name 'a' does not explain its purpose or when it runs. Code length: Short, with unnecessary imports adding minor clutter. Action granularity: Each line performs one clear action. Reading flow: Natural top-to-bottom progression, but the unexplained callback and vague method name interrupt understanding.

Run 3

Code Structure: Imports and a small configuration class are logically organized, though several imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name and attributes clearly identify a Django messages configuration, but the method name 'a' is uninformative, and update_level_tags is neither defined nor imported in the snippet. Code length: Concise, with little unnecessary code beyond the unused imports. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom organization, although the vague method name and unresolved callback interrupt understanding.