Sample
pyint-b0f0a03876f9-I01
Remove comments and docstrings
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.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.683 | 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.59 | −6.885 |
Intercept 8.87 + feature contributions = -11.763 (log-odds).
Score = sigmoid(-11.763) = 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
Clear structure with logical imports and a focused class definition. Nesting is minimal, and intent is clear: register signals/checks during app readiness. Concise and maintains one action per line, enhancing readability. The flow is natural, importing external functions before use. Only minor deductions for reliance on Django-specific patterns.
Run 2
The code is clear, concise, and well-structured. Imports are correctly grouped and alphabetized: standard library and third-party modules at the top, followed by a relative import from the local management module. The class definition is straightforward, inheriting from AppConfig and setting its attributes in a logical order. The methods are minimal and focused; the ready() method performs exactly three distinct actions, each on its own line, without unnecessary nesting or branching. The reading flow is natural: setup attributes first, then signal and checks registration in readable order. The names of functions and variables clearly convey their purpose, enhancing intent. No redundant or verbose code exists, and the structure remains flat and maintainable. Overall, this is an excellent example of readable Django configuration code.
Run 3
The code is highly readable. It has a clear logical structure with imports grouped and ordered. Nesting is minimal. Intent is explicit through descriptive function names like 'inject_rename_contenttypes_operations' and 'create_contenttypes'. The class definition is concise with clear attributes. Each action in the ready method is on its own line, maintaining good granularity. The reading flow is natural, moving from imports to config definition to method logic. Minor deductions for the slightly long function name and the repeated 'checks' argument pattern, but overall this is excellent Django app config code.
Run 1
Code Structure: Imports, app metadata, and initialization logic are logically organized. Nesting: Only a class and method introduce nesting; there are no complex branches. Clarity of intent: Descriptive names clearly communicate migration signal connections and model-check registration, though understanding their behavior requires Django knowledge. Code length: Compact, with no unnecessary logic or repetition. Action granularity: Each statement performs one distinct configuration or registration action. Reading flow: Natural progression from dependencies to configuration to startup behavior. Minor spacing improvements, such as separating local imports and adding another blank line before the class, would improve visual organization.
Run 2
Code Structure: Imports, application metadata, and initialization logic are logically organized. Nesting: Only a class and its method introduce indentation, keeping the code shallow. Clarity of intent: Descriptive names clearly communicate migration signal connections and model-check registration, though understanding ready() requires Django familiarity. Code length: The implementation is concise without unnecessary statements. Action granularity: Each statement performs a single assignment, connection, or registration. Reading flow: The code proceeds naturally from dependencies to configuration and startup behavior. Minor formatting improvements, such as separating the relative import group and adding another blank line before the class, would improve visual organization.
Run 3
Code Structure: Imports, configuration attributes, and initialization logic are logically organized in a single focused class. Nesting: Minimal nesting, with only a class and its method. Clarity of intent: Descriptive names clearly communicate content-type configuration, migration hooks, and model checks, though understanding the registrations requires some Django knowledge. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Each statement performs one configuration or registration action. Reading flow: Natural progression from dependencies to metadata to startup behavior; an additional blank line between imports and the class would slightly improve visual separation.