Sample
Dorn/python/110
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 54.3Δ 31.5 |
| Dorn | 0.925 | 0–1; higher is more readable | 96.7Δ 73.8 |
| Mi | 0.514 | 0–1; higher is more readable | 54.6Δ 31.8 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.6Δ 65.7 |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs | 15.3Δ 7.5 |
| GPT-6.1 Sol | 11.67 | 0–20; mean of three runs | 16.9Δ 6.0 |
| BTTF | 0.514 | 0–1; higher is more readable | 48.2Δ 25.3 |
| Human | 2.84 | 1–5; original rating | 22.8 |
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. | 673.653 | −22.231 |
| Source linesThe number of non-empty source lines. | 29 | +11.6 |
| 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.494 | −6.741 |
Intercept 8.87 + feature contributions = -8.501 (log-odds).
Score = sigmoid(-8.501) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.011 | +0.834 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 81.9 | +0.517 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 7 | −0.495 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 81.867 | +0.198 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.289 | −0.014 |
Intercept 0.07 + feature contributions = 2.508 (log-odds).
Score = sigmoid(2.508) = 0.925.
| Score | 0.514 |
|---|
| Score | 3 |
|---|
Run 1
The code is highly ambiguous and lacks clear structure. It appears to be a list containing two multi-line strings, but the second string is malformed (likely missing a closing quote and has inconsistent escaping). The strings are not clearly delimited, making parsing difficult. The nested quotes and escaped characters add to the confusion. The code's purpose is unclear: it looks like test data for some documentation processing, but no context is provided. The trailing comma inside the list and the blank line before the closing bracket are misleading. The final 'if __name__' block is trivial and disconnected from the data. Overall, the code is hard to read due to poor formatting, unclear intent, and potential syntax errors.
Run 2
The code is difficult to read due to poor structure and lack of clarity. The list element contains a triple-quoted string that mixes test input and expected output without clear separation or labeling, making the intent ambiguous. The string itself is very long and includes embedded newline characters and escape sequences (e.g., \n\), which reduces readability and flow. There is no logical organization, no meaningful variable names, and the code ends abruptly with an unused import and an empty main block, leaving the purpose unclear. Nesting is minimal but the overall layout is tangled and disorienting.
Run 3
The code lacks clear structure and intent. It appears to be test data embedded directly in a list, but the purpose is ambiguous without surrounding context. The string content mixes multiple languages and formatting, making it hard to parse visually. There is minimal nesting, but the long multi-line strings hurt readability. The code length is moderate but inefficiently organized. Action granularity is poor, as multiple test scenarios are crammed into one list literal. Reading flow is disrupted by the inconsistent indentation and mixed content types. The `if __name__ == '__main__':` block imports unittest without using it, adding confusion. Overall, the snippet is difficult to understand at a glance.
Run 1
Code Structure: The apparent input/expected-output fixture is logically paired, but the extra closing bracket and lack of surrounding context make its organization unclear. Nesting: Python nesting is shallow; indentation in the document representation helps communicate hierarchy. Clarity of intent: The strings suggest a test of French directive handling and English role fallback, but no variable name or actual test identifies their purpose explicitly. Code length: The excerpt is reasonably concise, although most of it is fixture content. Action granularity: Each structural element generally occupies its own line, with no compressed executable actions. Reading flow: Input followed by expected output is natural, but escape sequences, abrupt closing delimiters, and a main guard containing only an import interrupt the flow and make the excerpt appear incomplete.
Run 2
Code Structure: The apparent test input/expected-output pair is recognizable, but missing surrounding context and an extra closing bracket make the organization unclear. Nesting: Python nesting is minimal; indentation in the expected document helps convey its hierarchy. Clarity of intent: The strings suggest a test of a French substitution directive using an English superscript-role fallback, but there are no descriptive variable names or test assertions. Code length: The snippet is reasonably concise, although the main guard only imports unittest and provides no visible execution. Action granularity: Statements are simple and separate, while multiline strings appropriately represent test data. Reading flow: Input followed by expected output is natural, but escape sequences, unmatched surrounding syntax, and the disconnected main guard interrupt comprehension.
Run 3
Code Structure: The paired input and expected-output strings suggest a test fixture, but absent surrounding context and an apparently unmatched closing bracket make the organization unclear. Nesting: Python nesting is minimal; indentation within the document string clearly represents its hierarchy. Clarity of intent: The content suggests testing a French substitution directive with an English superscript-role fallback, but no variable name, assertion, or test function explains this explicitly. Code length: The snippet is reasonably concise, although the verbose expected output dominates it. Action granularity: There are no crowded executable statements, but multiline strings and escape sequences require careful interpretation. Reading flow: Input followed by expected output is natural, yet the abrupt closing brackets and main guard containing only an import make the snippet feel incomplete.