Sample
Dorn/java/156
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.237 | 0–1; higher is more readable | 76.6Δ 20.8 |
| Dorn | 0.627 | 0–1; higher is more readable | 54.6Δ 1.3 |
| Mi | 0.413 | 0–1; higher is more readable | 41.2Δ 14.6 |
| LLOC | 6 | Logical lines; fewer is more readable | 72.8Δ 17.0 |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs | 57.5Δ 1.7 |
| GPT-6.1 Sol | 10.33 | 0–20; mean of three runs | 12.0Δ 43.9 |
| BTTF | 0.579 | 0–1; higher is more readable | 68.8Δ 13.0 |
| Human | 3.4 | 1–5; original rating | 55.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) |
|---|---|---|
| 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.864 | −7.295 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 204.33 | −6.743 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -1.168 (log-odds).
Score = sigmoid(-1.168) = 0.237.
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. | 67.909 | +0.789 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.739 | −0.274 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.153 |
Intercept 0.07 + feature contributions = 0.518 (log-odds).
Score = sigmoid(0.518) = 0.627.
| Score | 0.413 |
|---|
| Score | 6 |
|---|
Run 1
The code snippet is difficult to evaluate fully due to its incomplete and out-of-context nature. However, based on what is provided, readability suffers from several issues: the structure is fragmented, beginning mid-method with an ambiguous `synchronized` block and an unclear relationship to the method signature. The nesting is shallow but the use of an `if-else` inside a synchronized block without visible closing braces makes intent unclear. Variable names like `_objectNameCache` and `objectNameCacheKey` are verbose but not self-explanatory, and `_mBeanServer` adds to confusion without context. The action granularity is adequate (one action per line), but reading flow is disrupted because the code begins abruptly. Clarity of intent is low—what is the purpose of the `synchronized` block? Why is the cache key removed only in the `else` branch? Without surrounding code, the logic feels incomplete. Overall, the snippet lacks sufficient context and cohesive structure, making it only marginally readable.
Run 2
The code structure is logical, with a synchronized block protecting shared cache access and a clear if-else branch handling two distinct cases. Nesting is minimal and the intent—unregistering an MBean and managing cache state—is reasonably clear. However, the snippet begins mid-method with 'throws' declarations, making it appear disorganized out of context. The 'throw' line is missing its method signature, which harms readability. The else branch removes from cache but does not unregister the MBean, which may be intentional but is slightly ambiguous without surrounding code. Overall it is concise and flat, with one action per line, but lacks full context to confirm clarity.
Run 3
The code is reasonably readable with a clear structure: a synchronized block, a cache lookup, and a straightforward if/else branch. Nesting is minimal (only one level), and intent is mostly clear—unregister a default MBean if no cached name exists, otherwise remove the cache entry. Action granularity is good, with one action per line. However, the code snippet is incomplete, making full evaluation difficult. There is a potential ambiguity: unregistering a default MBean when the cache lookup fails might not be obvious to readers without additional context. The method signature at the top suggests exception handling but the snippet ends abruptly. Overall, it is concise and logically organized, but slightly incomplete for a full understanding.
Run 1
Code Structure: The synchronized block and cache lookup are logically organized, but the snippet lacks a method declaration and ends mid-branch. Nesting: Shallow synchronization and conditional nesting are easy to follow. Clarity of intent: Descriptive names suggest cache-based MBean unregistration, but the incomplete else branch obscures the full behavior. Code length: The visible code is concise, with no obvious redundancy. Action granularity: Each statement performs one clear action. Reading flow: Lookup followed by conditional handling reads naturally, but missing context and closing braces interrupt comprehension.
Run 2
Code Structure: The visible synchronization, cache lookup, and conditional branch are logically organized, but the missing method declaration and closing blocks make the snippet incomplete. Nesting: Two levels of nesting are modest and easy to follow. Clarity of intent: Descriptive identifiers suggest MBean unregistration and cache cleanup, but the truncated else branch obscures the complete behavior. Code length: The visible code is concise without obvious redundancy. Action granularity: Each statement performs one clear action. Reading flow: Indentation and spacing support a natural top-to-bottom flow, but the abrupt beginning and ending interrupt comprehension.
Run 3
Code Structure: The synchronized cache lookup and conditional branches are logically organized, but the missing method declaration and incomplete blocks obscure the overall structure. Nesting: Moderate nesting through synchronization and an if/else remains easy to follow. Clarity of intent: Descriptive identifiers suggest cache-aware MBean unregistration, though the truncated else branch leaves the full behavior unclear. Code length: The visible code is concise without unnecessary repetition. Action granularity: Each statement performs one clear action. Reading flow: Lookup followed by conditional handling reads naturally, but the fragment starts mid-signature and ends abruptly, preventing a complete understanding.