Sample
pyint-19e92b5c90ca-I11
Split eligible integer literals into pairs of short-named intermediate variables
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
The code is highly readable with clear logical organization, minimal nesting, and natural flow. It imports necessary components in a grouped manner, defines a Django AppConfig subclass with clear configuration attributes, and implements the ready() method with one action per line. Each line expresses a distinct intent: connecting signals and registering checks. The code is concise without unnecessary verbosity, and the method names are descriptive enough to convey purpose without comments. The only minor deductions are for potential ambiguity in the sender=self argument and checks.Tags usage for those unfamiliar with Django internals, but this is standard Django boilerplate and remains clear to its target audience.
Run 2
This code is highly readable. The structure is logical, separating imports, class definition, and method implementation. Imports are organized with standard library and Django modules grouped, aliased where appropriate. Nesting is minimal, with only one method defined. The intent is clear—configuring the ContentTypes app and registering checks/signals. Length is concise and appropriate for the purpose. Action granularity is good, with each signal connection or check registration on its own line. Reading flow is natural, progressing from imports to class definition to configuration details. Minor room for improvement could include a brief docstring for the ready method, but overall it's clear and maintainable.
Run 3
The code is well-structured with clear imports and a logical class definition. Imports follow Django conventions, and aliasing the checks module adds clarity. The ready() method is flat, with one action per line, making it easy to scan. Each line's intent is apparent: connecting signals and registering checks. The code is concise without unnecessary verbosity. Minor deductions for slight ambiguity in the signal connections—readers unfamiliar with Django's contenttypes app may need context—and the lack of blank lines between logical groups within ready(). Overall, highly readable and maintainable.
Run 1
Code Structure: Imports, application metadata, and initialization logic are logically organized in a single focused class. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive names clearly convey signal connections and model-check registration, though understanding ready() requires some Django familiarity. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Each statement performs one distinct configuration action. Reading flow: The progression from dependencies to metadata to setup is natural; an additional blank line before the class and separation between signal connections and check registrations would slightly improve readability.
Run 2
Code Structure: Imports, application metadata, and initialization logic are logically organized. Nesting: Only the class and method introduce indentation, with no nested control flow. Clarity of intent: Descriptive names clearly communicate signal connections and model-check registration, though understanding their purpose requires some Django knowledge. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs a single configuration or registration action. Reading flow: Natural progression from dependencies to metadata to initialization; an extra blank line before the class would slightly improve visual separation.
Run 3
Code Structure: Imports, application metadata, and initialization logic are logically organized. Nesting: Minimal, with only a class and its method. Clarity of intent: Descriptive identifiers clearly communicate signal connections and check registration, though understanding their roles requires Django familiarity. Code length: Concise, with no redundant logic. Action granularity: Each statement performs one configuration or registration action. Reading flow: Natural progression from dependencies to metadata to startup behavior. Minor spacing improvements between import groups and before the class would further improve readability.