Sample
Dorn/java/169
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.766 | 0–1; higher is more readable | 85.2Δ 6.4 |
| Scalabrino | 0.893 | 0–1; higher is more readable | 95.3Δ 16.5 |
| Dorn | 0.782 | 0–1; higher is more readable | 76.0Δ 2.8 |
| Mi | 0.768 | 0–1; higher is more readable | 95.3Δ 16.4 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.6Δ 9.7 |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs | 37.2Δ 41.6 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 52.8Δ 26.0 |
| BTTF | 0.566 | 0–1; higher is more readable | 64.9Δ 13.9 |
| Human | 3.73 | 1–5; original rating | 78.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.383 | −6.575 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 142.702 | −4.709 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = 1.186 (log-odds).
Score = sigmoid(1.186) = 0.766.
| Score | 0.893 |
|---|
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. | 48 | +1.632 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 10 | +0.682 |
| 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. | 8.898 | −0.285 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.092 | +0.048 |
Intercept 0.07 + feature contributions = 1.28 (log-odds).
Score = sigmoid(1.28) = 0.782.
| Score | 0.768 |
|---|
| Score | 3 |
|---|
Run 1
The code snippet is difficult to evaluate fully due to its fragmentary nature. Structure appears logical for a class method (likely extending an ASN.1 type), but the opening brace suggests a cut-off context. Nesting is minimal, which is good. Clarity of intent is moderate: the encode method is clear, but toString's use of '#' and Hex encoding lacks context. Code length is concise. Action granularity is acceptable. Reading flow is somewhat disrupted by the dangling opening brace and abstract method. Score reflects the incomplete context and ambiguity, not poor coding per se.
Run 2
The code shows a moderate level of readability. The structure is logical with a simple method signature and a short toString implementation, but the snippet is incomplete, making it hard to judge overall organization. Nesting is flat, which is positive. Clarity of intent is partially clear—toString clearly returns a hex-prefixed string, but encode is abstract with no implementation visible. Length is concise. Action granularity is fine: each method performs a single action. Reading flow is natural for a small class fragment. However, the lack of context and the use of a wildcard import or undefined 'Hex' or 'string' variables reduce understandability. The stray closing brace at the start also confuses structure. Overall, readable within a larger context but ambiguous alone.
Run 3
The snippet is small but has several readability issues. The stray closing brace at the start suggests it is an incomplete fragment, making logical organization impossible to assess. Nesting is minimal, which is good. Clarity of intent is moderate: the abstract 'encode' method and 'toString' are straightforward, but the use of 'string' is ambiguous without surrounding context. Code length is concise but too terse. Action granularity is mostly one action per line, which is fine. Reading flow is broken by the initial brace and the absence of class or context; the fragment feels disjointed. Overall, it is readable as a standalone piece, but lacks surrounding structure to score higher.
Run 1
Code structure is simple, but the leading closing brace and missing class context make the fragment feel incomplete. Nesting is minimal, with only a single method body. Intent is mostly clear: encode declares a serialization operation, and toString returns a hash-prefixed hexadecimal representation, though the name string does not clarify the data type or purpose. Length is concise without unnecessary statements. Action granularity is reasonable: the return expression combines related encoding, conversion, and concatenation into one logical operation. Reading flow is straightforward, but inconsistent indentation, the split encode declaration, and missing spaces around the concatenation operator slightly reduce readability.
Run 2
Code Structure: The abstract method declaration and toString implementation are logically separated, but the leading closing brace lacks context. Nesting: Minimal nesting makes the snippet easy to scan. Clarity of intent: encode clearly identifies its operation, while toString evidently returns a hash-prefixed hexadecimal representation; the generic field name string weakens clarity. Code length: Concise, with no unnecessary statements. Action granularity: The return expression combines encoding, string construction, and concatenation, but remains manageable. Reading flow: Straightforward overall, though inconsistent indentation and missing spaces around the concatenation operator reduce visual polish.
Run 3
Code Structure: The abstract method and toString override are logically separated, but the leading unmatched brace makes the snippet's context unclear. Nesting: The code is shallow and easy to follow. Clarity of intent: encode clearly declares an encoding operation; toString produces a hash-prefixed hexadecimal representation, though the field name string is vague. Code length: The snippet is concise without unnecessary code. Action granularity: The return statement combines hexadecimal encoding, String construction, and concatenation, but remains manageable. Reading flow: The sequence is straightforward, although inconsistent indentation and missing spaces around the concatenation operator slightly reduce readability.