Sample
Scalabrio113
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 39.7Δ 38.4 |
| Scalabrino | 0.174 | 0–1; higher is more readable | 12.1Δ 66.1 |
| Dorn | 0.556 | 0–1; higher is more readable | 63.8Δ 14.3 |
| Mi | 0.701 | 0–1; higher is more readable | 92.0Δ 13.8 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.1Δ 15.1 |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs | 33.4Δ 44.7 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 19.6 |
| BTTF | 0.696 | 0–1; higher is more readable | 92.0Δ 13.8 |
| Human | 4.11 | 1–5; original rating | 78.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. | 844.519 | −27.869 |
| Source linesThe number of non-empty source lines. | 19 | +7.6 |
| 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.741 | −7.112 |
Intercept 8.87 + feature contributions = -18.511 (log-odds).
Score = sigmoid(-18.511) = 0.
| Score | 0.174 |
|---|
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. | 51.895 | +1.467 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.197 | −0.97 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 19 | +0.364 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 18 | −0.158 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 51.947 | +0.034 |
Intercept 0.07 + feature contributions = 0.227 (log-odds).
Score = sigmoid(0.227) = 0.556.
| Score | 0.701 |
|---|
| Score | 11 |
|---|
Run 1
The code is logically organized and flat, with a clear purpose: converting a long to its big-endian byte representation. Each line performs one action, and the reading flow is predictable. However, the intent is obscured by the use of shift-left/shift-right operations instead of a simple mask or ByteBuffer. The repeated pattern is understandable but ambiguous; using `(byte)(longValue >> (56 - i*8))` in a loop or `ByteBuffer.allocate(8).putLong(longValue).array()` would be clearer and less error-prone. The code is unnecessarily long and repetitive, making it harder to maintain. Overall, it works but lacks clarity and conciseness.
Run 2
The code is fairly readable due to its clear intent, simple structure, and consistent one-action-per-line pattern. The Javadoc helps clarify purpose. However, readability is reduced by the repeated bit-shifting logic, which is verbose and error-prone. A loop using a single shift would be shorter and clearer. The unnatural ordering (0 to 7) and the awkward `(longValue << n) >> 56` pattern also impede reading flow, making the conversion logic harder to grasp than necessary.
Run 3
The code is well-structured with a clear purpose and concise implementation. Each line performs a single operation, making the code readable despite the bit-shifting logic. The Javadoc and parameter naming improve clarity. The repeated shift pattern is slightly verbose but consistent, following a predictable flow from most to least significant byte. Minor improvements could include a loop or helper method to reduce repetition, but the current version is transparent and easy to audit. Nesting is flat, structure is logical, and the reading flow is straightforward. Overall, it is highly readable for a low-level bit-manipulation method.
Run 1
Code Structure: Clearly organized into allocation, byte extraction, and return. Nesting: Flat, with no nested control flow. Clarity of intent: The method name and documentation convey conversion to bytes, but 'binary form' is imprecise and big-endian ordering is not documented. The left-then-right shifts require more interpretation than direct right shifts. Code length: Short overall, though eight repetitive assignments could be expressed with a simple loop. Action granularity: Each line performs one assignment, making individual operations easy to inspect. Reading flow: Sequential array indices and regularly increasing shift amounts create a predictable, natural flow. Minor spacing inconsistencies and hard-coded shift values slightly reduce readability.
Run 2
Code Structure: Clear allocation, byte extraction, and return sequence. Nesting: Flat, with no nested control flow. Clarity of intent: The method name and documentation convey conversion to bytes, but do not specify big-endian order; the repeated left-then-right shifts are less intuitive than direct right shifts. Code length: Short overall, though eight repetitive assignments could be expressed compactly with a loop. Action granularity: Each statement performs one clear assignment. Reading flow: Sequential array indices make the extraction easy to follow, but excessive parentheses and spacing add minor visual noise.
Run 3
Code Structure: The method is logically organized into allocation, byte extraction, and return. Nesting: There is no control-flow nesting; parentheses add only modest visual complexity. Clarity of intent: The method name and documentation communicate conversion to bytes, but do not explicitly identify big-endian order. Repeated left-then-right shifts are less intuitive than direct right shifts. Code length: The method is short, though eight similar assignments introduce repetition. Action granularity: Each line performs one clear assignment. Reading flow: Sequential array indices and consistent formatting make the method easy to follow, with unexplained shift constants slightly slowing comprehension.