Sample
pyint-9fd667c9d00e-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.874 | 0–1; higher is more readable |
| Mi | 0.53 | 0–1; higher is more readable |
| LLOC | 40 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.499 | 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. | 2149.209 | −70.924 |
| Source linesThe number of non-empty source lines. | 60 | +24 |
| 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.337 | −6.506 |
Intercept 8.87 + feature contributions = -44.56 (log-odds).
Score = sigmoid(-44.56) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 57 | +1.234 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 61 | −1.123 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 84 | +0.551 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 59.918 | +0.428 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.069 | +0.271 |
| 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. | 83.951 | +0.109 |
Intercept 0.07 + feature contributions = 1.938 (log-odds).
Score = sigmoid(1.938) = 0.874.
| Score | 0.53 |
|---|
| Score | 40 |
|---|
Run 1
The code demonstrates poor readability due to ambiguous variable names like a, b, c, d, e in __init__ and f, g, h, i in methods, obscuring intent. While the structure is logical and nesting is minimal, the one-letter parameters require readers to infer meaning from context rather than explicit naming. The code includes unnecessary 'if x is not None' checks that could be simplified using default parameter values, adding length. Action granularity is mostly one action per line, but the boolean logic line 'h = g if self.inverse_match else not g' combines operations. Reading flow is natural when docstrings exist, but documentation is sparse overall. The example is short enough to understand, but variable naming severely hampers maintainability and clarity.
Run 2
The code has severe readability issues. The RegexValidator class uses cryptic one-letter parameter names (a, b, c, d, e, f, g, h, i) which completely obscure the purpose of each argument - impossible to understand what each parameter represents without reading the entire class. The __init__ method has a confusing pattern of conditional assignments that obscures intent. The __call__ method uses meaningless variables 'g' and 'h' to store match results and boolean logic, making the validation logic difficult to trace. The class-level docstring is adequate but sparse. Action granularity is reasonable (mostly one action per line) and nesting is flat. While the structure follows standard Django validator patterns, the overall readability is compromised by non-descriptive variable names and unclear parameter naming.
Run 3
The code is heavily obfuscated with meaningless variable names (a, b, c, d, e, f, g, h, i), which severely impairs clarity of intent and reading flow. While the structure is logical and flat, the renaming of standard Django parameters (regex, message, code, inverse_match, flags) to single letters makes the constructor and methods confusing. The __call__ method uses unclear variables (g, h) instead of descriptive names like 'match' and 'should_raise'. Action granularity is reasonable, but overall readability is poor because readers must infer meaning from context. The code preserves Django's architecture but sacrifices maintainability through non-descriptive naming.
Run 1
Code Structure: The class is logically organized into defaults, initialization, validation, and equality comparison. Nesting: Shallow conditionals keep the code easy to navigate. Clarity of intent: Descriptive attributes, the validation docstring, and clear error messages explain the purpose, but single-letter parameters and local variables obscure their roles, especially in initialization and inverse-match logic. Code length: The implementation is reasonably concise, although numerous unused imports add clutter and the split initializer signature is unnecessary. Action granularity: Statements generally perform one action per line, and the equality expression is clearly separated into individual checks. Reading flow: Method ordering and consistent formatting support a natural progression, but readers must repeatedly map anonymous variables to meaningful attributes.
Run 2
Code Structure: The class is logically organized into configuration, initialization, validation, and equality methods, though several imports are unused. Nesting: Shallow conditionals and no nested loops make control flow easy to follow. Clarity of intent: Descriptive class attributes and the validation docstring clarify purpose, but single-letter parameters and variables obscure meanings and require tracing assignments. Code length: Mostly concise, although the multiline constructor signature and unused imports add unnecessary clutter. Action granularity: Statements generally perform one action per line; the compound equality expression is sensibly split across lines. Reading flow: Method ordering is natural and formatting is consistent, but cryptic names and the inverse-match conditional slow comprehension.
Run 3
Code Structure: The class logically separates configuration, validation, and equality checks, though unused imports add clutter. Nesting: Shallow conditionals keep control flow easy to follow. Clarity of intent: Descriptive class attributes and the validation docstring explain the purpose, but single-letter parameters and variables obscure their roles, especially in initialization and inverse matching. Code length: The implementation is reasonably concise, although excess imports and the unnecessarily split initializer signature reduce compactness. Action granularity: Statements generally perform one action per line, with no compressed multi-statement logic. Reading flow: Methods follow a natural lifecycle, and formatting is consistent overall; however, readers must repeatedly map anonymous names to meaningful attributes, interrupting comprehension.