Sample
MBJP/9
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 12.5Δ 6.2 |
| Scalabrino | 0.337 | 0–1; higher is more readable | 6.2Δ 0.0 |
| Dorn | 0.399 | 0–1; higher is more readable | 6.2Δ 0.0 |
| Mi | 0.711 | 0–1; higher is more readable | 68.8Δ 62.5 |
| LLOC | 30 | Logical lines; fewer is more readable | 0.0Δ 6.2 |
| DeepSeek V4 Pro | 4.67 | 0–20; mean of three runs | 6.2Δ 0.0 |
| GPT-6.1 Sol | 8 | 0–20; mean of three runs | 6.2Δ 0.0 |
| BTTF | 0.299 | 0–1; higher is more readable | 6.2Δ 0.0 |
| Human | 1.5 | 1–5; original rating | 6.2 |
Views
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. | 1594.86 | −52.63 |
| Source linesThe number of non-empty source lines. | 55 | +22 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 3.923 | −5.885 |
Intercept 8.87 + feature contributions = -27.645 (log-odds).
Score = sigmoid(-27.645) = 0.
| Score | 0.337 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 55 | −0.911 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 46 | +0.854 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.873 | +0.742 |
| 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. | 103 | −0.697 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 46 | −0.635 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 53.894 | +0.344 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.115 | −0.176 |
Intercept 0.07 + feature contributions = -0.409 (log-odds).
Score = sigmoid(-0.409) = 0.399.
| Score | 0.711 |
|---|
| Score | 30 |
|---|
Run 1
The code is poorly structured and hard to follow. It contains unnecessary imports, a confusing while loop with a magic number (10000), and a rotation mechanism that is not directly tied to the actual problem. The variable names like 'b', 'c', 'r' are unclear, and the final computation involving maxB and maxIndex does not logically relate to finding minimum rotations. The nested loops and multiple responsibilities within the method make it difficult to understand intent. There is also no separation of concerns—parsing, rotation, counting, and result calculation are all mixed together. The code lacks comments explaining non-obvious logic, and the helper logic is redundant. Overall, it reads as disorganized and overcomplicated.
Run 2
The code is difficult to follow due to poor structure, misleading logic, and unclear intent. The main loop performing rotations uses an arbitrary limit of 10000 (magic number) and is largely disconnected from the actual result computation. Variables like 'b', 'c', 'r', 'maxB' are not descriptive. The function ends with a frequency-based calculation that does not intuitively relate to finding rotation count, making the algorithm opaque. Nesting is moderate but the flow jumps awkwardly from rotation simulation to character frequency analysis. Several operations are redundant, e.g., mutating 'str' despite already having 'b' as a copy. Action granularity is acceptable but overshadowed by confusing overall design. The code also lacks comments or helper methods that might explain the intended approach. Overall, it reads like tangled, hard-to-maintain logic rather than a clear implementation of the stated problem.
Run 3
The code is difficult to read due to unclear logic, misleading variable names, and unnecessary complexity. The while loop with a hardcoded bound (10000) and mutable string manipulation obscures the rotation check. Variables like 'r', 'b', 'c', 'maxB', and 'maxIndex' are ambiguous. The final result calculation using max character frequency does not logically follow from the rotation logic and appears unrelated to the intended problem. Nesting is shallow but actions are grouped in bloated loops. The reading flow is disjointed, and the code lacks a clear single-purpose structure.
Run 1
Code Structure: The method mixes a rotation simulation with a separate character-frequency calculation, without explaining their relationship; the simulation does not affect the returned result. Nesting: Moderate nesting in the while loop and nested counting loops makes scanning harder. Clarity of intent: The documentation states the goal, but cryptic names such as r, b, and c, an unexplained 10000 limit, and the final formula obscure how the implementation achieves it. Code length: Unused imports, unused maxIndex, redundant initialization, and an unnecessary nonempty-string check add clutter. Action granularity: Statements generally perform one action per line, which improves readability. Reading flow: Formatting and sequential blocks are consistent, but switching from rotations to frequency counting disrupts the logical flow.
Run 2
Code Structure: The method mixes a rotation loop with a separate character-frequency calculation, without a clear relationship between them; unused maxIndex and wildcard imports add clutter. Nesting: Depth is moderate, with nested loops and conditionals increasing reading effort. Clarity of intent: Documentation states the goal, but cryptic names such as b, c, and r, the arbitrary 10000 limit, and the unexplained result formula obscure the implementation. Code length: The method is unnecessarily long because the rotation loop does not contribute to the returned result, and the nonempty-string check is redundant. Action granularity: Most lines perform one action, making individual statements easy to follow. Reading flow: Formatting is consistent, but switching from rotations to frequency counting disrupts the logical progression and makes the algorithm difficult to understand.
Run 3
Code Structure: Input validation is clearly separated, but the rotation loop and character-frequency calculation appear disconnected; unused maxIndex adds clutter. Nesting: Moderate nesting, including nested loops and conditionals, increases reading effort. Clarity of intent: The documentation states the goal, but terse names (r, b, c), a magic limit of 10000, and an unexplained result formula obscure how the implementation achieves it. The rotation comparison checks the current string rather than the original, further confusing intent. Code length: Unused wildcard imports, redundant initialization, and an unnecessary nonempty-string check make the code longer than needed. Action granularity: Statements generally perform one action per line, which aids readability. Reading flow: Formatting is consistent and the early return is helpful, but the transition from rotations to character counting is unexplained and the rotation count does not contribute to the returned result.