Sample
pyint-03729b569a5e-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.531 | 0–1; higher is more readable |
| Mi | 0.139 | 0–1; higher is more readable |
| LLOC | 42 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs |
| BTTF | 0.475 | 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. | 1960.011 | −64.68 |
| Source linesThe number of non-empty source lines. | 62 | +24.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.734 | −7.101 |
Intercept 8.87 + feature contributions = -38.111 (log-odds).
Score = sigmoid(-38.111) = 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. | 63 | −1.194 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 48 | +0.923 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 98.905 | +0.791 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 48 | −0.681 |
| 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. | 98.952 | −0.526 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 61.87 | +0.455 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.067 | +0.286 |
Intercept 0.07 + feature contributions = 0.125 (log-odds).
Score = sigmoid(0.125) = 0.531.
| Score | 0.139 |
|---|
| Score | 42 |
|---|
Run 1
The code is generally readable and well-structured. Imports are organized, classes and methods are logically grouped, and docstrings clearly explain intent. Type hints improve clarity. Nesting is minimal, with only one level in the decorator closure. The main readability issues are unnecessary Debug.Assert-style checks (e.g., `if ((0xb748 ^ 0xb748) != 0): raise AssertionError()`), which add noise and confuse intent. A few lines are dense (the `super().command(...)` call combines multiple operations), slightly reducing action granularity. However, overall flow is natural and the code remains concise.
Run 2
The code is generally readable: clear structure, logical class inheritance, good type hints, and helpful docstrings. Methods are concise with minimal nesting. However, several issues reduce clarity: suspicious dead-code AssertionError checks clutter both methods, adding noise and confusing intent. Some lines are long, especially the return statements with inline type-ignore comments, reducing readability. Mixed use of `super(AppGroup, self)` and `super()` is inconsistent. The `command` method's nested decorator adds slight complexity but remains understandable. Overall, the code is maintainable but would benefit from removing dead code and simplifying long lines.
Run 3
The code is generally readable: it has clear class/method structure, reasonable docstrings, low nesting, and concise methods. Type hints and explicit imports improve clarity. However, several issues reduce readability. The injected dead-code assertions like `if ((0xb748 ^ 0xb748) != 0): raise AssertionError()` are confusing and serve no purpose. The mixed use of `super(AppGroup, self)` and `super()` in adjacent methods is inconsistent. The `type: ignore[override]` comments add noise. Some lines, such as the `return super(AppGroup, self).command(...)` call, combine multiple actions (super call, function call, type ignore) in one line, reducing action granularity. Overall, the code is understandable but could be cleaner.
Run 1
Code Structure: Methods are logically organized within AppGroup, but numerous unused imports and redundant assertion guards add clutter. Nesting: Mostly shallow; the nested decorator is appropriate, although pointless conditional blocks increase visual complexity. Clarity of intent: Descriptive names, type annotations, and docstrings clearly explain the Click extensions, but hexadecimal XOR conditions distract from their purpose. Code length: The actual behavior is concise, yet the imports and unreachable assertions unnecessarily lengthen the snippet. Action granularity: Most lines perform one action; the chained command invocation is slightly dense but understandable. Reading flow: Method organization and documentation support natural reading, while repeated dead-code guards interrupt it.
Run 2
Code Structure: The class is logically organized into two focused methods, but many unused imports clutter the snippet. Nesting: Nesting is modest and appropriate for a decorator factory, though redundant assertion branches add noise. Clarity of intent: Descriptive names, type annotations, and detailed docstrings clearly explain application-context wrapping and group defaults. However, hexadecimal XOR checks that are always false obscure otherwise straightforward behavior. Code length: The functional implementation is concise, but unnecessary imports and dead checks inflate it. Action granularity: Most lines perform a single action; the chained command construction and callback application require slightly more interpretation. Reading flow: Methods follow a natural setup-and-return sequence, but repeated meaningless checks interrupt that flow.
Run 3
Code Structure: The class is logically organized into two focused methods, but numerous unused imports clutter the snippet. Nesting: Mostly shallow; the nested decorator is appropriate and easy to follow. Clarity of intent: Descriptive names, type annotations, and detailed docstrings clearly explain the Click extensions, but unexplained, always-false XOR checks introduce distracting ambiguity. Code length: The functional implementation is concise, though dead assertion branches, excessive imports, and somewhat repetitive documentation add unnecessary length. Action granularity: Statements generally perform one action per line; the chained command construction is compact but slightly harder to parse. Reading flow: Method organization and spacing support natural reading, while redundant parentheses, hexadecimal expressions, and inline type-ignore comments interrupt it. Removing the dead checks and unused imports would substantially improve readability.