Sample
Scalabrio69
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 16.1Δ 0.8 |
| Scalabrino | 0.26 | 0–1; higher is more readable | 21.6Δ 4.8 |
| Dorn | 0.007 | 0–1; higher is more readable | 2.0Δ 14.8 |
| Mi | 0.013 | 0–1; higher is more readable | 7.0Δ 9.8 |
| LLOC | 20 | Logical lines; fewer is more readable | 25.9Δ 9.0 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 31.4Δ 14.6 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 34.7Δ 17.8 |
| BTTF | 0.272 | 0–1; higher is more readable | 4.0Δ 12.8 |
| Human | 3 | 1–5; original rating | 16.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. | 1340.606 | −44.24 |
| 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. | 5.083 | −7.625 |
Intercept 8.87 + feature contributions = -31.395 (log-odds).
Score = sigmoid(-31.395) = 0.
| Score | 0.26 |
|---|
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. | 203.966 | −4.974 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.126 | −0.282 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 27.785 | −0.021 |
Intercept 0.07 + feature contributions = -4.99 (log-odds).
Score = sigmoid(-4.99) = 0.007.
| Score | 0.013 |
|---|
| Score | 20 |
|---|
Run 1
The code is generally well-structured with clear intent: it tests refresh behavior after an external update. The main issue is the anonymous class in doWork, which increases nesting and adds verbosity. However, indentation is consistent. Naming is clear for the test and local variables. The flow is logical: start transaction, save, flush, simulate external update, refresh, assert. The action granularity is mostly one action per line, but some method chaining and multi-part calls reduce visibility. Line length is acceptable. The lock mode asserts are easy to follow. The HANA-specific skip annotation adds clarity. Overall, the code is readable but could be improved by extracting the anonymous class or using a lambda if the codebase supports it.
Run 2
The code is moderately readable. It follows a logical test structure, with clear actions like opening a session, saving, refreshing, and asserting. However, readability is reduced by an anonymous inner class (lengthy and distracts from the test flow), inconsistent spacing, and a hardcoded SQL string with string concatenation. The conditional assertion and dialect-specific annotation add complexity. Nesting is limited but present. While each line generally performs one action, some lines are overly long. Overall, intent is understandable but could be clearer with extraction of helper methods or constants.
Run 3
The code's structure is logical, but readability suffers from inconsistent formatting, a deeply nested anonymous inner class, and multiple operations within the test method. The purpose is clear—testing refresh behavior—but the SQL construction and work execution obscure the main flow. The anonymous AbstractWork implementation adds nesting and interrupts reading flow, making the test harder to follow. Action granularity is mixed: some lines perform one action, but others bundle setup and execution. The method is not excessively long, but extracting helper methods for the SQL update and work execution would improve clarity. Overall, the code is functional but not highly readable due to nesting, formatting inconsistencies, and mixed abstraction levels.
Run 1
Code Structure: The test is logically organized into setup, database modification, refresh assertions, and cleanup, though phases lack visual separation. Nesting: Mostly flat, with moderate nesting from the anonymous work class and one simple conditional. Clarity of intent: The refresh calls and assertions clearly communicate the behavior under test; terse names such as s and st and the unexplained -3 value slightly reduce clarity. Code length: Reasonably concise, although the long dialect annotation and SQL construction are cumbersome. Action granularity: Most lines perform one action, making individual steps easy to follow. Reading flow: Execution proceeds naturally from session creation to cleanup, but inconsistent spacing and the embedded JDBC callback interrupt the flow.
Run 2
Code Structure: Logically organized as setup, database modification, refresh assertions, and cleanup. Nesting: Limited depth, though the anonymous AbstractWork implementation adds visual complexity. Clarity of intent: The test clearly checks refresh behavior and lock modes; terse names such as s and st and the unexplained -3 value reduce clarity slightly. Code length: Reasonably concise, but the long annotation and SQL construction are cumbersome. Action granularity: Generally one action per line, making individual operations easy to follow. Reading flow: The execution sequence is natural, but inconsistent spacing and limited separation between test phases interrupt scanning.
Run 3
Code Structure: The test is logically organized into setup, database modification, refresh assertions, and cleanup. Nesting: Mostly flat, with moderate nesting from the anonymous work class and one simple conditional. Clarity of intent: The test clearly checks refreshed values and lock modes, although short names such as s and st and the unexplained -3 value reduce clarity. Code length: Reasonably concise, but the anonymous class adds boilerplate and the long annotation and SQL construction hinder scanning. Action granularity: Most lines perform one action; the SQL expression combines several operations but remains understandable. Reading flow: Execution proceeds naturally, though inconsistent spacing and limited visual separation between test phases slightly disrupt readability.