Sample
pyint-b887252c2834-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.716 | 0–1; higher is more readable |
| Mi | 0.196 | 0–1; higher is more readable |
| LLOC | 24 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.322 | 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. | 1475.085 | −48.678 |
| Source linesThe number of non-empty source lines. | 36 | +14.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.825 | −7.238 |
Intercept 8.87 + feature contributions = -32.646 (log-odds).
Score = sigmoid(-32.646) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 84.892 | +0.565 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.057 | +0.385 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 37 | −0.274 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 35.837 | +0.091 |
| 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.973 | +0.066 |
Intercept 0.07 + feature contributions = 0.925 (log-odds).
Score = sigmoid(0.925) = 0.716.
| Score | 0.196 |
|---|
| Score | 24 |
|---|
Run 1
The code has a clear logical purpose and follows a somewhat structured flow, but it is severely undermined by the presence of obfuscated, meaningless variables and artificial complexity. The block 'lI0O_4ccf0fd3 = 0xb4ae ... if (lI0O_4ccf0fd3 & 1) == 1' serves no functional purpose and makes the intent completely ambiguous. This directly violates the clarity of intent and action granularity criteria. Nesting is relatively flat, and the SQL compilation logic is somewhat readable despite some long lines, but the obfuscation causes the reading flow to be jarring. Code length is acceptable, but the variable names are unacceptable. Overall, the code would be significantly more readable if the dead, obfuscated code were removed and clear variable names were used.
Run 2
The code contains deliberate obfuscation (dead code with meaningless variable name 'lI0O_4ccf0fd3') that severely impacts readability. The structure is mostly linear but the obfuscated block interrupts flow and adds no logical value. Nesting is shallow, which is positive. Clarity of intent is damaged by the mysterious bit manipulation that does nothing useful and the unhelpful variable name. Code length is acceptable, though the obfuscated lines add unnecessary length. Action granularity is reasonable—one logical step per line mostly. Reading flow is disrupted by the dead code located between the comment and the actual logic. Overall, the core SQL generation logic is moderately clear but the injected obfuscation makes the code unreadable and suspicious, dragging the score down significantly.
Run 3
The code has a clear logical structure and reasonable function decomposition, but it is severely compromised by an obfuscated block of meaningless variable assignments involving bitwise operations (lI0O_4ccf0fd3). This dead code destroys readability, obscures intent, and adds unnecessary length. Nesting is moderate and mostly flat, but the try/except/else flow and conditional branching make the control flow slightly harder to follow. The comments are helpful and explain the MySQL-specific rationale, improving clarity of intent. However, the variable names are generally good except for the obfuscated one. Action granularity is mostly one action per line, and reading flow is natural aside from the cryptic block. Removing the obfuscated code would significantly improve the score.
Run 1
Code Structure: The method is logically organized into fallback handling and SQL construction, but unrelated obfuscation interrupts it. Nesting: Mostly flat, with an early return and shallow conditional and exception blocks. Clarity of intent: Descriptive Django APIs and explanatory comments clarify the DELETE optimization; the cryptic lI0O_4ccf0fd3 variable and pointless bitwise operations obscure intent. Code length: The implementation is reasonably compact, except for unnecessary dead-code statements. Action granularity: Statements generally perform one action per line, although the compound bitwise expression increases cognitive load. Reading flow: SQL assembly proceeds naturally from FROM to WHERE to the final return, but the inserted arithmetic breaks that flow. Overall, the functional logic is readable, while deliberate-looking noise materially reduces readability.
Run 2
Code Structure: Imports and a single compiler method are logically organized, but an unrelated obfuscated block interrupts the implementation. Nesting: Shallow conditionals and a straightforward try/except/else keep nesting manageable. Clarity of intent: Descriptive Django APIs and helpful comments explain the DELETE optimization, while the cryptic variable and pointless bitwise operations obscure intent. Code length: The SQL-building logic is reasonably concise, but the redundant variable manipulation adds unnecessary length. Action granularity: Most lines perform one clear action; the compound bitwise expression is harder to parse. Reading flow: The main progression from eligibility checks to SQL assembly and parameter collection is natural, but the unexplained obfuscation disrupts it.
Run 3
Code Structure: The compiler method is logically organized, but an unrelated obfuscated block disrupts it. Nesting: Shallow conditionals and a single try/except/else keep complexity manageable. Clarity of intent: Descriptive SQL-related names and explanatory comments clarify the main purpose; the cryptic variable and pointless bitwise operations obscure intent. Code length: The SQL construction is reasonably concise, but the no-op block adds unnecessary lines. Action granularity: Most lines perform one clear action, although the combined bitwise expression requires extra decoding. Reading flow: The progression from eligibility checks to clause compilation and SQL assembly is natural, but the inserted obfuscation interrupts that flow.