Sample
pyint-2f583f92c5a9-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.489 | 0–1; higher is more readable |
| Mi | 0.302 | 0–1; higher is more readable |
| LLOC | 37 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.523 | 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. | 2041.875 | −67.382 |
| Source linesThe number of non-empty source lines. | 97 | +38.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.627 | −6.94 |
Intercept 8.87 + feature contributions = -26.652 (log-odds).
Score = sigmoid(-26.652) = 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. | 96 | −2.363 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 50 | +0.992 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 96.899 | +0.945 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 50 | −0.727 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 87.98 | +0.615 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.047 | +0.484 |
| 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. | 87.969 | −0.061 |
Intercept 0.07 + feature contributions = -0.044 (log-odds).
Score = sigmoid(-0.044) = 0.489.
| Score | 0.302 |
|---|
| Score | 37 |
|---|
Run 1
The code has clear documentation and logical class structure, which aids understanding intent. However, variable and method names are deliberately cryptic (e.g., 'dum', 'loa', 'res', 'obj2', 'kwa6') making the code much harder to follow. Nesting is shallow, but action granularity suffers in lines like 'return self._app.response_class(self.dum(obj4), mimetype=...)' combining multiple operations. Reading flow is disrupted by repetitive, ambiguous parameters and incomplete method implementations. Documentation partially mitigates but does not overcome the poor readability of core code.
Run 2
The code has reasonable formatting, spacing, and docstrings, but it is severely hurt by obfuscated naming. Method names like `dum`, `dum2`, `loa`, `loa2`, and parameters like `app2`, `obj2`, `obj3`, `kwa`, `kw2`, `kwa3`, etc., hide the intended purpose and undermine clarity of intent. The original concepts (`dumps`, `loads`, `app`, `obj`, `kwargs`, `fp`) are evident, suggesting deliberate distortion. The class docstring is clear, but method bodies and signatures are ambiguous. Structure is linear and nesting is low, aiding readability, but action granularity and reading flow degrade due to unclear naming. Code length is acceptable. Overall, the structure is sound, but the naming makes it hard to understand quickly, landing it at a moderate-low readability score.
Run 3
The code has a clear class-level structure and docstrings, but readability is severely undermined by obscure naming conventions. Method names like 'dum', 'dum2', 'loa', 'loa2', and 'res' are cryptic abbreviations that obscure intent. Parameter names such as 'app2', 'obj2', 'kwa3', 'fp2', and 'kwa5' are meaningless and confusing, despite type hints. The 'prepare' method's logic is moderately readable but the surrounding naming inconsistencies break natural reading flow. Action granularity is generally acceptable, with one operation per line, but the poor naming forces readers to constantly refer back to docstrings. Nesting is flat, which is good, but code length is somewhat inflated by redundant parameter renaming. Overall, the structure is logical but the naming choices make the code difficult to scan and understand without significant effort.
Run 1
Code Structure: Methods are logically grouped in a provider class, with serialization, deserialization, argument preparation, and response creation clearly separated. Nesting: Flat control flow and early returns make the code easy to follow. Clarity of intent: Type annotations and docstrings explain behavior, but abbreviated method names such as dum, loa, and res, plus numbered variables, obscure meaning. Docstrings reference names that differ from actual parameters and methods, creating confusion. App and Response are not defined or imported in the snippet. Code length: Implementations are concise, although extensive documentation dominates the code and several imports are unused. Action granularity: Statements generally perform one clear action per line; composed calls remain simple. Reading flow: The progression from basic operations to response construction is natural, but inconsistent naming and documentation interrupt comprehension.
Run 2
Code Structure: Methods are logically grouped in a single provider class, separating serialization, deserialization, argument preparation, and response creation. Nesting: Shallow conditionals and early returns keep control flow easy to follow. Clarity of intent: Docstrings and type annotations explain the purpose, but abbreviated names such as dum, loa, and res, plus numbered parameters, obscure meaning. Documentation references dumps, loads, and parameter names that do not match the implementation; App and Response are not defined or imported in the snippet. Code length: Implementations are concise, although documentation dominates and several imports are unused. Action granularity: Most lines perform one clear action; nested calls remain simple. Reading flow: The method sequence is natural, but inconsistent naming and documentation mismatches interrupt comprehension.
Run 3
Code Structure: Methods are logically grouped within a single provider class, separating serialization, deserialization, argument preparation, and response creation. Nesting: Shallow conditionals and early returns keep control flow simple. Clarity of intent: Docstrings and type annotations explain the purpose, but abbreviated names such as dum, loa, and res, numbered parameters, and documentation referring to different method and parameter names create confusion. App and Response are also not defined or imported in the snippet. Code length: Implementations are concise, although extensive documentation adds reading overhead. Action granularity: Statements generally perform one clear action per line; nested calls remain manageable. Reading flow: Method ordering is natural and formatting is consistent, but naming inconsistencies interrupt comprehension. Overall, the organization is readable, while unclear identifiers and mismatched documentation significantly reduce clarity.