Sample
pyint-a204bdcfa83a-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.267 | 0–1; higher is more readable |
| Mi | 0.561 | 0–1; higher is more readable |
| LLOC | 65 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.47 | 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. | 4705.03 | −155.266 |
| Source linesThe number of non-empty source lines. | 167 | +66.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.678 | −7.017 |
Intercept 8.87 + feature contributions = -86.613 (log-odds).
Score = sigmoid(-86.613) = 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. | 168 | −4.912 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 140 | +4.105 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 140 | −2.792 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 166.932 | +1.924 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 101.929 | +0.84 |
| 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. | 101.964 | −0.654 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.055 | +0.406 |
Intercept 0.07 + feature contributions = -1.012 (log-odds).
Score = sigmoid(-1.012) = 0.267.
| Score | 0.561 |
|---|
| Score | 65 |
|---|
Run 1
The code is generally well-structured with clear type annotations and docstrings. However, the `__repr__` method contains obfuscated, meaningless variable names (`lI0O_b7667c3b`, `lI0O_e279fbef`) and dead logic that performs pointless operations, severely reducing clarity of intent and reading flow. The imports and class definition are organized, but this obfuscation pulls the readability score down.
Run 2
The code demonstrates strong readability overall. The class structure is logical, with a clear docstring explaining purpose and parameters, and type annotations enhance clarity. The __init__ method uses sensible defaults and is flat, with minimal nesting. The __repr__ method contains obfuscated variables (lI0O_b7667c3b, lI0O_e279fbef) with an unnecessary loop that reduces clarity and could be simplified to a direct return statement. Imports are well-organized but somewhat extensive, which is typical for compatibility layers. Action granularity is good, with one logical action per line. The reading flow is natural for a request preparation class. The main readability issue is the confusing __repr__ implementation that appears intentionally obfuscated, contradicting the otherwise clean code style.
Run 3
The code is generally readable with clear structure and intent. Class and method definitions are logical, type hints are used extensively, and docstrings explain purpose. The __init__ method is flat with one action per line for defaults and attribute assignments. However, the __repr__ method contains obfuscated variable names (lI0O_b7667c3b) and a pointless loop that reduces clarity. Imports are extensive and organized but add length. Overall nesting is minimal, reading flow is natural, and action granularity is appropriate except in the obfuscated section.
Run 1
Code Structure: The class is logically divided into initialization, representation, and preparation, though many imports are unused in this excerpt. Nesting: Mostly flat, with only simple loops. Clarity of intent: Descriptive attributes, type annotations, and documentation make request construction clear; however, __repr__ contains meaningless bitwise operations and opaque variable names that obscure an otherwise trivial method. Code length: Most implementation is concise, but the extensive import block and pointless __repr__ loop add unnecessary length. Action granularity: Statements generally perform one action per line, except the paired variable initialization in __repr__. Reading flow: Initialization and preparation follow a natural sequence, but the irrelevant computation interrupts that flow. Overall, readable and well documented, with a conspicuous pocket of obfuscation.
Run 2
Code Structure: The class is logically organized into initialization, representation, and preparation, although the extensive imports obscure its focus. Nesting: Mostly flat, with only simple loops, making control flow easy to follow. Clarity of intent: Descriptive attributes, type annotations, and thorough documentation explain request construction well. However, cryptic variables and pointless bitwise operations in __repr__ introduce deliberate ambiguity. Code length: Most class code is appropriate, but the import block and redundant __repr__ calculations add distracting bulk. Action granularity: Statements generally perform one action per line; the combined assignment in __repr__ is a minor exception. Reading flow: Initialization and preparation proceed naturally, while the unrelated computation in __repr__ interrupts an otherwise straightforward flow.
Run 3
Code Structure: The class is logically organized into documented attributes, initialization, representation, and preparation, although the extensive import block distracts from the small implementation. Nesting: Control flow is shallow, with only simple loops. Clarity of intent: Descriptive names, type annotations, and the class docstring clearly explain request construction; however, __repr__ contains meaningless arithmetic and opaque variable names that obscure an otherwise trivial method. Code length: Most implementation is concise, but the unrelated-looking imports and redundant __repr__ loop add unnecessary length. Action granularity: Statements generally perform one action per line, apart from a paired assignment. Reading flow: Initialization and preparation follow a natural sequence, but the obfuscated block interrupts that flow and forces readers to verify that it has no effect on the returned representation.