Sample
pyint-fc975ca57f2a-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.586 | 0–1; higher is more readable |
| Mi | 0.349 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.652 | 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. | 659.022 | −21.748 |
| Source linesThe number of non-empty source lines. | 20 | +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.584 | −6.876 |
Intercept 8.87 + feature contributions = -11.754 (log-odds).
Score = sigmoid(-11.754) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.058 | +0.376 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 21 | +0.293 |
| 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 | +0.192 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 19.783 | −0.133 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
Intercept 0.07 + feature contributions = 0.346 (log-odds).
Score = sigmoid(0.346) = 0.586.
| Score | 0.349 |
|---|
| Score | 15 |
|---|
Run 1
The code is generally clear and well-structured. The class definition is concise, with logical imports and straightforward attributes. The reset() method registers signal handlers and checks with one action per line, improving readability. However, some ambiguity exists: the parameter 'self' in inject_rename_contenttypes_operations and the reliance on module-level functions without visible context make intent slightly unclear. The method name 'reset' is also somewhat vague about its side effects. Overall, the structure is flat and readable, but minor improvements in naming and documentation would enhance clarity.
Run 2
The code is highly readable. It has a clear logical structure: imports are organized, and the class definition is straightforward. Nesting is minimal, with only one method containing sequential operations. The intent is unambiguous—configuring a Django app and registering checks/signals. Code length is concise and appropriate for its purpose. Action granularity is excellent, with one distinct action per line, enhancing clarity. The reading flow is natural, moving from configuration attributes to a reset method that sequentially connects signals and registers checks. Minor improvements could include adding a docstring to explain the reset method's purpose, but overall this is clean, maintainable code.
Run 3
The code is highly readable. It follows Django conventions with clear imports and a well-structured AppConfig subclass. The structure is logical, grouping imports and class definition. There is no deep nesting; the only method is flat and concise. Intent is immediately clear: this configures content type management. Code length is appropriate and avoids unnecessary verbosity. Each action is on its own line, enhancing granularity. Reading flow is natural, with a progressive setup from configuration to reset behavior. Minor improvement could be a docstring for 'reset', but overall clarity is excellent.
Run 1
Code Structure: Imports, configuration attributes, and registration logic are logically organized in a small class. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive callback names clearly communicate migration and validation tasks, but the method name reset is misleading because it registers signals and checks rather than visibly resetting state. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one clear action. Reading flow: Configuration naturally precedes behavior, and related registrations are grouped together. Minor spacing improvements between imports and the class would improve readability.
Run 2
Code Structure: Imports, application metadata, and registration logic are logically organized within a compact AppConfig subclass. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive names clearly identify signal handlers and checks, though reset is a misleading method name for registration rather than resetting state. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Each statement performs one configuration or registration action. Reading flow: Imports lead naturally into metadata and then behavior; an additional blank line before the class would improve formatting. Understanding the registrations requires some Django familiarity, but the overall code is highly readable.
Run 3
Code Structure: Imports, configuration attributes, and registration logic are logically organized. Nesting: Only a class and a method are nested, making the code easy to scan. Clarity of intent: Descriptive names clarify the signal connections and checks, although reset is a misleading method name for registration rather than resetting state. Code length: Compact, with no unnecessary logic. Action granularity: Each statement performs one configuration or registration action. Reading flow: Imports lead naturally into configuration and setup; an extra blank line before the class would improve conventional formatting.