Sample
pyint-939f88f49b68-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.872 | 0–1; higher is more readable |
| Mi | 0.508 | 0–1; higher is more readable |
| LLOC | 33 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs |
| BTTF | 0.729 | 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. | 1816.539 | −59.946 |
| Source linesThe number of non-empty source lines. | 85 | +34 |
| 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.642 | −6.963 |
Intercept 8.87 + feature contributions = -24.039 (log-odds).
Score = sigmoid(-24.039) = 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. | 86 | −2.009 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 71 | +1.719 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 84.938 | +0.777 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.965 | +0.728 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.036 | +0.59 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 94.977 | −0.358 |
Intercept 0.07 + feature contributions = 1.916 (log-odds).
Score = sigmoid(1.916) = 0.872.
| Score | 0.508 |
|---|
| Score | 33 |
|---|
Run 1
The code is very readable. Imports are logically grouped (standard, third-party, local) though slightly verbose. The class and method structure is clear and minimal. Nesting is entirely flat with no control flow. Intent is explicit through type hints, descriptive names, and comprehensive docstrings. The `send` method has a long signature, but it is well-documented and uses clear parameter names. Action granularity is good, with one logical action per line (e.g., `super().__init__()`). Reading flow is natural, moving from imports to class definition to abstract methods. The main minor drawback is the sheer number of imports, which adds length but is necessary and organized.
Run 2
The code is highly readable overall. It has clear separation between imports (grouped stdlib, third-party, and local), a single class with a well-defined purpose, and flat structure with no nested logic. Naming and type hints improve clarity. The long import list is acceptable given the adapter's broad responsibility, though it slightly increases length. Docstrings in the methods explicitly explain parameters and behavior, aiding intent. The code is concise, avoids unnecessary nesting, and flows naturally from imports to class definition to method stubs. Minor deductions arise from the extensive import block and the presence of placeholder methods (which may be fine for an abstract base), which slightly limits immediate actionability.
Run 3
The code is highly readable with clear organization. Imports are logically grouped by source (standard library, third-party, local modules) and alphabetized within groups. Class structure is flat and simple with no complex nesting. Intent is explicitly documented through docstrings and type hints. Action granularity is excellent - each import and method parameter occupies its own line. The code length is appropriate for an abstract base adapter, avoiding unnecessary verbosity. Reading flow is natural, moving from imports to class definition to method stubs. Minor improvements could include consolidating some import statements, but the current format enhances diff readability and prevents merge conflicts. The NotImplementedError raises clearly signal abstract methods, making the contract explicit for subclasses.
Run 1
1. Code Structure: Imports are grouped and the adapter interface is logically organized, though many imports are unused in this excerpt. 2. Nesting: Very flat, with no nested control flow. 3. Clarity of intent: Descriptive method names, type annotations, and docstrings clearly communicate the interface; however, PreparedRequest and _t are not defined or imported in the shown code, making annotations harder to interpret. 4. Code length: Method bodies are concise, but extensive imports and parameter documentation outweigh the small implementation. 5. Action granularity: Each statement performs a single action, and the multiline signature is easy to scan. 6. Reading flow: The progression from imports to class initialization and interface methods is natural, although the long import section delays the relevant code.
Run 2
Code Structure: Imports are grouped and the adapter interface is logically organized, though many imports are unused in this excerpt. Nesting: Methods are flat, with no complex branching. Clarity of intent: Descriptive method names, annotations, and docstrings clearly communicate the interface; however, PreparedRequest and _t are not defined or imported here, making the annotations harder to interpret. Code length: The implementation is concise, but the extensive import list and lengthy send docstring outweigh the small amount of functional code. Action granularity: Each statement performs one action, and multiline signatures improve scanning. Reading flow: The progression from imports to class initialization, sending, and cleanup is natural, although the large import block delays reaching the core interface.
Run 3
Code Structure: Imports and the adapter interface are logically organized, although the extensive import block overwhelms the small class. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive method names, type annotations, and parameter documentation clearly communicate the interface; however, PreparedRequest and _t are not defined or imported in the shown code, making annotations harder to interpret. Code length: The class is concise, but many unused imports and a trivial constructor add unnecessary bulk. Action granularity: Each statement performs a single action, and multiline signatures remain readable. Reading flow: The progression from imports to initialization, sending, and cleanup is natural, though the lengthy imports delay the substantive code and spacing between top-level sections could be improved.