Sample
Scalabrio166
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 19.6Δ 33.4 |
| Scalabrino | 0.238 | 0–1; higher is more readable | 20.1Δ 32.9 |
| Dorn | 0.203 | 0–1; higher is more readable | 26.6Δ 26.4 |
| Mi | 0.503 | 0–1; higher is more readable | 76.4Δ 23.4 |
| LLOC | 13 | Logical lines; fewer is more readable | 53.0Δ 0.0 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 72.9Δ 19.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 5.5 |
| BTTF | 0.365 | 0–1; higher is more readable | 9.0Δ 44.0 |
| Human | 3.67 | 1–5; original rating | 53.0 |
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. | 1170.824 | −38.637 |
| 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.893 | −7.34 |
| Source linesThe number of non-empty source lines. | 17 | +6.8 |
Intercept 8.87 + feature contributions = -30.307 (log-odds).
Score = sigmoid(-30.307) = 0.
| Score | 0.238 |
|---|
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 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 17 | +0.434 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.13 | −0.319 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 15.918 | −0.187 |
| 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. | 83.941 | +0.11 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 17 | +0.031 |
Intercept 0.07 + feature contributions = -1.369 (log-odds).
Score = sigmoid(-1.369) = 0.203.
| Score | 0.503 |
|---|
| Score | 13 |
|---|
Run 1
The code is moderately readable. It has a clear structure with logical grouping of entity lookups and revision retrievals. Nesting is minimal, which is good. The intent is fairly clear: it tests historical revisions of a set-owned entity. However, readability is hindered by the use of Java 'assert' instead of a testing framework's assertion methods (e.g., JUnit's assertEquals), which is less expressive and can be disabled at runtime. Variable names like 'ed1_id' and 'ing2_id' are abbreviated and ambiguous without context. Action granularity is good—one action per line. The reading flow is natural, but the repetitive revision retrievals could be condensed with a loop or helper method to reduce length. Overall, it is understandable but could be improved with better naming and modern assertion practices.
Run 2
The code is generally readable with clear intent: it retrieves entities and verifies audit history across revisions. Structure is logical, with entity lookups grouped first and assertions following. Nesting is flat, and each line performs a single action. However, readability is reduced by the use of Java's 'assert' keyword instead of a testing framework like JUnit's assertEquals, which is less idiomatic for test code and may be disabled at runtime. Variable names like 'ed1', 'ed2', and 'ing2_id' are concise but somewhat cryptic. The repetition of nearly identical assertion lines could be refactored into a loop, reducing length. Overall, the test is straightforward but could benefit from clearer naming and modern assertion methods.
Run 3
The code is generally readable. Structure is logical: it fetches two entities and five revisions of another, then asserts on each revision's references. Nesting is flat. Intent is clear from the test name and the operations. However, readability is reduced by multiple lines that repeat nearly identical find calls, and repeated assertions comparing to the same set. This could be reduced via helper methods or loops. Variable names like 'ed1', 'ed2', 'ing2_id' are terse but common in tests. Each line contains one action, contributing to good granularity, and the reading flow is natural from setup to verification. Minor issues: dependence on unclear field names and external test utilities slightly reduces clarity.
Run 1
Code Structure: Logically grouped into entity loading, revision retrieval, and assertions. Nesting: Flat, with no nested control flow. Clarity of intent: Clearly checks references across audit revisions, though abbreviations such as ed1 and ing2 and the cryptic test name reduce clarity. Code length: Short overall, but repeated revision retrievals and identical assertions add some redundancy. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom progression, aided by blank lines and consistent formatting.
Run 2
Code Structure: Clearly separates entity loading, revision retrieval, and assertions with blank lines. Nesting: Flat method with no nested control flow. Clarity of intent: The assertions clearly test reference history across five revisions, but abbreviations such as ed1 and ing2 and the opaque test name reduce clarity. Code length: Short and manageable, although repeated retrievals and identical assertions add some redundancy. Action granularity: Each line performs one primary action; inline set construction remains easy to follow. Reading flow: Natural setup-to-verification progression, with revision numbers consistently ordered. More descriptive naming and briefly documenting why revisions 2–5 share the same expected references would improve readability.
Run 3
Code Structure: Clearly separates entity setup, revision retrieval, and assertions with blank lines. Nesting: Flat execution with no nested control flow makes it easy to scan. Clarity of intent: The assertions clearly check reference sets across revisions, though abbreviations such as ed1 and ing2 and the cryptic test name obscure domain meaning. Code length: Short overall, but repeated revision retrievals and identical assertions introduce minor verbosity. Action granularity: Each line performs one declaration or assertion, keeping operations distinct. Reading flow: Follows a natural setup-then-verification sequence, with revisions ordered consistently from 1 through 5.