Sample
Scalabrio188
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 24.1Δ 42.0 |
| Scalabrino | 0.435 | 0–1; higher is more readable | 39.7Δ 26.4 |
| Dorn | 0.646 | 0–1; higher is more readable | 71.9Δ 5.8 |
| Mi | 0.62 | 0–1; higher is more readable | 83.9Δ 17.8 |
| LLOC | 25 | Logical lines; fewer is more readable | 11.8Δ 54.3 |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs | 33.4Δ 32.7 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 7.5 |
| BTTF | 0.58 | 0–1; higher is more readable | 65.8Δ 0.3 |
| Human | 3.89 | 1–5; original rating | 66.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. | 1378.702 | −45.497 |
| Source linesThe number of non-empty source lines. | 41 | +16.4 |
| 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.805 | −7.207 |
Intercept 8.87 + feature contributions = -27.434 (log-odds).
Score = sigmoid(-27.434) = 0.
| Score | 0.435 |
|---|
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. | 63 | +0.997 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.142 | −0.435 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 32 | −0.313 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 30 | +0.301 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 37 | −0.274 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 39.25 | +0.139 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 57.146 | +0.118 |
Intercept 0.07 + feature contributions = 0.602 (log-odds).
Score = sigmoid(0.602) = 0.646.
| Score | 0.62 |
|---|
| Score | 25 |
|---|
Run 1
The code has clear intent with good comments explaining revision scenarios and uses consistent patterns for each transaction block. However, several issues reduce readability: repetitive transaction boilerplate (begin/commit/find) obscures the core actions, mixed indentation (tab on @Test line), and multiple actions per conceptual step. The null handling and entity state comments are helpful but could be more concise. The flat structure avoids deep nesting, but the repeated find/update pattern creates visual clutter. Better extraction of transaction logic or helper methods would improve clarity and reduce the ~80 lines to a more readable form.
Run 2
The code is logically organized and clearly demonstrates a test data initialization sequence with comment markers for each revision. It uses a flat structure with minimal nesting, and each transaction is distinctly separated, which improves readability. However, it suffers from repetitive blocks that inflate length, and the repeated `em.find` calls after `persist` are somewhat redundant. The variable names like `c3_1` and `ele1` are cryptic and reduce clarity of intent. The comment style is inconsistent and some comments like `// Revision (still 1)` are vague. Overall, the code is understandable but could be improved with helper methods, better naming, and fewer duplicated transaction patterns.
Run 3
The code has a clear overall purpose—setting up test data across multiple revisions—but suffers from several readability issues. The structure is repetitive, with the same transaction begin/find/modify/commit pattern repeated five times, making it unnecessarily long. While nesting is flat, the repetitive blocks obscure the logical progression of revisions. Variable names like 'c3_1' and 'c3_2' are ambiguous and give no indication of what they represent. The comments are helpful but inconsistent—some describe revisions while one says '(still 1)' which is confusing. The action granularity is generally good, with one meaningful operation per line, but the entity manager re-fetching in every block adds noise. The reading flow is choppy because each revision block looks nearly identical, forcing the reader to carefully compare each block to spot differences. Better extraction of the repetitive transaction pattern into a helper method would dramatically improve readability.
Run 1
Code Structure: Clearly separated transaction blocks organize the test into sequential revision scenarios. Nesting: The method is flat, with no nested branches or loops. Clarity of intent: Revision comments explain each operation and its expected effect, although the initial reference to 'both collections' is confusing because only one collection is shown. Abbreviated identifiers such as ele1 and c3_1 also require external context. Code length: Reasonably concise, though repeated transaction and entity-loading boilerplate adds length. Action granularity: Each statement performs a single main action, making changes easy to follow. Reading flow: Chronological progression, consistent formatting, and blank lines support natural reading; the awkward 'Revision (still 1)' wording slightly interrupts it.
Run 2
Code Structure: Clearly separated transaction blocks organize the test into logical revision stages. Nesting: Flat execution with no nested conditionals or loops makes it easy to follow. Clarity of intent: Revision comments explain each collection operation, though names such as ele1 and c3_1 are cryptic, initData is generic, and the first comment mentions two collections while only one is shown. Code length: Reasonably concise, although repeated transaction and entity-loading statements add boilerplate. Action granularity: Each statement performs one main action, keeping operations distinct. Reading flow: Chronological revisions, consistent formatting, and blank lines create a natural reading sequence; repetitive setup slightly obscures the meaningful differences between stages.
Run 3
Code Structure: Clearly separated transaction blocks organize the test into sequential revisions. Nesting: Flat, with no nested control flow. Clarity of intent: Revision comments explain each collection change, though names such as ele1 and c3_1 are cryptic, and the first comment mentions two collections while only one is shown. Code length: Reasonably concise, but repeated begin/find/commit sequences add boilerplate. Action granularity: Each statement performs one primary action, making individual operations easy to follow. Reading flow: Chronological ordering, consistent formatting, and blank lines support a natural reading flow. Overall, the code is highly readable, with minor weaknesses in naming, comment accuracy, and repetition.