Sample

Scalabrio124

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.22
Lines14

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
69.8Δ 42.5
Scalabrino0.6470–1; higher is more readable
65.8Δ 38.4
Dorn0.6010–1; higher is more readable
67.3Δ 39.9
Mi0.3270–1; higher is more readable
61.3Δ 33.9
LLOC8Logical lines; fewer is more readable
76.9Δ 49.5
DeepSeek V4 Pro15.670–20; mean of three runs
72.9Δ 45.5
GPT-6.1 Sol180–20; mean of three runs
83.7Δ 56.3
BTTF0.590–1; higher is more readable
67.8Δ 40.5
Human3.221–5; original rating
27.4

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.508.967−16.796
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.404−6.607
Source linesThe number of non-empty source lines.14+5.6

Intercept 8.87 + feature contributions = -8.932 (log-odds).
Score = sigmoid(-8.932) = 0.

Score0.647

Feature contributions

FeatureValueContribution
(log-odds)
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
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.72.929+0.576
Indentation frequencyHow rapidly indentation changes from line to line.14−0.253
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.12.703−0.232
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.14+0.1
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.102−0.047

Intercept 0.07 + feature contributions = 0.411 (log-odds).
Score = sigmoid(0.411) = 0.601.

Score0.327
Score8
Run 1

The code is fairly readable with a clear intent: it tests that a JUnit listener receives failure notifications. The structure is logical, with setup, listener registration, execution, and assertion in a natural flow. Nesting is minimal, limited to one anonymous inner class. Action granularity is good, with one meaningful action per line. However, readability is slightly reduced by the long method name and the multi-line signature, which adds visual noise. Additionally, the variable names 'core' and 'fMax' are somewhat ambiguous without context, and the test does not explicitly name the scenario beyond the method name. The code could be improved by extracting the anonymous listener into a named variable or using a lambda (if Java 8+), which would flatten the structure and clarify intent. Overall, it is concise and well-organized but not exemplary due to minor clarity issues.

Run 2

The test is concise and its purpose is clear: it verifies listener behavior during test failures. The structure is logical, with a JUnitCore instance, listener registration, and execution separated. Nesting is minimal—only one anonymous inner class. Action granularity is mostly one action per line; however, the line 'failures.addAll(result.getFailures());' combines a fetch and an add, slightly reducing clarity. The use of 'fMax' is ambiguous without surrounding context, and the 'TwoTests' class and 'fMax' suggest external test fixtures not defined here. Overall, the code reads naturally and is easily understood, but minor ambiguity in naming and a slightly merged operation prevent a higher score.

Run 3

The code is generally readable with clear intent and logical structure. It uses a test method to verify listener behavior during failures, with one action per line for the core test flow. The anonymous RunListener adds some nesting but remains understandable. A minor reduction in score reflects the slightly verbose anonymous class; a lambda could be conciser. Overall, the code has good flow, minimal nesting, and clear purpose.

Run 1

Code Structure: Logically organized into setup, listener registration, execution, and assertion. Nesting: Shallow; the anonymous listener adds limited, manageable nesting. Clarity of intent: The descriptive test name and straightforward assertion convey the purpose, though fMax is unexplained and listener behavior is verified indirectly through collected failures. Code length: Concise, with minor verbosity from the anonymous class and explicit generic type. Action granularity: Each statement performs one clear action. Reading flow: Natural and sequential, with consistent formatting; the wrapped method declaration slightly interrupts the flow.

Run 2

Code Structure: A logically organized test with setup, listener registration, execution, and assertion. Nesting: Shallow nesting, limited to an anonymous listener and its callback. Clarity of intent: The descriptive test name and failure collection communicate the purpose, though fMax is opaque and asserting only the failure count does not fully explain listener correctness. Code length: Concise, with minor boilerplate from the anonymous class. Action granularity: Each statement performs one clear action. Reading flow: Natural progression from configuration to verification, with consistent formatting.

Run 3

Code Structure: Logically organized into setup, listener registration, execution, and assertion. Nesting: Shallow overall; the anonymous listener adds only modest nesting. Clarity of intent: The descriptive test name and straightforward assertion communicate the purpose, although fMax is unexplained and the failure scenario depends on TwoTests. Code length: Concise, with minor boilerplate from the anonymous class and explicit generic type. Action granularity: Each statement performs one clear action. Reading flow: Natural setup-to-verification progression, slightly interrupted by the inline callback definition.