Sample
pyint-bc3e1eb17b91-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.6 | 0–1; higher is more readable |
| Mi | 0.691 | 0–1; higher is more readable |
| LLOC | 17 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.58 | 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. | 790.827 | −26.097 |
| Source linesThe number of non-empty source lines. | 21 | +8.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.706 | −7.059 |
Intercept 8.87 + feature contributions = -15.887 (log-odds).
Score = sigmoid(-15.887) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 78 | +0.361 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.068 | +0.286 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 22 | +0.257 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 20.823 | −0.119 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
Intercept 0.07 + feature contributions = 0.404 (log-odds).
Score = sigmoid(0.404) = 0.6.
| Score | 0.691 |
|---|
| Score | 17 |
|---|
Run 1
The code is difficult to read due to unclear naming (sql2, par, as2, com, con, sql3, sql4), ambiguous purpose, and inconsistent parameter conventions. The class has no docstring explaining its role, and the method 'as2' gives no hint of what it does or returns. The abbreviation-heavy names and lack of type hints or comments make intent opaque. While the code is short and flat (low nesting), those positives are outweighed by poor naming and structure. The method mixes list comprehension, formatting, and tuple/list conversion in two lines, but the logic is not self-evident. Overall, it reads like legacy or hastily written code where the author's mental model is not conveyed to the reader.
Run 2
The code is difficult to read due to unclear and abbreviated naming (sql2, par, as2, con, sql3, sql4, com). The purpose of the class and method is not evident from the code alone. Action granularity is acceptable, but the reading flow is impeded by ambiguous variable names and a lack of explanatory comments. The structure is simple, but this does little to mitigate the lack of clarity. There is minimal nesting, which is positive, but the method signature and list operations are not self-documenting. Overall, the code requires external knowledge or additional context to understand, and the naming choices actively work against readability.
Run 3
The code is a small class but suffers from unclear naming and ambiguous intent. Structure is logical (imports, class, methods), but 'ExtraWhere' and abbreviations like 'sql2', 'par', 'as2', 'sql3', 'sql4', 'com', 'con' obscure what the class does. The method 'as2' performs string formatting, list construction, and joining in one expression, making it harder to follow. Nesting is minimal, and code length is concise, but readability suffers because the parameters and variable names do not convey meaning. The reading flow is broken by abbreviations and lack of docstrings or type hints. Action granularity is partially mixed, especially in the list comprehension inside 'as2'. The code is not deeply nested or overly long, but clarity of intent is low, which significantly reduces its readability.
Run 1
Code Structure: The small class logically groups SQL fragments, parameters, and rendering, though numerous unused imports add clutter. Nesting: Methods are flat, with only a straightforward list comprehension. Clarity of intent: Parenthesizing and joining SQL fragments is understandable, but names such as sql2, sql3, sql4, par, and as2 obscure meaning; unused com and con parameters also lack explanation. Code length: The implementation is concise, although the import block is disproportionately large. Action granularity: Each statement performs a focused action, and the return expression remains manageable. Reading flow: Initialization followed by rendering provides a natural progression, but vague naming and irrelevant imports interrupt comprehension.
Run 2
Code Structure: A small, logically organized class separates metadata, initialization, and SQL rendering, though numerous unused imports add clutter. Nesting: Flat methods and a simple comprehension are easy to follow. Clarity of intent: The comment and SQL joining reveal the purpose, but names such as sql2, sql3, sql4, par, and as2 obscure meaning; unused com and con parameters also distract. Code length: The implementation is concise, although imports are disproportionate to the functionality shown. Action granularity: Each statement performs a focused action, with only straightforward formatting in the comprehension. Reading flow: Execution proceeds naturally from storing inputs to formatting and joining SQL fragments, but clearer identifiers and cleaner spacing would improve readability.
Run 3
Code Structure: The small class logically groups metadata, initialization, and SQL rendering, but numerous unused imports add clutter. Nesting: The code is flat, with only a straightforward list comprehension. Clarity of intent: ExtraWhere, sqls, and params suggest its purpose, and the comment explains assumptions; however, names such as as2, sql2, sql3, sql4, par, com, and con obscure meaning. Code length: The implementation is concise, though unused imports and unused method parameters reduce focus. Action granularity: Each statement performs one clear action, with no compressed multi-statement lines. Reading flow: Initialization naturally precedes rendering, and the transformation into parenthesized, AND-joined SQL is easy to follow, but inconsistent naming interrupts readability.