Sample
Scalabrio135
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 1.0Δ 4.3 |
| Scalabrino | 0.053 | 0–1; higher is more readable | 4.0Δ 1.3 |
| Dorn | 0.047 | 0–1; higher is more readable | 7.5Δ 2.3 |
| Mi | 0.078 | 0–1; higher is more readable | 30.2Δ 24.9 |
| LLOC | 30 | Logical lines; fewer is more readable | 4.3Δ 1.0 |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs | 66.6Δ 61.3 |
| 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.1Δ 7.8 |
| 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. | 2711.542 | −89.481 |
| Source linesThe number of non-empty source lines. | 37 | +14.8 |
| 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.895 | −7.343 |
Intercept 8.87 + feature contributions = -73.154 (log-odds).
Score = sigmoid(-73.154) = 0.
| Score | 0.053 |
|---|
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 |
| 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. | 105 | −0.782 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 37 | −0.428 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 36 | −0.238 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.119 | −0.218 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 35.519 | +0.087 |
Intercept 0.07 + feature contributions = -3.017 (log-odds).
Score = sigmoid(-3.017) = 0.047.
| Score | 0.078 |
|---|
| Score | 30 |
|---|
Run 1
The test method is logically organized into three clear sections, each testing a different entity/field combination. It uses flat nesting with straightforward assertions and one action per line. However, readability is reduced by excessive repetition of `reader.getAnnotation(...)` calls for the same annotation types, which could be simplified by assigning annotations to local variables. Additionally, some chained method calls (e.g., `reader.getAnnotation(JoinColumns.class).value()[0].name()`) combine multiple operations in a single line, which slightly hinders comprehension. The method is moderately long, but the structure remains understandable due to consistent formatting and clear intent. Overall, the code is quite readable but could benefit from local variable extraction to reduce redundancy and improve clarity.
Run 2
The code is generally readable with a clear purpose: it tests JPA annotation reading from XML mappings. The structure is logical, and each assertion is on one line, which aids scanning. However, readability suffers from significant repetition of `reader.getAnnotation(...)` calls, making lines long and harder to parse. The test method is lengthy and mixes multiple test scenarios (different classes and fields) without helper methods or comments. Nesting is flat, which is good, but the repeated retrieval of the same annotation for each assertion reduces clarity and increases verbosity. Action granularity is mostly one per line, but some assertions combine two actions (get annotation and assert) for complex assertions. Overall, it's understandable but could benefit from extracting local variables for annotations or splitting into smaller test methods.
Run 3
The code is reasonably structured and follows a consistent pattern of field setup, reader creation, and assertions. It reads linearly and each line generally performs one action. However, repeated calls like reader.getAnnotation(...) make lines long and slightly harder to scan. Minor nesting is present only in method signature and context rebuilding, which is acceptable. Intent is clear—testing annotation overrides—but the large number of repeated similar assertions could be extracted for brevity. Overall, understandable but not concise.
Run 1
Code Structure: Three logically grouped test scenarios are separated by blank lines, although separate test methods would improve isolation. Nesting: The method is flat, with no nested control flow. Clarity of intent: Descriptive annotation types and explicit assertions clearly communicate expected behavior, but the broad method name and reused variables make individual scenarios less distinct. Code length: Reasonably concise, though repeated annotation lookups add verbosity and could be stored in local variables. Action granularity: Each line performs a single setup operation or assertion. Reading flow: Setup followed by assertions creates a natural progression; switching context and reassigning field and reader require some tracking, while long chained expressions slightly reduce scanability.
Run 2
Code Structure: Three logically grouped association scenarios are separated by blank lines, though separate test methods would improve isolation. Nesting: The method is flat, with no nested control flow. Clarity of intent: The test name, annotation types, and explicit assertions clearly communicate what is being verified; generic variable names and reused setup variables slightly weaken scenario distinction. Code length: Reasonably concise, but repeated annotation lookups add verbosity and could be replaced with named local variables. Action granularity: Each statement performs one main setup or assertion action. Reading flow: Setup followed by assertions creates a natural progression, although long chained expressions and the transition between XML contexts require extra attention.
Run 3
Code Structure: Three logically grouped association scenarios are separated by blank lines, but separate test methods would improve organization. Nesting: The method is flat, with no nested control flow. Clarity of intent: Descriptive annotation types and explicit assertions make the tested behavior clear, although the broad method name and reused variables obscure scenario boundaries slightly. Code length: Reasonably concise, but repeated annotation lookups add verbosity. Action granularity: Each statement performs one primary action, making setup and assertions easy to distinguish. Reading flow: Setup followed by related assertions creates a natural progression; variable reassignment and occasional long chained expressions slightly reduce readability.