Sample
pyint-6c805c328974-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.448 | 0–1; higher is more readable |
| Mi | 0.517 | 0–1; higher is more readable |
| LLOC | 74 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 4.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 10 | 0–20; mean of three runs |
| BTTF | 0.349 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 5639.33 | −186.098 |
| Source linesThe number of non-empty source lines. | 144 | +57.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.507 | −6.76 |
Intercept 8.87 + feature contributions = -126.388 (log-odds).
Score = sigmoid(-126.388) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 145 | −4.098 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 135 | +3.932 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 135 | −2.677 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 143.833 | +1.601 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 81.283 | +0.507 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.303 |
| 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. | 82.979 | +0.151 |
Intercept 0.07 + feature contributions = -0.21 (log-odds).
Score = sigmoid(-0.21) = 0.448.
| Score | 0.517 |
|---|
| Score | 74 |
|---|
Run 1
The code is difficult to read due to heavily obfuscated naming. Parameters like 'record', 'map', 'cachedUser', 'currentSession', 'currentMessage', and 'currentRequest' obscure their actual roles (widget, relationship, admin_site, permissions). Variable names such as 'node', 'window', 'flag', 'state', and 'score' in methods like 'validateAddress' and 'fetchWindow' make intent ambiguous. Method names (e.g., 'readCache', 'start', 'archive', 'createClient') do not reflect their actual functions, which appear to relate to widget properties and rendering. The class is logically structured and relatively flat, but the pervasive misleading naming and unclear action granularity severely degrade readability. The code is concise in places but confusing overall, requiring significant mental mapping to understand its true behavior.
Run 2
The code severely fails readability criteria. Structurally, the class fundamentally misrepresents Django's RelatedFieldWidgetWrapper with confusing renamed parameters (record/map/cachedUser instead of widget/rel/admin_site), making intent extremely opaque. Method names like validateAddress, fetchWindow, validateRequest, validateBalance, and createClient imply unrelated actions but actually handle URL reversal, context building, and widget delegation. Variable names (node, window, flag, state, score, size, price) are meaningless and misleading. Multiple operations are packed into lines, obscuring logic. The reading flow is disorienting due to semantic disconnect between names and behaviors. Nesting is moderate but the tangled naming and action granularity undermine comprehension. Concise renaming and structural clarity could improve to 15+.
Run 3
This code is severely obfuscated and nearly unreadable. Variable names (record, map, cachedUser, flag, state, score, currentAccount, secureKey, primaryKey) have no semantic relation to their actual purpose, making intent impossible to infer. The class name and docstring suggest Django admin widget functionality, but the actual logic is buried under meaningless aliases. Method names (validateAddress, fetchWindow, readCache, archive, validateBalance, createClient) are misleading and do not describe what the code actually does. Control flow is tangled: a context string construction uses a generator over a hardcoded list, obscuring what URL parameters are. Deep structural issues include excessive nesting and dense multi-purpose methods violating single responsibility. Reading flow is disorganized; one must continuously map fake names to real concepts mentally. Although each line performs roughly one action, the actions themselves are incoherent due to poor naming and abstraction. Overall maintainability and clarity are extremely low.
Run 1
Code Structure: Imports and a single class with focused methods provide reasonable organization, though unused imports add clutter. Nesting: Mostly flat, with simple conditionals and a straightforward comprehension. Clarity of intent: The class docstring and permission attributes help, but misleading names such as cachedUser, validateBalance, fetchWindow, and price obscure actual responsibilities. Mixed naming conventions and shadowing map further hinder understanding. The @choices.setter decorator does not match the archive property, and AutocompleteMixin is undefined in the snippet, disrupting interpretation. Code length: Moderately concise, although numerous trivial forwarding methods and unnecessary imports reduce efficiency of presentation. Action granularity: Most lines perform one action; multiline calls and dictionary construction remain readable. Reading flow: Initialization, properties, URL generation, and context construction follow a sensible sequence, but arbitrary names require readers to repeatedly infer meaning from implementation.
Run 2
Code Structure: The wrapper is organized into an initializer, properties, and focused methods, but the undefined @choices.setter disrupts coherence. Nesting: Mostly flat, with simple conditionals and a straightforward comprehension. Clarity of intent: The class docstring, comments, and permission attributes help, but misleading names such as fetchWindow, validateBalance, record, map, and score obscure widget-related responsibilities; naming conventions are inconsistent. Code length: Reasonably compact, though unused imports add clutter and several forwarding methods provide little explanatory value. Action granularity: Most lines perform one action, and multiline expressions are formatted cleanly. Reading flow: Initialization followed by accessors and rendering-related methods is broadly natural, but arbitrary identifiers, the misplaced setter reference, and unexplained AutocompleteMixin dependency interrupt comprehension.
Run 3
Code Structure: Methods separate initialization, context building, and widget delegation logically, but the property/setter naming mismatch (@choices.setter on archive) disrupts coherence. Nesting: Mostly flat, with simple conditionals and a shallow comprehension. Clarity of intent: The class description and permission attributes help, but misleading names such as cachedUser, fetchWindow, validateBalance, and score obscure their actual roles; mixed naming styles add friction. Code length: Reasonably concise, although numerous unused imports and repetitive delegation methods introduce noise. Action granularity: Generally one action per line, with multiline expressions formatted clearly. Reading flow: Initialization and context construction follow a sensible sequence, but readers must repeatedly translate unrelated variable names into Django concepts, and the inconsistent property definitions interrupt comprehension.