Sample
Scalabrio137
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 17.6Δ 0.8 |
| Scalabrino | 0.222 | 0–1; higher is more readable | 18.1Δ 1.3 |
| Dorn | 0.052 | 0–1; higher is more readable | 9.5Δ 7.3 |
| Mi | 0.004 | 0–1; higher is more readable | 2.5Δ 14.3 |
| LLOC | 24 | Logical lines; fewer is more readable | 14.1Δ 2.8 |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs | 19.3Δ 2.5 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 19.6Δ 2.8 |
| BTTF | 0.361 | 0–1; higher is more readable | 7.5Δ 9.3 |
| 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. | 1389.843 | −45.865 |
| Source linesThe number of non-empty source lines. | 34 | +13.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.188 | −7.781 |
Intercept 8.87 + feature contributions = -31.176 (log-odds).
Score = sigmoid(-31.176) = 0.
| Score | 0.222 |
|---|
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. | 218.971 | −5.61 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 219 | +2.729 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 33 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 33 | −0.336 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 34 | −0.167 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 32.845 | +0.049 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.1 | −0.034 |
Intercept 0.07 + feature contributions = -2.895 (log-odds).
Score = sigmoid(-2.895) = 0.052.
| Score | 0.004 |
|---|
| Score | 24 |
|---|
Run 1
The test method has a clear purpose and logical structure with try/catch/finally blocks, but could be more readable. Variables are well-named (sf, mappings, foundIt) and the logic flow is natural. Weaknesses include: multiple actions per line in loop condition (iterateTables() call), raw Iterator types requiring casting, excessive line length in assertion messages that break reading flow, and mixed indentation. The catch block adds overhead by converting exceptions to strings for logging before failing, which obscures intent rather than using fail(e) directly. Nesting is acceptable but could be flat. Overall it's workable but verbose and inconsistent in formatting, preventing higher readability.
Run 2
The code has some positive aspects like logical structure with clear setup-action-assert phases and reasonable granularity, but it suffers from several readability issues. The test method is overly long for a single test with too many responsibilities: configuration, table iteration, assertions, and exception handling. The try-catch-finally block adds nesting and obscures the test's intent. There are mixed indentation styles (spaces vs tabs) that disrupt reading flow. The assertions contain long error messages that make lines excessively lengthy and hard to scan. The boolean flag 'foundIt' requires tracking state through the loop, making the logic less direct. Variable names like 'sf' are not descriptive enough, and magic string constants like 'A_ADDRESS' and 'AEC_address' lack context or explanation. The null initialization of 'sf' and conditional close in finally block could be simplified with try-with-resources.
Run 3
The code has several readability issues. The structure is tangled: try/catch/finally blocks dominate, and the catch block is overly verbose with stack trace printing. Nesting is moderate but the try-catch-finally adds depth. Intent is somewhat unclear — the test's purpose (verifying EJB3 naming strategy produces 'A_ADDRESS') is buried under setup and error handling. Length is excessive for a single test assertion. Multiple actions per line (e.g., config.addAnnotatedClass calls, loop header with iterator and hasNext) reduce clarity. Reading flow is disrupted by inconsistent indentation and mixed concerns: configuration, logging, assertion, and error handling all interleaved. Variable names like 'sf' and 'iter' are cryptic. The for loop could be replaced with a stream or helper method. The test lacks clear arrange-act-assert separation. Overall, it would benefit from extracting setup/teardown into @Before/@After methods, using assertEquals with clearer messages, and simplifying error handling.
Run 1
Code Structure: The test follows a logical setup, inspection, assertion, and cleanup sequence, though exception logging adds boilerplate. Nesting: Moderate nesting from try/catch/finally, a loop, and conditionals remains manageable. Clarity of intent: The test name, naming-strategy configuration, comment, and descriptive assertions clearly explain the expected table naming; generic names such as sf and foundIt reduce precision. Code length: Reasonably compact, but lengthy assertion messages and manual stack-trace formatting make it heavier than necessary. Action granularity: Most statements perform one action per line, although the iterator loop header combines initialization, termination checking, and iteration mechanics. Reading flow: Execution progresses naturally and cleanup is explicit, but inconsistent indentation and spacing, a raw Iterator with a cast, and very long lines interrupt scanning.
Run 2
Code Structure: Setup, table inspection, assertions, and cleanup are logically organized, though exception logging adds clutter. Nesting: Moderate nesting through try/catch/finally, a loop, and conditionals remains manageable. Clarity of intent: The test name, comment, and assertion messages clearly identify the naming-strategy requirement; generic names such as sf and foundIt are less descriptive. Code length: Reasonably concise, but lengthy inline assertion messages and manual exception handling make it heavier to scan. Action granularity: Most lines perform a single action, with conventional loop controls as the main exception. Reading flow: The progression from configuration to verification and cleanup is natural, but inconsistent indentation and spacing, raw Iterator usage, and an explicit cast interrupt readability.
Run 3
Code Structure: Setup, table verification, error handling, and cleanup are logically organized. Nesting: The try block, loop, and conditionals create moderate but manageable nesting. Clarity of intent: The test name, comment, and assertion messages clearly explain the expected naming behavior, though abbreviations like sf and the generic foundIt reduce precision. Code length: Fairly concise, but exception logging adds boilerplate and the long assertion message is cumbersome. Action granularity: Most lines perform one action; the loop header conventionally combines iteration controls. Reading flow: Execution proceeds naturally from configuration to verification and cleanup, but inconsistent indentation and spacing, a raw Iterator with casting, and lengthy inline assertions interrupt scanning.