Sample
pyint-ea288579ef2d-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.663 | 0–1; higher is more readable |
| Mi | 0.527 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs |
| BTTF | 0.248 | 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. | 1517.802 | −50.087 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| 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.672 | −7.008 |
Intercept 8.87 + feature contributions = -28.225 (log-odds).
Score = sigmoid(-28.225) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 47 | +0.889 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 47 | −0.658 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.922 | +0.598 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.852 | +0.287 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.068 | +0.28 |
| 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. | 86.98 | −0.019 |
Intercept 0.07 + feature contributions = 0.678 (log-odds).
Score = sigmoid(0.678) = 0.663.
| Score | 0.527 |
|---|
| Score | 28 |
|---|
Run 1
The code starts with a logical structure and clear intent, with LexemeCombinable defining bitwise combination operators in a consistent way. However, readability is severely compromised by the obfuscated variable name 'lI0O_0009bfe0' and the meaningless no-op conditional block in __or__, which appears to be deliberately inserted dead code, creating confusion and violating the principles of clarity and concise expression. The helper method _combine is well factored and reduces duplication, which is positive, but the dead code distracts and obscures the method's otherwise simple logic. Nesting is low and action granularity mostly appropriate, but unnecessary verbosity from the dead block hurts. Overall, the code structure is reasonable, but the unexplained and nonsensical segment makes the intent ambiguous and hurts the reading flow significantly.
Run 2
The code is mostly clear in structure and follows Django conventions, but it contains a suspicious dead-code block (the 'lI0O_0009bfe0' variable with no-op conditions) that severely hurts readability and clarity of intent. Nesting is minimal and action granularity is mostly one action per line. Reading flow is natural for the combinable methods, but the obfuscated dead code interrupts it. The class logic is concise, but the unnecessary extra lines and ambiguous variable name reduce readability. Overall, it is understandable but marred by the confusing dead code.
Run 3
The code shows moderate structure with clear class hierarchy and method separation, but suffers from several readability issues. The nesting is generally flat and action granularity is reasonable, with one main operation per line in most methods. However, the presence of obfuscated dead code in __or__ (the meaningless variable lI0O_0009bfe0 with bitwise operations that serve no purpose) severely damages clarity of intent and reading flow. This appears to be intentionally confusing code that obscures what should be a simple delegation to _combine. The _combine method is clear, and type checking with helpful error message is good practice. The imports are standard and logical. The class docstring is missing, and the comment about 'abusing' operators is informal but informative. Overall, the core functionality is straightforward, but the injected pseudo-malicious code in the middle of a simple method creates a jarring reading experience and raises significant concerns about code quality and intent.
Run 1
Code Structure: The class logically groups combination behavior and operator overloads, but unrelated imports and dead code distract. Nesting: Most methods are flat; __or__ introduces unnecessary nested conditionals. Clarity of intent: Constants, method names, type validation, and the explanatory comment clarify logical combination, while the obfuscated variable and pointless bitwise operations obscure __or__. Code length: Core methods are concise, but unused imports and the unreachable conditional block add unnecessary length. Action granularity: Statements generally perform one action per line, although the compound bitwise condition requires extra interpretation. Reading flow: The progression from shared combination logic to operator wrappers is natural, but the anomalous block interrupts otherwise consistent, straightforward reading.
Run 2
Code Structure: Imports and a focused class provide logical organization, but unrelated dummy logic disrupts __or__. Nesting: Most methods are flat; the unnecessary nested conditionals in __or__ add complexity. Clarity of intent: Descriptive method names, constants, a helpful comment, and a clear error message explain lexeme combination, while the cryptic variable and bitwise arithmetic obscure intent. Code length: Operator wrappers are concise, but unused imports within this snippet and dead code add clutter. Action granularity: Each statement generally performs one action per line. Reading flow: The consistent operator-method pattern reads naturally, except for the distracting block before __or__ delegates to _combine.
Run 3
Code Structure: The class logically groups combination logic and operator overloads, though several imports appear unrelated to this excerpt. Nesting: Most methods are flat; __or__ introduces unnecessary nested conditionals. Clarity of intent: Descriptive method names, constants, validation, and comments clarify logical combination, but the opaque variable lI0O_0009bfe0 and pointless bitwise arithmetic obscure intent. Code length: Generally concise, except for the redundant block in __or__, whose initial value is always zero and whose branch cannot execute. Action granularity: Statements mostly perform one action per line, although the nested bitwise condition is needlessly complex. Reading flow: The helper followed by parallel operator methods provides a natural progression, but the anomalous block disrupts that otherwise consistent pattern.