Sample
pyint-977cc96b24b2-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.436 | 0–1; higher is more readable |
| Mi | 0.357 | 0–1; higher is more readable |
| LLOC | 84 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.589 | 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. | 4562.741 | −150.57 |
| Source linesThe number of non-empty source lines. | 152 | +60.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.352 | −6.529 |
Intercept 8.87 + feature contributions = -87.429 (log-odds).
Score = sigmoid(-87.429) = 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. | 153 | −4.381 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 138 | +4.036 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 139 | −2.769 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 151.81 | +1.712 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 81.392 | +0.509 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.054 | +0.414 |
| 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. | 82.974 | +0.151 |
Intercept 0.07 + feature contributions = -0.258 (log-odds).
Score = sigmoid(-0.258) = 0.436.
| Score | 0.357 |
|---|
| Score | 84 |
|---|
Run 1
The code is generally well-structured and readable, following Django's typical mixin patterns. It has clear method separation, good docstrings, and flat nesting in most methods. However, there are notable issues: the `get_context_object_name` method contains obfuscated dead code (the `lI0O_bf185fc7` variable manipulation) that serves no purpose and harms clarity. The `paginate_queryset` method has moderately deep nesting with nested try-except blocks. The `get_queryset` method has a slightly complex conditional chain (queryset/model/error) that could be simplified. Variable naming is mostly clear, though `page_size` vs `paginate_by` creates minor confusion. The code is concise overall but the dead code section adds unnecessary length. Reading flow is logical but interrupted by the obfuscated section.
Run 2
The code is overall well-structured and readable, with clear docstrings, flat methods, and straightforward flow. However, it contains an obfuscated dead-code block in get_context_object_name (the lI0O_bf185fc7 variable) that severely hurts clarity and appears to be intentionally confusing or leftover artifact. Aside from that oddity, the code follows Django conventions, has good action granularity, minimal nesting, and is reasonably concise.
Run 3
The code is highly readable with clear logical organization, minimal nesting, and well-defined methods. Each method has a single responsibility, and action granularity is mostly one action per line. Naming is descriptive, and comments/docstrings clarify intent. The main issue is the obfuscated dead code in get_context_object_name (variable lI0O_bf185fc7 with XOR operations), which disrupts reading flow and appears malicious or accidental. Despite this isolated block, the rest of the code follows Django’s readable style and would score 19-20 without that artifact.
Run 1
Code Structure: Well-organized mixin with focused methods separating queryset selection, pagination, and context construction. Nesting: Mostly shallow, though pagination error handling and the injected conditional block add complexity. Clarity of intent: Descriptive method names, configuration attributes, and docstrings clarify purpose; the cryptic lI0O_bf185fc7 variable and pointless bitwise operations obscure get_context_object_name. Code length: Generally appropriate for extensible framework code, but dead code and duplicated context dictionary entries add unnecessary length. Action granularity: Statements generally perform one action per line, with readable multiline calls and dictionaries. Reading flow: Methods follow a coherent progression and use consistent formatting, but the unrelated, unreachable block interrupts otherwise natural logic. Overall, highly readable framework-style code with a conspicuous localized readability defect.
Run 2
Code Structure: Well-organized mixin with focused methods separating queryset selection, pagination, and context construction. Nesting: Mostly shallow, with manageable conditional and exception blocks; the unnecessary nested block in get_context_object_name adds avoidable complexity. Clarity of intent: Descriptive method names, configuration attributes, and docstrings explain most behavior clearly, but the cryptic lI0O_bf185fc7 variable and meaningless bitwise operations obscure intent. Code length: Generally appropriate, though dead code and repeated context dictionary structure add unnecessary length. Action granularity: Statements generally perform one action each, with readable multiline calls and expressions. Reading flow: Methods follow a coherent progression, and formatting is consistent; the injected no-op block interrupts an otherwise natural flow. Framework-specific conventions require some Django familiarity.
Run 3
Code Structure: Well-organized mixin with focused methods and configuration attributes. Nesting: Generally shallow, although the irrelevant nested conditionals in get_context_object_name add complexity. Clarity of intent: Descriptive method names, docstrings, and explicit exceptions make queryset retrieval, pagination, and context construction clear; the cryptic variable and pointless bitwise operations obscure intent locally. Code length: Mostly appropriate for an extensible framework component, but dead code and duplicated context dictionaries add unnecessary length. Action granularity: Statements generally perform one action per line, with readable formatting for longer calls. Reading flow: Methods follow natural procedural sequences, but the obfuscated block interrupts an otherwise coherent flow.