Sample
Dorn/python/104
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 6.7Δ 1.4 |
| Scalabrino | 0.323 | 0–1; higher is more readable | 23.3Δ 15.2 |
| Dorn | 0.018 | 0–1; higher is more readable | 2.2Δ 5.8 |
| Mi | 0.007 | 0–1; higher is more readable | 2.2Δ 5.8 |
| LLOC | 28 | Logical lines; fewer is more readable | 15.2Δ 7.1 |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs | 34.7Δ 26.6 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 41.4Δ 33.3 |
| BTTF | 0.438 | 0–1; higher is more readable | 30.4Δ 22.3 |
| Human | 2.29 | 1–5; original rating | 8.1 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 2373.986 | −78.342 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.037 | −7.555 |
Intercept 8.87 + feature contributions = -65.027 (log-odds).
Score = sigmoid(-65.027) = 0.
| Score | 0.323 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 138 | −2.18 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.107 | −0.098 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.655 | +0.005 |
Intercept 0.07 + feature contributions = -4.016 (log-odds).
Score = sigmoid(-4.016) = 0.018.
| Score | 0.007 |
|---|
| Score | 28 |
|---|
Run 1
This appears to be auto-generated UI setup code (likely from Qt Designer). The structure is repetitive but logically sequential, with flat nesting and one action per line, which aids readability. However, it lacks clarity of intent due to hardcoded values, ambiguous object names (label_26, spinBoxNics), and unnecessary empty addItem(_fromUtf8("")) calls followed by setItemText, which obscures the actual purpose. The code is unnecessarily long because of translation wrapping and verbose Qt API calls. Reading flow is natural if you understand the pattern, but the mixture of widget configuration and layout placement creates noise. Action granularity is mostly one per line, but the addItem/setItemText pairs are split in a way that reduces clarity. Overall, readable for a generated file but not ideal for human maintenance.
Run 2
The code is autogenerated UI setup code (likely from Qt Designer), which explains its repetitive, verbose nature. Structure is flat and predictable, but readability suffers from extreme repetition, especially when adding combo box items one by one with empty entries followed by setItemText. Intent is somewhat clear only if familiar with Qt patterns; otherwise it is ambiguous. Lines are long due to full qualification and translation calls. Action granularity is mostly one action per line, but the repeated addItem/setItemText pairs obscure the logical grouping. Reading flow is mechanical, not natural. Overall, functional but not human-friendly.
Run 3
The code follows a consistent, mostly flat structure with one action per line, which aids readability. Widget creation and grid placement are logically grouped. However, clarity of intent suffers due to repetitive boilerplate: empty addItem calls with setItemText and verbose translate arguments obscure the purpose. The use of _fromUtf8 with empty strings is redundant and noisy. Variable names like label_26 are auto-generated and not descriptive. Reading flow is mechanical but not natural, mainly because the repeated pattern for combo box items creates visual clutter. Overall, the code is understandable but could be more concise and intention-revealing with helper functions or data-driven item addition.
Run 1
Code Structure: Widget initialization is logically grouped, though there are no helper functions separating setup tasks. Nesting: The code is flat and easy to follow, with no nested control flow. Clarity of intent: Qt method names and NIC option text make the UI purpose clear, but label_26, numeric layout arguments, and the empty retranslateUi method reduce clarity. Code length: Repeated addItem/setItemText calls and lengthy translation expressions create substantial boilerplate. Action granularity: Each line performs one action, making individual operations easy to identify. Reading flow: The create-configure-add sequence is consistent and natural, but minimal spacing between widget groups and repetitive option initialization make scanning harder.
Run 2
Code Structure: Widget creation, configuration, and layout placement are logically grouped, but repetitive setup lacks abstraction. Nesting: The code is flat and easy to follow, with no nested control flow. Clarity of intent: Qt calls and names such as comboBoxNIC clearly indicate UI setup, while label_26, numeric layout arguments, and the empty retranslateUi method provide little context. Code length: Repeated addItem/setItemText pairs and lengthy translation calls make a small configuration unnecessarily verbose. Action granularity: Each statement performs one primary action, making individual steps easy to inspect. Reading flow: The sequence naturally progresses from widget setup to layout placement and initialization, but long lines, repetition, and minimal visual separation reduce scanability.
Run 3
Code Structure: Widget creation, configuration, and layout placement are logically grouped, but repetitive setup lacks abstraction. Nesting: The code is flat, with no nested control flow. Clarity of intent: NIC configuration is apparent from widget names and labels, although label_26, numeric layout arguments, and the empty retranslateUi method reduce clarity. Code length: Repeated addItem/setItemText pairs and verbose translation calls make the snippet unnecessarily long. Action granularity: Each statement performs one clear setup action, making individual steps easy to follow. Reading flow: The sequence naturally progresses through widget setup to final initialization, but long lines and minimal visual separation between widget groups hinder scanning.