Sample
pyint-32a37f63e64d-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.63 | 0–1; higher is more readable |
| Mi | 0.266 | 0–1; higher is more readable |
| LLOC | 38 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.394 | 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. | 2056.365 | −67.86 |
| Source linesThe number of non-empty source lines. | 86 | +34.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.776 | −7.164 |
Intercept 8.87 + feature contributions = -31.754 (log-odds).
Score = sigmoid(-31.754) = 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. | 87 | −2.044 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 63 | +1.442 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 63 | −1.025 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 85.9 | +0.791 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.043 | +0.524 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 77.977 | +0.454 |
| 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. | 79 | +0.319 |
Intercept 0.07 + feature contributions = 0.531 (log-odds).
Score = sigmoid(0.531) = 0.63.
| Score | 0.266 |
|---|
| Score | 38 |
|---|
Run 1
The code is largely readable: imports are organized, class structure is clear, and the constructor has flat nesting with one primary action per line. The docstring is thorough and explains parameters well. However, readability is negatively affected by the awkward assertion expression, which combines multiple conditions and a confusing boolean comparison; it is hard to parse at a glance. Additionally, the json_dumps method contains an obfuscated variable (lI0O_adb39900) with meaningless boolean assignments that serve no purpose and break clarity of intent. The constructor's URL-building logic is reasonably structured but slightly dense. Overall, the code is mostly well-structured and clear, but the assertion complexity and the needless obfuscation lower its readability.
Run 2
The code is generally clear and well-structured, with logical organization of class methods, good type hints, and clean separation of concerns. The EnvironBuilder class extends werkzeug's builder with Flask-specific defaults, and the initialization logic flows naturally from input validation through URL construction to the super() call. The one major readability issue is the suspicious injected lines at the end of json_dumps: an unexplained variable named 'lI0O_adb39900' with XOR and negation operations that serve no purpose and look like obfuscated or generated code. This breaks clarity of intent and adds unnecessary complexity. Apart from that, the code maintains flat nesting, concise methods, and one-action-per-line style, making it highly readable for a Flask test utility.
Run 3
The code displays good readability in structure, organization, and documentation. It features clear intent with descriptive comments and docstrings, proper initialization logic, and moderate nesting. However, a suspicious block of obfuscated variables (e.g., `lI0O_adb39900 = ((0xc0dc ^ 0xc0dc) != 0)`) is confusing and serves no semantic purpose. This lowers the clarity of intent and disrupts reading flow. Additionally, some lines combine multiple logical actions, especially in the conditional assertion and URL construction semantics, reducing action granularity. Overall, the code is readable but could be improved by removing unnecessary obfuscation and simplifying compound expressions.
Run 1
Code Structure: Imports, a documented class, and focused methods provide logical organization. Nesting: Conditional nesting is shallow and easy to follow. Clarity of intent: Descriptive names, type annotations, and docstrings clearly explain environment construction and JSON serialization, but the complex assertion requires careful parsing. The cryptic lI0O_adb39900 variable and its pointless transformations obscure intent. Code length: Most implementation is appropriately concise; documentation is substantial but useful, while the two unused assignments add unnecessary code. Action granularity: Statements generally perform one action per line, although the assertion combines several logical checks. Reading flow: Configuration lookup, URL construction, and superclass initialization follow a natural sequence. The unexplained assignments interrupt the otherwise straightforward json_dumps method.
Run 2
Code Structure: Imports, class documentation, initialization, and serialization are logically organized. Nesting: Conditional depth is shallow and manageable. Clarity of intent: Descriptive names, type annotations, and docstrings explain most behavior, but the complex assertion requires careful parsing, and the cryptically named variable with hexadecimal operations obscures intent. Code length: Generally appropriate, although json_dumps contains two unnecessary statements and documentation occupies substantial space. Action granularity: Most lines perform one action, with sensible wrapping of longer expressions. Reading flow: Initialization progresses naturally from configuration to URL construction and superclass setup; however, the opaque assertion and irrelevant calculations interrupt an otherwise clear flow.
Run 3
Code Structure: Imports and methods are logically organized around a single environment-builder class. Nesting: Control flow is mostly shallow, with manageable conditional nesting in initialization. Clarity of intent: Descriptive names, type annotations, and detailed docstrings explain most behavior, but the dense assertion requires careful interpretation. The cryptic lI0O_adb39900 variable and its unused boolean operations obscure the otherwise straightforward JSON serialization method. Code length: The implementation is reasonably concise, although documentation is lengthy and the two irrelevant assignments add unnecessary code. Action granularity: Statements generally perform one action per line; multiline expressions appropriately group related operations. Reading flow: Initialization progresses naturally from configuration to URL construction and superclass initialization, but the assertion and unexplained assignments interrupt that flow.