Sample
Dorn/java/171
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.429 | 0–1; higher is more readable | 79.7Δ 9.5 |
| Scalabrino | 0.897 | 0–1; higher is more readable | 95.7Δ 25.5 |
| Dorn | 0.512 | 0–1; higher is more readable | 44.3Δ 25.9 |
| Mi | 0.721 | 0–1; higher is more readable | 88.0Δ 17.8 |
| LLOC | 4 | Logical lines; fewer is more readable | 82.7Δ 12.5 |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs | 34.7Δ 35.5 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 80.4Δ 10.2 |
| BTTF | 0.559 | 0–1; higher is more readable | 63.2Δ 7.0 |
| Human | 3.59 | 1–5; original rating | 70.2 |
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.65 | −6.975 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 187.296 | −6.181 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -0.286 (log-odds).
Score = sigmoid(-0.286) = 0.429.
| Score | 0.897 |
|---|
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. | 67 | +0.827 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.145 | −0.462 |
| 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. | 10 | −0.391 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.838 | −0.272 |
Intercept 0.07 + feature contributions = 0.047 (log-odds).
Score = sigmoid(0.047) = 0.512.
| Score | 0.721 |
|---|
| Score | 4 |
|---|
Run 1
The code is clear and concise, showing a simple loop that converts models and returns an array. Structure is logical and flat with minimal nesting. The intent is evident, though context is missing. Action granularity is reasonable, and reading flow is natural. Minor deduction because surrounding purpose is unclear.
Run 2
The code snippet is short and syntactically valid but lacks context. The loop for converting models to SOAP objects is clear in intent and has low nesting, but the overall structure is incomplete and hard to evaluate without surrounding context. The empty constructor is redundant and adds unnecessary lines. Action granularity is reasonable—one meaningful action per line in the loop—but the flow is disjointed due to missing method context. Naming is clear but the snippet reads as a fragment, not a complete readable unit. The return statement uses a toArray idiom that works but is slightly verbose. Overall, readability is moderate-to-low due to lack of surrounding structure and contextual clarity.
Run 3
The code is highly unreadable due to its fragmentary nature and lack of context. It opens mid-method with a loop, gives no surrounding method signature, class definition, or imports, making it impossible to determine intent or structure. The variable name 'models' is generic and 'soapModels' is only partially self-explanatory without domain knowledge. The loop itself is flat and reasonably concise, but the return line performs multiple operations: array creation, size lookup, and conversion, violating the one-action-per-line principle. The empty public constructor at the end suggests the code is part of a larger class, but its placement after the return statement breaks logical organization and reading flow. Action granularity is poor on the return line. Overall, without surrounding context and with the awkward ordering of constructor after method logic, the code fails most readability criteria.
Run 1
Code Structure: The conversion loop, array return, and empty constructor are logically organized, though the fragment omits the enclosing method's beginning. Nesting: A single shallow loop keeps complexity low. Clarity of intent: Converting KaleoTimer objects into SOAP models and returning an array is clear from the names and operations. Code length: The snippet is concise without unnecessary logic. Action granularity: Each statement performs one clear action, with the nested conversion call remaining easy to follow. Reading flow: Iteration followed by return reads naturally; the transition to the constructor is conventional, but incomplete surrounding context slightly interrupts comprehension.
Run 2
Code Structure: The conversion loop, return statement, and constructor are logically organized, although the snippet begins mid-method. Nesting: Only one shallow loop keeps complexity low. Clarity of intent: Converting timer models into SOAP models and returning an array is clear from the names. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one clear action; the nested conversion call is straightforward. Reading flow: The loop naturally leads to the array return, followed by the constructor. Missing method context and the unexplained empty constructor slightly reduce readability.
Run 3
Code Structure: The loop, array conversion, and empty constructor are logically organized, though the missing enclosing method limits context. Nesting: Only one shallow loop keeps the code easy to follow. Clarity of intent: Converting each KaleoTimer to a SOAP model and returning an array is clear from the names and operations. Code length: The snippet is concise without unnecessary logic. Action granularity: Each statement performs one primary action; the nested conversion call is straightforward. Reading flow: Processing models before returning the resulting array is natural, and spacing separates the constructor clearly. The partial method boundary and unexplained empty constructor slightly reduce readability.