Sample

pyint-ec67d32ee447-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines29

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.7030–1; higher is more readable
Mi0.4910–1; higher is more readable
LLOC19Logical lines; fewer is more readable
DeepSeek V4 Pro4.670–20; mean of three runs
GPT-6.1 Sol130–20; mean of three runs
BTTF0.7020–1; higher is more readable

Views

Source code

import ipaddress import math import re from pathlib import Path from urllib.parse import urlsplit from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.http import MAX_URL_LENGTH from django.utils.ipv6 import is_valid_ipv6_address from django.utils.regex_helper import _lazy_re_compile from django.utils.translation import gettext_lazy as _ from django.utils.translation import ngettext_lazy @deconstructible class MinLengthValidator(BaseValidator): message = ngettext_lazy( "Ensure this value has at least %(limit_value)d character (it has " "%(show_value)d).", "Ensure this value has at least %(limit_value)d characters (it has " "%(show_value)d).", "limit_value", ) code = "min_length" def c(self, e, f): return e < f def d(self, g): return len(g)

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.722.67−23.848
Source linesThe number of non-empty source lines.29+11.6
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.683−7.024

Intercept 8.87 + feature contributions = -10.402 (log-odds).
Score = sigmoid(-10.402) = 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
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.044+0.517
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.76+0.446
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.29+0.266
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.30−0.026
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.28.896−0.006

Intercept 0.07 + feature contributions = 0.861 (log-odds).
Score = sigmoid(0.861) = 0.703.

Score0.491
Score19
Run 1

The code is largely unreadable. It imports many unnecessary modules, suggesting disorganization. The class definition references an undefined BaseValidator, and inherits from it without clarity. The method names 'c' and 'd' are meaningless, and their single-letter parameters ('e', 'f', 'g') reveal nothing about intent. While the structure is flat, the clarity of purpose is severely compromised by cryptic naming and ambiguous logic. The action granularity is acceptable, but the reading flow is disrupted by the mismatch between the meaningful message attributes and the obscure methods. Code length is not excessive, but the brevity comes at the cost of expressiveness. Overall, this appears to be obfuscated or auto-minified code, making it difficult for a human to understand or maintain.

Run 2

The code is mostly unreadable due to several severe issues. The class MinLengthValidator has methods named 'c' and 'd' with meaningless single-letter parameter names (e, f, g), making the intent completely opaque. These methods appear to be wrong implementations for a validator (c returns e < f when it should likely check e < f is True for validation, and d returns len(g) but should probably return the cleaned value). The logic is fragmented into unnecessary methods with cryptic names rather than inline or clearly named validation logic. There is no docstring or comments explaining what the class does or how it differs from Django's built-in validators. The imports are unused except for BaseValidator, indicating dead code. The overall structure is disorganized, with poor naming, unclear purpose, and broken-looking logic, making it difficult to understand or maintain.

Run 3

The code is partially structured with imports organized logically, but the custom methods are severely misnamed ('c', 'd', 'e', 'f', 'g'), making intent unclear and requiring readers to infer behavior from implementation. The class properly uses Django conventions like ngettext_lazy and deconstructible, but inherits from an undefined BaseValidator and references undefined attributes. Nesting is flat and code is concise, but misleading names, deprecated imports (is_valid_ipv6_address, _lazy_re_compile), and unused imported modules (ipaddress, math, re, Path, urlsplit, MAX_URL_LENGTH) obscure rather than clarify purpose. Action granularity is fine per line, but reading flow is broken by ambiguous variable names paired with generic method names. Overall structure is moderate, but clarity of intent and misleading naming severely degrade readability.

Run 1

Code Structure: The validator class logically groups its message, error code, and methods, but numerous unused imports add clutter, and BaseValidator is not defined or imported in the snippet. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name and validation message clearly indicate minimum-length validation, but cryptic method names c and d and parameters e, f, and g obscure their roles. Code length: The class is concise, though the import block is unnecessarily large for the shown functionality. Action granularity: Each statement performs one action, and both methods contain simple return expressions. Reading flow: Imports followed by a decorated class provide a natural progression; however, unexplained abbreviated names interrupt comprehension.

Run 2

Code Structure: Imports and a small validator class are logically organized, although several imports are unused and BaseValidator is not defined or imported in the snippet. Nesting: Very shallow, with only class and method scopes. Clarity of intent: The class name, validation message, and error code clearly indicate minimum-length validation, but method names c and d and parameters e, f, and g obscure their roles. Code length: The implementation is concise, though unused imports add clutter. Action granularity: Each statement performs one action; the multiline message is appropriately formatted. Reading flow: The progression from configuration to comparison and length calculation is natural, but cryptic identifiers and missing superclass context interrupt understanding.

Run 3

Code Structure: The validator class logically groups its message, error code, comparison, and length calculation, but BaseValidator is not defined or imported in the snippet, and numerous imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: MinLengthValidator and the validation message communicate the overall purpose, but methods c and d and parameters e, f, and g obscure their roles. Code length: The implementation is concise, although unnecessary imports add clutter. Action granularity: Each statement performs a single action; the multiline message definition is appropriately formatted. Reading flow: Imports followed by class metadata and methods provide a natural sequence, but cryptic identifiers and the missing base-class context interrupt understanding.