Sample

pyint-7a95100d45a7-I03

Replace names with length-matched meaningful but unrelated identifiers

Matched original source

Lines13

Scores

MethodScoreScale
Posnett0.0020–1; higher is more readable
Dorn0.7990–1; higher is more readable
Mi0.480–1; higher is more readable
LLOC11Logical lines; fewer is more readable
DeepSeek V4 Pro17.330–20; mean of three runs
GPT-6.1 Sol16.670–20; mean of three runs
BTTF0.6840–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 parse(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.612−6.917
Source linesThe number of non-empty source lines.13+5.2

Intercept 8.87 + feature contributions = -6.325 (log-odds).
Score = sigmoid(-6.325) = 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.857+1.299
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.393
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.912−0.229

Intercept 0.07 + feature contributions = 1.379 (log-odds).
Score = sigmoid(1.379) = 0.799.

Score0.48
Score11
Run 1

The code is clean and well-structured. It imports only necessary modules, defines a simple AppConfig subclass with clear attributes, and contains a single method with a straightforward signal connection. The nesting is minimal, the intent is clear, and the code is concise. The only minor deductions are for the unused imports (base, get_level_tags, SimpleLazyObject), which slightly reduce clarity and add unnecessary length. Otherwise, the reading flow is natural and actions are discrete.

Run 2

The code is highly readable, concise, and well-structured. It clearly defines a Django AppConfig subclass with a single clear responsibility. Imports are organized and purposeful. The class structure is flat with no nested logic, and the method name 'parse' is slightly ambiguous—it could be renamed to something like 'connect_signals' or 'setup' for clearer intent. Action granularity is appropriate: one connection call per line. Overall, the reading flow is natural and straightforward.

Run 3

The code is highly readable. Structure is logical: imports are grouped by source and specific, and the class is well-organized with clear attributes and a single method. There is no nesting. Intent is clear — this is a Django app config that connects a setting change signal. The method name 'parse' is slightly ambiguous without context, but the body makes the purpose evident. Code length is concise. Each action has its own line, and reading flow is natural. Minor deduction for the vague method name and a potential missing docstring, but overall the code is clean and maintainable.

Run 1

Code Structure: Imports and a small configuration class are logically organized, although several imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class metadata and signal connection are clear, but the method name 'parse' does not describe signal registration, and update_level_tags is not defined or imported in the snippet. Code length: Concise, with little unnecessary code beyond unused imports. Action granularity: Each statement performs one action. Reading flow: Natural progression from imports to configuration to behavior, though an additional blank line before the class would improve visual separation.

Run 2

Code Structure: Imports, application configuration, and a method are logically organized, though several imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class metadata is clear, but the generic method name 'parse' does not explain its signal-registration purpose, and update_level_tags is neither defined nor imported in the snippet. Code length: Short and concise, with unnecessary imports adding minor clutter. Action granularity: Each statement performs one action. Reading flow: Natural top-to-bottom flow, slightly weakened by missing context for the callback and limited spacing before the class.

Run 3

Code Structure: Imports, configuration attributes, and the method are logically organized, though several imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class clearly configures Django messages, but the method name 'parse' does not describe its signal-registration action, and update_level_tags is neither defined nor imported in the snippet. Code length: Short and concise, apart from unused imports. Action granularity: Each statement performs one action. Reading flow: Natural top-to-bottom flow, slightly weakened by the unexplained callback and misleading method name.