Sample

pyint-afd4a9c92359-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines62

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.6680–1; higher is more readable
Mi0.6250–1; higher is more readable
LLOC25Logical lines; fewer is more readable
DeepSeek V4 Pro8.670–20; mean of three runs
GPT-6.1 Sol120–20; mean of three runs
BTTF0.4590–1; higher is more readable

Views

Source code

import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils import timezone from django.utils.functional import cached_property from django.utils.translation import gettext as _ from django.views.generic.base import View from django.views.generic.detail import ( BaseDetailView, SingleObjectTemplateResponseMixin, ) from django.views.generic.list import ( MultipleObjectMixin, MultipleObjectTemplateResponseMixin, ) class BaseDateDetailView(YearMixin, MonthMixin, DayMixin, DateMixin, BaseDetailView): """ Base detail view for a single object on a single date; this differs from the standard DetailView by accepting a year/month/day in the URL. This requires subclassing to provide a response mixin. """ def a(self, b=None): """Get the object this request displays.""" c = self.get_year() d = self.get_month() e = self.get_day() f = _date_from_string( c, self.get_year_format(), d, self.get_month_format(), e, self.get_day_format(), ) # Use a custom queryset if provided g = self.get_queryset() if b is None else b if not self.get_allow_future() and f > datetime.date.today(): raise Http404( _( "Future %(verbose_name_plural)s not available because " "%(class_name)s.allow_future is False." ) % { "verbose_name_plural": g.model._meta.verbose_name_plural, "class_name": self.__class__.__name__, } ) # Filter down a queryset from self.queryset using the date from the # URL. This'll get passed as the queryset to DetailView.get_object, # which'll handle the 404 h = self._make_single_date_lookup(f) g = g.filter(**h) return super().get_object(queryset=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.1680.564−55.459
Source linesThe number of non-empty source lines.62+24.8
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.479−6.718

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

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.62−1.159
Indentation frequencyHow rapidly indentation changes from line to line.53+1.096
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.53−0.795
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.84.873+0.565
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.61.93+0.456
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.056+0.401
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.84.952+0.067

Intercept 0.07 + feature contributions = 0.701 (log-odds).
Score = sigmoid(0.701) = 0.668.

Score0.625
Score25
Run 1

The code is poorly readable due to heavy obfuscation. Variable names like 'b', 'c', 'd', 'e', 'f', 'g', 'h' obscure intent, violating 'clarity of intent' and 'reading flow'. The method name 'a' is meaningless. The logic is linear and nesting is minimal, but the structure suffers because the original semantic naming (year, month, day, queryset, date_value, lookup_kwargs) is gone. Action granularity is mostly one action per line, which helps, but the cryptic variables force the reader to reconstruct meaning from context. Code length is reasonable, but the deliberate renaming undermines maintainability and comprehension.

Run 2

The code's structure is logical but suffers from poor naming: parameters, variables, and methods are single-character or abbreviated (a, b, c, d, e, f, g, h), making intent unclear. Though nesting is minimal and flow is linear, the obfuscated names force readers to infer types and purposes. Action granularity is mostly one per line, but the density of unclear operations reduces readability. The method 'a' and parameter 'b' are especially problematic, and the date string construction is compact but hard to follow without descriptive names. Overall, the logic is straightforward but the intentional obfuscation drops readability significantly.

Run 3

The code structure is generally logical, but the use of single-letter variable names (a, b, c, d, e, f, g, h) severely harms clarity of intent and reading flow. The nesting is low, which is good, and action granularity is reasonable, but the ambiguous naming makes the code difficult to understand without deep analysis. The original Django code likely used descriptive names like 'request', 'queryset', 'year', 'month', etc., which would make the logic self-documenting. Here, readers must mentally map what each letter represents, increasing cognitive load. The docstring helps, but it doesn't compensate for the poor variable naming. The code length is acceptable and framework use is standard, but the obfuscated identifiers undermine the otherwise clean structure.

Run 1

Code Structure: The method is logically organized into date extraction, queryset selection, future-date validation, filtering, and object retrieval. Nesting: Only one conditional block keeps nesting shallow. Clarity of intent: The class docstring, comments, and framework calls explain the overall purpose, but the method name 'a' and variables 'b' through 'h' obscure their roles and require repeated tracing. Code length: The implementation is reasonably concise, although several imports are unused in this snippet and the exception formatting occupies substantial space. Action granularity: Statements generally perform one action each, and multiline calls are clearly formatted. Reading flow: Execution proceeds naturally from input extraction to retrieval, but opaque identifiers interrupt comprehension, and comments referring to get_object contrast with the method's actual name.

Run 2

Code Structure: The method follows a logical sequence: parse the date, select a queryset, validate future-date access, filter, and retrieve the object. Nesting: Shallow nesting and a single conditional keep control flow simple. Clarity of intent: The class docstring and comments explain the purpose, but the method name 'a' and variables 'b' through 'h' obscure meaning and require readers to infer their roles. Code length: The implementation is reasonably concise; multiline formatting adds length but improves legibility. Action granularity: Statements generally perform one action per line, with a straightforward conditional expression for queryset selection. Reading flow: Execution proceeds naturally, but opaque identifiers interrupt comprehension, and unused imports and mixins not defined in the snippet add contextual noise.

Run 3

Code Structure: The class and method follow a logical sequence: extract date components, build a date, select a queryset, reject future dates, filter, and retrieve the object. Nesting: Control flow is shallow, with only one conditional block. Clarity of intent: The class docstring, comments, and descriptive helper names explain the purpose, but the method name 'a' and variables 'b' through 'h' obscure important roles and undermine readability. Code length: The method is reasonably concise; multiline formatting improves legibility, though several imports are unused in this snippet. Action granularity: Each statement generally performs one action, with a straightforward conditional expression for queryset selection. Reading flow: Execution proceeds naturally, but readers must repeatedly infer what anonymous variables represent. Inherited mixins and the date-parsing helper require external context.