Sample
pyint-68615458b1fb-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable |
| Dorn | 0.465 | 0–1; higher is more readable |
| Mi | 0.464 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 8.67 | 0–20; mean of three runs |
| BTTF | 0.545 | 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. | 1806.951 | −59.629 |
| Source linesThe number of non-empty source lines. | 126 | +50.4 |
| 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.501 | −6.752 |
Intercept 8.87 + feature contributions = -7.111 (log-odds).
Score = sigmoid(-7.111) = 0.001.
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. | 127 | −3.46 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 125.827 | +1.349 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 108.976 | +0.954 |
| 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. | 109 | −0.952 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 46 | +0.854 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.03 | +0.648 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = -0.139 (log-odds).
Score = sigmoid(-0.139) = 0.465.
| Score | 0.464 |
|---|
| Score | 35 |
|---|
Run 1
The code exhibits poor readability due to inconsistent naming (e.g., `validateAddress`, `refresh`, `date`, `data`, `finalCount`) that obscures intent, suggesting the original Flask `View` class was obfuscated. The logic is tangled: the `refresh` method handles view creation, decoration, and metadata assignment in one long block, mixing concerns. It contains a critical bug (`data` is referenced before definition when `decorators` exist) and a logical error (`self.validateAddress` in the `else` branch should likely be `date.validateAddress`). The method name `refresh` does not convey the purpose of `as_view`. Nesting is moderate but combined with poor naming and mixed responsibilities reduces clarity. The code is not concise for what it accomplishes, and reading flow is disorganized due to semantic mismatches between names and actions.
Run 2
The code has good docstrings and type hints, but suffers from confusing naming and structure. Methods are misleadingly named (validateAddress does dispatch_request's job, refresh does as_view's job). Variables like data, date, step, finalPath, secureClient, finalCount, status, result are ambiguous or unrelated to their purpose. Attributes are set on a function object without clear context. The nested view function, conditionals, and long attribute assignment block reduce readability. Some lines mix multiple actions, and the reading flow is disjointed due to unexplained variable names.
Run 3
The code has significant readability issues. The naming is confusing and misleading: `View.validateAddress` should be `dispatch_request`, `refresh` should likely be `as_view`, and parameter names like `step`, `finalCount`, `secureClient`, `status`, `result`, `date`, and `data` obscure intent. There is a clear bug: `view` references `self.validateAddress` but `self` is not defined in that scope. The class-level documentation references methods and attributes that do not match the implementation. Deep nesting inside `refresh` and inconsistent variable usage make the flow hard to follow. While the structure is somewhat organized, the mismatched naming and undefined references reduce clarity and reliability. The code mixes concerns in one method and has multiple actions per line in several places, further lowering readability.
Run 1
Code Structure: Class attributes and methods are logically grouped, but inconsistent references undermine coherence. Nesting: Conditional branches, nested view functions, and a decorator loop add moderate, manageable nesting. Clarity of intent: Documentation explains class-based views, but references dispatch_request and as_view while the implementation uses validateAddress and refresh. Names such as date, step, and finalCount obscure roles; undefined references including class_args, class_kwargs, self, and data make behavior difficult to follow. Code length: Executable code is reasonably concise, but extensive documentation is partly misleading. Action granularity: Most lines perform one action, although long return expressions and inline type-ignore comments add visual clutter. Reading flow: The overall progression from configuration to view creation and metadata assignment is natural, but switching inconsistently between view and data, and between instance references, repeatedly interrupts comprehension.
Run 2
Code Structure: Class attributes and methods are logically organized, but inconsistent references disrupt coherence. Nesting: Moderate and manageable, with conditional branches, nested view functions, and a decorator loop. Clarity of intent: Severely weakened by misleading names such as refresh, validateAddress, date, and finalCount; documentation describes dispatch_request and as_view instead. Undefined references to class_args, class_kwargs, self, and data make the intended relationships difficult to follow. Code length: Executable code is reasonably concise, but extensive documentation becomes distracting because it contradicts the implementation. Action granularity: Generally one action per line, with a few dense invocation expressions and inline type-ignore comments. Reading flow: The overall progression from configuration to view creation and metadata assignment is natural, but switching between view and data, mismatched argument names, and stale documentation repeatedly interrupt comprehension.
Run 3
Code Structure: Class attributes and methods are logically organized, but inconsistent identifiers disconnect the generated view from decoration and metadata assignment. Nesting: Shallow conditionals and nested functions are manageable. Clarity of intent: Documentation explains class-based views, but names such as refresh, validateAddress, date, and finalCount obscure their roles. References to undefined class_args, class_kwargs, self, and data make the intended execution difficult to follow. Documentation also references dispatch_request and as_view rather than the actual method names. Code length: Implementation is reasonably concise, although extensive documentation becomes distracting because it conflicts with the code. Action granularity: Most lines perform one action, with straightforward assignments and returns. Reading flow: The overall progression from instance creation to decoration and metadata is natural, but mismatched names, unresolved references, and inconsistent naming conventions repeatedly interrupt comprehension.