Sample
Scalabrio191
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 51.3Δ 40.2 |
| Scalabrino | 0.382 | 0–1; higher is more readable | 33.7Δ 57.8 |
| Dorn | 0.31 | 0–1; higher is more readable | 37.7Δ 53.8 |
| Mi | 0.385 | 0–1; higher is more readable | 65.3Δ 26.1 |
| LLOC | 9 | Logical lines; fewer is more readable | 72.6Δ 18.8 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 85.7Δ 5.8 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 98.0Δ 6.5 |
| BTTF | 0.673 | 0–1; higher is more readable | 87.4Δ 4.0 |
| Human | 4.44 | 1–5; original rating | 91.5 |
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. | 595.239 | −19.643 |
| 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.256 | −7.884 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
Intercept 8.87 + feature contributions = -14.257 (log-odds).
Score = sigmoid(-14.257) = 0.
| Score | 0.382 |
|---|
Feature contributions
| Feature | Value | Contribution (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 |
| 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. | 1 | +0.398 |
| 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. | 93.909 | −0.312 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.758 | −0.273 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.115 | −0.178 |
Intercept 0.07 + feature contributions = -0.802 (log-odds).
Score = sigmoid(-0.802) = 0.31.
| Score | 0.385 |
|---|
| Score | 9 |
|---|
Run 1
The code has a clear purpose: configuring cache, statistics, transaction, and connection settings. Structure is flat and linear, with minimal nesting. Each line represents a single action, and the use of constants and getter methods clarifies intent. The reading flow is consistent and predictable. Minor deductions include slightly verbose repeated `cfg.setProperty` patterns and `cfg.getProperties().put()` which breaks the method-call consistency, slightly affecting natural flow and conciseness.
Run 2
The code is highly readable. It follows a logical structure, configuring related Hibernate settings in sequence. Nesting is minimal, with only the method body indented under the signature. The intent is clear: each line sets a specific environment property, making the purpose unambiguous. The code is concise, with no redundant operations, and each line represents a single action, improving granularity and readability. The reading flow is natural, as properties are grouped logically. Minor weaknesses include the use of string literals for property names and `cfg.getProperties().put()` breaking the consistent `cfg.setProperty()` pattern, but these do not significantly impact readability.
Run 3
The code is well-structured and readable. Each line performs a single configuration action, maintaining a flat, non-nested flow. The intent is clear: configure a Hibernate environment with specific caching, transaction, and connection settings. The use of constants improves clarity. Minor deductions: the method is slightly verbose with repetitive `cfg.setProperty()` calls, and the line with `cfg.getProperties().put()` breaks the pattern slightly. Overall, the code follows a logical sequence and is easy to scan and understand.
Run 1
Code Structure: A single, logically organized configuration method first delegates to the superclass, then applies settings. Nesting: Completely flat, with no conditional or loop nesting. Clarity of intent: Descriptive constants and helper method names clearly communicate each configuration choice, though cfg is abbreviated. Code length: Concise, with no unnecessary logic or repetition beyond explicit property assignments. Action granularity: Each line performs one configuration action. Reading flow: Natural top-to-bottom progression; related cache settings appear together. The switch from setProperty to getProperties().put slightly interrupts consistency but remains understandable.
Run 2
Code Structure: A single, logically organized configuration method delegates to the superclass before applying settings. Nesting: Entirely flat, with no conditionals or loops. Clarity of intent: The method name and descriptive configuration constants clearly communicate its purpose. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one configuration action. Reading flow: The sequential settings are easy to follow, though grouping cache-related and transaction-related settings with blank lines could improve scanning. The mixture of setProperty and getProperties().put introduces a minor stylistic variation, but does not significantly reduce readability.
Run 3
Code Structure: A single, logically organized configuration method with superclass initialization followed by related settings. Nesting: Completely flat, making execution easy to follow. Clarity of intent: Descriptive constants and helper names clearly identify the settings being configured. Code length: Concise, with no unnecessary logic or repetition beyond explicit property assignments. Action granularity: Each statement performs one configuration action on its own line. Reading flow: Natural top-to-bottom progression, although the switch from setProperty to getProperties().put slightly interrupts the otherwise uniform pattern.