Sample

pyint-29e6ce53d521-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines24

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.7710–1; higher is more readable
Mi0.4610–1; higher is more readable
LLOC18Logical lines; fewer is more readable
DeepSeek V4 Pro50–20; mean of three runs
GPT-6.1 Sol110–20; mean of three runs
BTTF0.4570–1; higher is more readable

Views

Source code

from __future__ import annotations import typing as t from base64 import b64decode from base64 import b64encode from datetime import datetime from uuid import UUID from markupsafe import Markup from werkzeug.http import http_date from werkzeug.http import parse_date from ..json import dumps from ..json import loads class PassDict(JSONTag): __slots__ = () def a(self, c: t.Any) -> bool: return isinstance(c, dict) def b(self, d: t.Any) -> t.Any: # JSON objects may only have string keys, so don't bother tagging the # key here. return {e: self.serializer.tag(f) for e, f in d.items()} tag = to_json

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.719.361−23.739
Source linesThe number of non-empty source lines.24+9.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.025

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

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.76.48+0.43
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.88+0.409
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.067+0.293
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.25+0.151
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.22−0.084
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.23.846−0.077
Indentation frequencyHow rapidly indentation changes from line to line.22+0.024

Intercept 0.07 + feature contributions = 1.216 (log-odds).
Score = sigmoid(1.216) = 0.771.

Score0.461
Score18
Run 1

The code has poor readability due to multiple issues. Variable names are single letters (a, b, c, d, e, f), obscuring intent. Method names 'a' and 'b' provide no information about their purpose. The class name 'PassDict' is somewhat misleading as it appears to serialize dictionaries. The code is incomplete - it references 'JSONTag', 'to_json', and 'self.serializer' which are undefined, making it impossible to understand the full context. While the code is relatively flat with minimal nesting, the cryptic naming conventions and missing context severely impact clarity. The imports appear unused in the shown code. The only positive aspects are the concise structure and the single comment explaining why keys aren't tagged. The code requires significant mental overhead to understand what it actually does.

Run 2

The code has significant readability issues. The class and method names (PassDict, a, b, c, d, e, f) are completely opaque, providing zero indication of intent or purpose. The 'tag = to_json' alias references an undefined name, creating ambiguity. Although the code is concise and flat with one action per line in the comprehension, the brevity comes at the expense of clarity. The import block is reasonably organized, but the method bodies lack contextual comments explaining the serialization logic beyond one brief note. The structure is logical in a minimal sense but fails to communicate what the class actually does. Overall, the code is syntactically simple but semantically unreadable due to poor naming and missing context.

Run 3

The code is nearly unreadable due to meaningless single-letter names (a, b, c, d, e, f), unclear class inheritance (JSONTag is not imported), and a confusing alias assignment (tag = to_json) where to_json is not defined. The method names a and b give no indication of their purpose, and the variable names obscure the intent of the serialization logic. Nesting is limited to a dict comprehension, which is acceptable, but the comprehension packs multiple operations into one line, reducing clarity. The code length is concise but at the expense of readability. The reading flow is disrupted by the lack of descriptive naming and missing imports, making it impossible to fully understand the class without external context. The structure and intent could be clear in a larger context, but as presented, it fails almost all readability criteria.

Run 1

Code Structure: Imports and a small class provide clear organization, though JSONTag and to_json are not defined or imported in the snippet. Nesting: Very shallow, with simple methods and a single comprehension. Clarity of intent: The dict check and recursive value tagging are understandable, aided by the comment, but method names a and b and variables c, d, e, and f obscure their roles. The tag = to_json alias is also unclear without surrounding context. Code length: The implementation is concise, but many imports appear unused in this snippet and add clutter. Action granularity: Most lines express one action; the comprehension compactly combines iteration and tagging without becoming difficult to parse. Reading flow: Generally top-to-bottom and easy to scan, but weak naming, limited spacing around the class, and unexplained dependencies interrupt comprehension.

Run 2

Code Structure: Imports and a small class provide a straightforward organization, but JSONTag and to_json are undefined in the shown snippet, and many imports are unused. Nesting: Very shallow, with a simple comprehension and no nested control flow. Clarity of intent: The dict check and serialization comment help, but method names a and b and variables c, d, e, and f obscure their roles. The relationship between b and tag = to_json is unclear. Code length: The implementation is concise, although unused imports add clutter. Action granularity: Statements generally perform one action each; the comprehension compactly expresses a single transformation. Reading flow: The class is easy to scan, but cryptic naming and the unexplained alias interrupt understanding.

Run 3

Code Structure: The class is logically organized into short methods, but numerous unused imports distract from the implementation. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The dictionary check and value-tagging comprehension are understandable, aided by the comment, but single-letter method and variable names obscure their roles. JSONTag and to_json are not defined or imported in the snippet, making the inheritance and final alias unclear. Code length: The implementation is concise, although imports dominate the snippet. Action granularity: Each line generally performs one action; the comprehension compactly expresses a coherent transformation. Reading flow: The sequence from type checking to serialization is reasonable, but weak naming, limited spacing around the class, and the unexplained alias interrupt comprehension.