Sample
Scalabrio162
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 5.0Δ 0.3 |
| Scalabrino | 0.124 | 0–1; higher is more readable | 9.5Δ 4.3 |
| Dorn | 0.168 | 0–1; higher is more readable | 21.6Δ 16.3 |
| Mi | 0.049 | 0–1; higher is more readable | 22.6Δ 17.3 |
| LLOC | 25 | Logical lines; fewer is more readable | 11.8Δ 6.5 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 49.2Δ 44.0 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 53.3 |
| BTTF | 0.39 | 0–1; higher is more readable | 13.6Δ 8.3 |
| Human | 2.67 | 1–5; original rating | 5.3 |
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. | 2025.155 | −66.83 |
| Source linesThe number of non-empty source lines. | 33 | +13.2 |
| 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.21 | −7.814 |
Intercept 8.87 + feature contributions = -52.575 (log-odds).
Score = sigmoid(-52.575) = 0.
| Score | 0.124 |
|---|
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. | 115.939 | −1.246 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 26 | +0.162 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 33 | −0.132 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.074 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 31.239 | +0.027 |
Intercept 0.07 + feature contributions = -1.599 (log-odds).
Score = sigmoid(-1.599) = 0.168.
| Score | 0.049 |
|---|
| Score | 25 |
|---|
Run 1
The code is moderately readable. It has a clear, linear structure and one action per line, with good use of blank lines to group related assertions. Nesting is flat. However, there is notable repetition: setting hints and asserting on hints and cache modes is duplicated for each mode. The intent is understandable—verify mapping between JPA cache hint modes and Hibernate CacheMode—but the test could be clearer with helper methods or parameterized tests. Some lines are long due to verbose constant names and assertions, which slightly reduces readability. Overall, the code is maintainable but verbose.
Run 2
The code is moderately readable but suffers from repetition and verbose assertions. Structure is logical: it sets a cache hint then verifies both JPA and Hibernate internal state. Nesting is flat and action granularity is mostly one action per line, aiding tracing. However, repeated getHints().get(...) calls and extensive enum-based assertions make it long and dense. Clarity of intent is acceptable — it tests cache mode mappings — but the many assertion lines per step obscure the mapping logic. Reading flow is disrupted by long lines and inconsistent assertion grouping. Extracting helper methods or asserting via a dedicated utility would improve readability.
Run 3
The code is logically organized into a sequence of test scenarios with clear intent: each block sets a JPA cache hint and verifies both JPA-level hints and Hibernate-level cache mode. Nesting is minimal, with only the method and cast line. Action granularity is good—most assertions are on separate lines. However, readability suffers from long, repetitive assertion lines with very long setting names, which reduces scanning speed. The cast on line 4 is dense and could be clarified with a helper method. The test lacks comments or helper methods to explain the relationships between JPA hint combinations and Hibernate cache modes. While the structure is flat and concise for a test, the verbosity of the assertions and absence of abstraction prevent a higher score.
Run 1
Code Structure: Setup is followed by logically grouped cache-mode changes and assertions, separated by blank lines. Nesting: The method is flat, with no nested control flow. Clarity of intent: The test name, explicit cache constants, and assertions clearly communicate its purpose; abbreviated variable names and the double cast slightly reduce clarity. Code length: Reasonably concise, though repeated hint checks and long assertion lines add verbosity. Action granularity: Each statement performs one main action, with only the query extraction combining casts and a method call. Reading flow: The consistent set-and-verify pattern reads naturally, but later scenarios depend on earlier state changes, requiring readers to track both cache settings.
Run 2
Code Structure: Setup followed by clearly separated hint-setting and assertion groups provides logical organization. Nesting: The method is flat, with no nested control flow. Clarity of intent: The test name, descriptive constants, and assertions clearly communicate cache-mode verification, although the double cast and cumulative query state require extra attention. Code length: Reasonably concise for the scenarios covered, but repeated hint lookups and assertions add verbosity. Action granularity: Each statement performs one primary action, making individual steps easy to follow. Reading flow: Consistent set-then-assert sequencing and blank lines create a natural flow; brief scenario labels could make the state transitions easier to understand.
Run 3
Code Structure: Setup followed by clearly separated hint-setting and assertion groups provides logical organization. Nesting: The method is flat, with no nested control flow. Clarity of intent: The test name, cache-mode constants, and explicit assertions clearly communicate its purpose; the nested casts and abbreviated hibQuery name slightly reduce clarity. Code length: Reasonably concise, though repeated assertions and long constant names add visual bulk. Action granularity: Each statement performs one primary action, making individual steps easy to follow. Reading flow: Consistent formatting and blank lines create a natural progression through cache-mode changes. However, later checks depend on hints retained from earlier steps, requiring readers to track accumulated state.