Sample
Dorn/python/72
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 7.2Δ 32.3 |
| Scalabrino | 0.327 | 0–1; higher is more readable | 23.6Δ 15.9 |
| Dorn | 0.329 | 0–1; higher is more readable | 25.9Δ 13.6 |
| Mi | 0.271 | 0–1; higher is more readable | 26.5Δ 13.1 |
| LLOC | 33 | Logical lines; fewer is more readable | 6.7Δ 32.9 |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs | 55.8Δ 16.3 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 70.8Δ 31.2 |
| BTTF | 0.484 | 0–1; higher is more readable | 40.4Δ 0.8 |
| Human | 3.16 | 1–5; original rating | 39.6 |
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. | 2621.916 | −86.523 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| 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 = -64.617 (log-odds).
Score = sigmoid(-64.617) = 0.
| Score | 0.327 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 50 | +0.992 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 50 | −0.727 |
| 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. | 75.961 | +0.448 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.74 | +0.285 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.119 | −0.21 |
Intercept 0.07 + feature contributions = -0.714 (log-odds).
Score = sigmoid(-0.714) = 0.329.
| Score | 0.271 |
|---|
| Score | 33 |
|---|
Run 1
The code has some readable aspects but also significant issues. The class structure is logical, with test methods clearly named. However, several problems hurt readability: accessing `self.vcalFile.split('\r\n')` repeatedly with different indices is repetitive and unclear without context; the `testProdId` method mixes string formatting with URL parsing in a way that obscures intent; the setup method is long and performs many operations, making it harder to follow; and there is inconsistent spacing and line breaks. The code also ends abruptly mid-method. The nesting is flat, which is good, but the action granularity varies - some lines do too much while others are appropriately granular. Overall, the code would benefit from extracting repeated operations into helper methods and adding more descriptive variable names.
Run 2
The code follows a somewhat consistent structure with clear class-based organization and test method naming conventions. However, readability is hampered by several issues: long lines (e.g., the testProdId assertion with nested string formatting), mixed indentation (e.g., 'return' at the beginning appears misaligned), and multiple actions packed into setup methods without clear grouping. Nesting is generally flat, which helps, but the reading flow is disrupted by verbose initialization and unclear separation of concerns in setUp. Action granularity varies—some methods are concise one-liners, while others bundle several operations. Clarity of intent is adequate in method names but the code lacks explanatory comments or helper methods to break down complex assertions. Overall, the structure is passable for tests, but not highly polished for readability.
Run 3
The code is somewhat readable but has several issues. The structure is fragmented, jumping from one class to another without clear separation, and the first line `return self.fd.getvalue().decode('utf-8')` appears out of context with unusual indentation. Nesting is generally low, which is good, but some methods like `testProdId` are dense and hard to follow due to inline string formatting and slicing. Action granularity is inconsistent: `setUp` has multiple assignment and method-call lines that could be grouped, while other methods are overly concise. The reading flow suffers because the code lacks coherent grouping and the initial return statement seems disconnected. Classes like `VCalendarCommonTestsMixin` are clear, but the overall organization detracts from readability. The code is functional but could benefit from better structure, comments, and more descriptive method names to clarify intent.
Run 1
1. Code Structure: Tests are logically grouped into shared mixins and a dedicated effort test case, although the excerpt starts mid-method and ends with an incomplete class context. 2. Nesting: Methods are flat, with no complex conditional or loop nesting. 3. Clarity of intent: Descriptive method names and straightforward assertions make the testing purpose clear; domain slicing and positional calendar-line checks are less self-explanatory. 4. Code length: Methods are concise, though repeated splitting of calendar text adds minor duplication. 5. Action granularity: Each statement generally performs one clear action; multiline constructors and assertions remain coherent. 6. Reading flow: Setup follows a natural create, register, select, and serialize sequence. Inconsistent spacing, alignment, excess blank lines, and legacy syntax slightly reduce visual consistency.
Run 2
Code Structure: Helpers, shared assertions, and effort-test setup are logically separated into methods and classes, though the excerpt starts mid-method and ends before showing full context. Nesting: Very shallow, with no nested control flow. Clarity of intent: Descriptive method names and straightforward assertions make the testing purpose clear; domain slicing and positional calendar-line checks require some interpretation. Code length: Generally concise, although repeated splitting of the calendar text could be centralized. Action granularity: Each statement performs one main operation, making setup steps easy to follow. Reading flow: Setup progresses naturally from task creation to effort registration, viewer selection, and serialization. Inconsistent spacing, extra blank lines, uneven continuation indentation, and legacy naming conventions slightly reduce readability.
Run 3
Code Structure: Classes and test methods provide logical organization, although the excerpt starts mid-method and relies on external fixtures and inherited helpers. Nesting: Very shallow, making execution easy to follow. Clarity of intent: Descriptive test names and straightforward assertions communicate the calendar-validation purpose; numeric date arguments and domain slicing are less self-explanatory. Code length: Concise overall, though repeated calendar splitting could be extracted into a helper. Action granularity: Statements generally perform one action per line, with sensible wrapping of longer calls. Reading flow: Setup progresses naturally from task creation through effort creation, viewer selection, and output generation. Inconsistent indentation, excess blank lines, tight argument spacing, and legacy naming/style slightly reduce readability.