Sample
Scalabrio7
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 44.7Δ 27.9 |
| Scalabrino | 0.805 | 0–1; higher is more readable | 83.9Δ 67.1 |
| Dorn | 0.824 | 0–1; higher is more readable | 96.0Δ 79.1 |
| Mi | 0.294 | 0–1; higher is more readable | 56.8Δ 39.9 |
| LLOC | 18 | Logical lines; fewer is more readable | 31.2Δ 14.3 |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs | 21.1Δ 4.3 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 19.6Δ 2.8 |
| BTTF | 0.553 | 0–1; higher is more readable | 57.3Δ 40.5 |
| 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. | 1004.019 | −33.133 |
| Source linesThe number of non-empty source lines. | 36 | +14.4 |
| 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.584 | −6.875 |
Intercept 8.87 + feature contributions = -16.738 (log-odds).
Score = sigmoid(-16.738) = 0.
| Score | 0.805 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 77 | +0.438 |
| 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. | 76.944 | +0.406 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 32 | +0.37 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 36 | −0.238 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 34.679 | +0.075 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.023 |
Intercept 0.07 + feature contributions = 1.542 (log-odds).
Score = sigmoid(1.542) = 0.824.
| Score | 0.294 |
|---|
| Score | 18 |
|---|
Run 1
The code's structure is logical, but readability suffers from inconsistent indentation throughout the method, disrupting reading flow. The try-catch block contains a loop that nests multiple levels deep, making it harder to follow. While the intent is fairly clear—load a resource bundle with fallback class loaders—the variable naming (e1, e2, iter, cl) is vague. The method is moderately concise, but the null-initialized 'bundle' and unconditional final put are questionable for clarity. Action granularity is mostly one action per line, but the broken indentation reduces this benefit. Overall, the code is understandable but requires effort due to formatting inconsistencies and nested logic.
Run 2
The code has a clear method name and Javadoc, and basic flow control is understandable. However, readability suffers from inconsistent indentation, mixed (tab vs spaces) alignment, and multiple actions combined on single lines (e.g., 'bundle = ResourceBundle.getBundle(...)' split awkwardly). The nested try-catch inside a loop inside a catch adds depth and makes the error-handling flow harder to follow at a glance. The variable names 'e1' and 'e2' are not descriptive, and the absence of a null check before putting the bundle in the map could lead to subtle bugs. Overall, the code is functional but needs formatting and structural cleanup for better clarity.
Run 3
The code is logically organized but suffers from several readability issues. The nesting is moderate but increases significantly due to the multiple try-catch blocks and while loop. Intent is generally clear, but the mixed indentation and inconsistent formatting obscure the flow. Code length is reasonable but could be shorter. Action granularity is mostly one action per line, though some lines contain multiple statements. Reading flow is disrupted by the inconsistent indentation, especially in the inner try-catch. The method does not handle the case where bundle remains null, which could be ambiguous. The while loop logic for iterating class loaders adds complexity. More concise alternatives or clearer logging could improve readability.
Run 1
Code Structure: Logically organized into a cache check, default loading attempt, fallback loader search, and cache update. Nesting: The early return helps, but the catch block containing a loop and another try/catch adds moderate nesting. Clarity of intent: The documentation, descriptive names, and logging clearly convey the loading strategy; storing a null bundle after all attempts fail makes failure handling less explicit. Code length: Reasonably concise, though repeated logging and exception handling add some bulk. Action granularity: Statements generally perform one action each; the multiline assignment remains understandable. Reading flow: Execution follows a natural sequence, but inconsistent indentation, awkward line wrapping, and a raw Iterator with an explicit cast reduce readability.
Run 2
Code Structure: Logically separates the cache check, default loading, fallback loading, and cache update. Nesting: The loop and nested try/catch inside the outer catch add moderate depth, though the early return reduces nesting. Clarity of intent: Documentation, descriptive names, and logging clearly explain the loading strategy; caching a null result after all attempts fail is less obvious. Code length: Reasonably concise, with some verbosity from repeated logging and exception handling. Action granularity: Statements generally perform one action each; awkwardly split assignments and method calls slightly hinder scanning. Reading flow: Execution proceeds naturally from the default loader to fallback loaders, but inconsistent indentation, mixed whitespace, and the raw iterator with an explicit cast reduce readability.
Run 3
Code Structure: Logically organized into a cache check, default loading attempt, fallback loaders, and cache update. Nesting: The loop and nested try/catch inside the outer catch introduce moderate depth, although the early return avoids extra nesting. Clarity of intent: The method documentation, descriptive names, and logging clearly convey its purpose; caching a null bundle after all attempts fail is less obvious. Code length: Reasonably concise, with some repetitive logging and exception handling. Action granularity: Statements generally perform one action each, but the awkwardly split assignment makes the fallback call harder to scan. Reading flow: Execution follows a natural sequence, but inconsistent indentation, tabs, and uneven line wrapping disrupt readability. A raw Iterator and explicit cast add minor visual noise.