Sample
Dorn/java/154
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 47.1Δ 20.1 |
| Scalabrino | 0.689 | 0–1; higher is more readable | 73.6Δ 6.5 |
| Dorn | 0.647 | 0–1; higher is more readable | 58.2Δ 8.9 |
| Mi | 0.649 | 0–1; higher is more readable | 72.4Δ 5.3 |
| LLOC | 15 | Logical lines; fewer is more readable | 46.5Δ 20.6 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 87.9Δ 20.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 13.2 |
| BTTF | 0.517 | 0–1; higher is more readable | 48.7Δ 18.4 |
| Human | 3.54 | 1–5; original rating | 67.1 |
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. | 762.252 | −25.154 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.955 | −7.432 |
Intercept 8.87 + feature contributions = -11.717 (log-odds).
Score = sigmoid(-11.717) = 0.
| Score | 0.689 |
|---|
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. | 64.903 | +0.916 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.13 | −0.323 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 30 | +0.301 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 28 | +0.045 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.697 | +0.005 |
Intercept 0.07 + feature contributions = 0.607 (log-odds).
Score = sigmoid(0.607) = 0.647.
| Score | 0.649 |
|---|
| Score | 15 |
|---|
Run 1
The code is generally well-structured and readable. It has clear separation of concerns, with a guard clause that flattens the main logic and early returns that keep nesting minimal. Variable naming is clear, and each line performs a single action (e.g., retrieving the locale, setting a default, formatting a debug message). The debug logging block is appropriately concise. The empty methods clearly signal unsupported operations. Some minor deductions: the line `LanguageUtil.get(locale, key.toString())` could be considered slightly compressed but is still clear. The debug statement breaks the natural flow slightly by using string concatenation, though it remains readable. Overall, the code flows logically from input validation to locale resolution to value lookup to debug output, with no unnecessary complexity or ambiguity.
Run 2
The code is well-structured and readable. It has a clear, flat flow with minimal nesting (only two levels). Intent is easy to follow: retrieve a localized value for a key, with sensible null handling. Variable names are descriptive, and the debug logging is concise. The unsupported methods explicitly signal intent by throwing exceptions. Minor improvements could include extracting locale resolution into a helper method to reduce responsibility in this method, but overall the code is clean, concise, and maintains a natural reading flow.
Run 3
The code is generally well-structured and readable. It uses a clear guard clause for null key, logical variable initialization, and straightforward locale resolution. Nesting is shallow—only two levels deep. Variable names are descriptive, and the debug logging clearly shows intent. The method does one logical action per line mostly, though the debug logging concatenation is slightly dense. The unsupported operations are concise and clear. Minor deductions: the null locale check could be simplified, and the debug message construction mixes concerns. Overall, the code is clean, maintainable, and easy to follow.
Run 1
Code Structure: Methods are clearly separated, and locale resolution, lookup, and logging follow a logical sequence. Nesting: The null-key guard adds one level, with shallow nested checks for locale fallback and debug logging; an early return could flatten the main method. Clarity of intent: Descriptive names make the localized lookup easy to understand, although the unsupported methods lack explanation. Code length: Concise, with little unnecessary code. Action granularity: Statements generally perform one action each; chained context access and string concatenation remain manageable. Reading flow: Execution progresses naturally from validation to locale selection, lookup, logging, and return. The multiline debug call slightly interrupts the otherwise smooth flow.
Run 2
Code Structure: Methods are clearly separated, and get logically groups locale resolution, value lookup, and logging. Nesting: The null-key guard adds one level, with shallow nested checks for locale fallback and debugging. Clarity of intent: Descriptive names make the lookup purpose clear, though returning null for null keys and unsupported collection methods lack explanation. Code length: Concise overall, with minor verbosity from initializing value before the guard. Action granularity: Each statement performs a distinct action; the chained locale access remains understandable. Reading flow: The progression from context retrieval to locale selection, translation lookup, logging, and return is natural. An early return for null keys could flatten the main method further.
Run 3
Code Structure: Methods are clearly separated, and get logically groups locale selection, lookup, and logging. Nesting: A null guard encloses two shallow conditional blocks; an early return could flatten the flow. Clarity of intent: Descriptive names make the localized lookup easy to understand, while explicit exceptions clearly identify unsupported operations. Code length: Concise overall, with useful whitespace and little unnecessary code. Action granularity: Each statement performs one primary action; the chained locale access and logging concatenation remain manageable. Reading flow: Execution proceeds naturally from validation to locale resolution, retrieval, logging, and return. Minor readability drawbacks include the mutable value initialized to null and the log message's missing closing brace.