Sample

pyint-8347cd56af36-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines84

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.870–1; higher is more readable
Mi0.2660–1; higher is more readable
LLOC36Logical lines; fewer is more readable
DeepSeek V4 Pro4.670–20; mean of three runs
GPT-6.1 Sol10.330–20; mean of three runs
BTTF0.50–1; higher is more readable

Views

Source code

from __future__ import annotations import importlib.metadata import typing as t from contextlib import contextmanager from contextlib import ExitStack from copy import copy from types import TracebackType from urllib.parse import urlsplit import werkzeug.test from click.testing import CliRunner from click.testing import Result from werkzeug.test import Client from werkzeug.wrappers import Request as BaseRequest from .cli import ScriptInfo from .sessions import SessionMixin class EnvironBuilder(werkzeug.test.EnvironBuilder): """An :class:`~werkzeug.test.EnvironBuilder`, that takes defaults from the application. :param app: The Flask application to configure the environment from. :param path: URL path being requested. :param base_url: Base URL where the app is being served, which ``path`` is relative to. If not given, built from :data:`PREFERRED_URL_SCHEME`, ``subdomain``, :data:`SERVER_NAME`, and :data:`APPLICATION_ROOT`. :param subdomain: Subdomain name to append to :data:`SERVER_NAME`. :param url_scheme: Scheme to use instead of :data:`PREFERRED_URL_SCHEME`. :param json: If given, this is serialized as JSON and passed as ``data``. Also defaults ``content_type`` to ``application/json``. :param args: other positional arguments passed to :class:`~werkzeug.test.EnvironBuilder`. :param kwargs: other keyword arguments passed to :class:`~werkzeug.test.EnvironBuilder`. """ def __init__( self, b: Flask, c: str = "/", d: str | None = None, e: str | None = None, f: str | None = None, *g: t.Any, **h: t.Any, ) -> None: assert not (d or e or f) or ( d is not None ) != bool(e or f), ( 'Cannot pass "subdomain" or "url_scheme" with "base_url".' ) if d is None: i = b.config.get("SERVER_NAME") or "localhost" j = b.config["APPLICATION_ROOT"] if e: i = f"{e}.{i}" if f is None: f = b.config["PREFERRED_URL_SCHEME"] k = urlsplit(c) d = ( f"{k.scheme or f}://{k.netloc or i}" f"/{j.lstrip('/')}" ) c = k.path if k.query: c = f"{c}?{k.query}" self.app = b super().__init__(c, d, *g, **h) def a(self, l: t.Any, **m: t.Any) -> str: """Serialize ``obj`` to a JSON-formatted string. The serialization will be configured according to the config associated with this EnvironBuilder's ``app``. """ return self.app.json.dumps(l, **m)

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.1933.604−63.809
Source linesThe number of non-empty source lines.84+33.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.689−7.034

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

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.85−1.973
Indentation frequencyHow rapidly indentation changes from line to line.61+1.373
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.83.925+0.763
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.045+0.508
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.77.165+0.441
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
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.78.965+0.321

Intercept 0.07 + feature contributions = 1.9 (log-odds).
Score = sigmoid(1.9) = 0.87.

Score0.266
Score36
Run 1

The code is intentionally obfuscated with one-letter variable names (b, c, d, e, f, g, h) that replace meaningful parameters like app, path, base_url, subdomain, and url_scheme. While the docstring explains the parameters, the actual signature creates a massive disconnect between documentation and implementation, forcing readers to constantly map letters to concepts. The docstring also references parameters like 'base_url', 'subdomain', and 'url_scheme' that don't exist by those names in the signature. Logical operators are densely packed into assertions, and the URL construction uses cryptic intermediate variables (i, j, k, l, m). The method 'a' provides no hint about its JSON serialization purpose. Structure is technically flat but the meaningless naming destroys clarity of intent and reading flow. The code has reasonable organization at the class level, but the variable naming renders it nearly unreadable despite being syntactically valid.

Run 2

The code suffers from severely obfuscated naming conventions where meaningful names like 'app', 'path', 'base_url', 'subdomain', 'url_scheme' are replaced with single letters ('b', 'c', 'd', 'e', 'f'). This makes the intent unclear and forces readers to constantly refer back to documentation. The method 'a' replaces what should be 'json_dumps' or similar, with parameters 'l' and 'm' obscuring 'obj' and 'kwargs'. The URL construction logic uses cryptic intermediate variables ('i', 'j', 'k') and string formatting that's difficult to follow. While the code structure follows logical patterns and nesting is relatively flat, the single-letter variables make it nearly unreadable. The docstrings are helpful but contradict the obfuscated implementation. Action granularity is acceptable with one operation per line, and the reading flow follows a logical sequence, but the naming destroys comprehensibility.

Run 3

The code exhibits several readability issues. Variable names like 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm' are meaningless and force the reader to constantly refer back to the signature. This obscures the intent of the logic. The boolean assertion condition is complex and difficult to parse. The code performs multiple actions within the 'if d is None' block, reducing action granularity. While the structure is mostly linear, the ambiguous naming creates a tangled, disorganized mental model. The docstring is clear, but the implementation deviates from its readability. Overall, the code is overly terse and cryptic.

Run 1

Code Structure: The class is logically organized into initialization and JSON serialization, although many imports are unused in this snippet. Nesting: Mostly shallow, with straightforward conditional blocks. Clarity of intent: The class docstring and type hints provide context, but single-letter parameter, variable, and method names obscure meaning. Documented parameter names also differ from the actual signature, making the documentation harder to apply. The compound assertion requires careful decoding. Code length: The implementation is reasonably concise, though extensive documentation and unused imports add overhead relative to its size. Action granularity: Statements generally perform one action per line, with sensible multiline formatting for longer expressions. Reading flow: The sequence from configuration defaults to URL parsing and superclass initialization is logical, but cryptic identifiers interrupt comprehension and require readers to repeatedly infer each value's role.

Run 2

Code Structure: Imports, class definition, constructor, and serialization method are logically organized. Nesting: Mostly shallow, with straightforward conditional branches. Clarity of intent: Descriptive class documentation and configuration keys help, but single-letter parameters, local variables, and method name obscure meaning; documented parameter names do not match the signature. The compound assertion is particularly difficult to interpret. Code length: Reasonably concise, although extensive documentation contrasts with opaque implementation names. Action granularity: Most lines perform one action, with multiline expressions appropriately grouped. Reading flow: Initialization follows a natural sequence from defaults to URL construction to superclass initialization, but readers must repeatedly infer variable roles, and the method name does not communicate its serialization purpose.

Run 3

Code Structure: Imports and a focused class provide logical organization, but cryptic identifiers weaken it. Nesting: Mostly shallow, with manageable conditionals inside one outer branch. Clarity of intent: The class documentation explains the purpose, but single-letter parameters, locals, and method names obscure their roles; documented parameter names do not match the signature. The compound assertion also takes effort to interpret. Code length: Reasonably concise, although extensive documentation contrasts with the small implementation. Action granularity: Most lines perform one action, with clear separation between configuration lookup, URL parsing, and initialization. Reading flow: Execution proceeds naturally from validation through URL construction to superclass initialization, but readers must repeatedly infer variable meanings, and unusual assertion formatting interrupts comprehension.