Sample
MBJP/1
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 0.0Δ 40.6 |
| Scalabrino | 0.215 | 0–1; higher is more readable | 0.0Δ 40.6 |
| Dorn | 0.188 | 0–1; higher is more readable | 0.0Δ 40.6 |
| Mi | 0.383 | 0–1; higher is more readable | 0.0Δ 40.6 |
| LLOC | 23 | Logical lines; fewer is more readable | 15.6Δ 25.0 |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs | 37.5Δ 3.1 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 25.0Δ 15.6 |
| BTTF | 0.464 | 0–1; higher is more readable | 37.5Δ 3.1 |
| Human | 3 | 1–5; original rating | 40.6 |
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. | 1884.023 | −62.173 |
| Source linesThe number of non-empty source lines. | 58 | +23.2 |
| 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.06 | −6.09 |
Intercept 8.87 + feature contributions = -36.193 (log-odds).
Score = sigmoid(-36.193) = 0.
| Score | 0.215 |
|---|
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. | 153 | −2.815 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 152.966 | +1.664 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 58 | −1.017 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 37 | +0.543 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 37 | −0.428 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 56.903 | +0.386 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.135 |
Intercept 0.07 + feature contributions = -1.464 (log-odds).
Score = sigmoid(-1.464) = 0.188.
| Score | 0.383 |
|---|
| Score | 23 |
|---|
Run 1
The code has a clear structure with logical initialization and nested loops, but it suffers from several readability issues. The excessive inline comments restate the obvious rather than explaining why, and variables i1/j1 are redundant aliases for i/j. The dynamic programming logic is straightforward but implemented verbosely: three min variables plus an array sort could be replaced with a single Math.min chain. While actions are generally one per line, the nesting is moderate (if/else inside nested loops), and the flow is disrupted by comment noise. The method lacks input validation for null/empty or out-of-bounds matrices. The Javadoc's examples are helpful but the code's verbosity and redundant assignments reduce clarity. Overall, the code is understandable but not polished.
Run 2
The code has a clear structure and mostly flat nesting, with one action per line. Comments explain intent, and the algorithm is easy to follow. However, readability suffers from redundancies: reassigning i/j into i1/j1 is unnecessary, sorting a three-element array to find the minimum is verbose and inefficient, and multiple if-checks for neighbor validity add clutter. Variable names like min1/min2/min3 are generic and don’t convey direction (up/left/diagonal). The method also lacks error handling for invalid m/n. Overall, the logic is understandable but could be made much cleaner with direct indexing, Math.min, and more descriptive naming.
Run 3
The code follows a clear structure and includes explanatory comments, but it is overly verbose and uses unnecessary complexity. The logic is understandable, but the use of three variables (min1, min2, min3) and sorting a three-element array to find a minimum is inefficient and harms clarity. Assigning i1 and j1 as copies of loop indices adds no value. The code is not deeply nested but could be more concise. The intent is fairly clear due to comments and structure, but the implementation distracts from the purpose. Overall, it is readable but could be significantly improved by simplifying the minimum-cost calculation and removing redundant variables.
Run 1
Code Structure: The single method follows a logical dynamic-programming sequence: initialization, matrix traversal, neighbor evaluation, and return. Nesting: Two loops containing a conditional and neighbor checks create moderate nesting, but consistent indentation helps. Clarity of intent: The documentation and comments explain the goal, although names such as d, min1, and temp are weak, and redundant i1/j1 aliases obscure rather than clarify. Code length: Unnecessary aliases, repetitive comments, repeated cost lookups, and unused wildcard imports add clutter. Action granularity: Statements generally perform one action per line, making operations easy to distinguish. Reading flow: Row-by-row traversal and explicit boundary checks are natural to follow, but sorting an array merely to select the minimum interrupts the otherwise straightforward recurrence.
Run 2
Code Structure: The single method is logically organized around initialization, matrix traversal, neighbor evaluation, and returning the result. Nesting: Two loops plus conditional branches create moderate nesting, though the blocks remain manageable. Clarity of intent: The documentation and comments explain the minimum-cost calculation, but names such as d, i1, min1, and temp are weak; sorting three values obscures a simple minimum operation. Code length: Redundant index aliases, repeated cost lookups, excessive explanatory comments, and unused imports add unnecessary length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Row-by-row traversal and consistent formatting provide a natural progression, but repetitive comments and temporary variables interrupt the flow.
Run 3
Code Structure: A single method follows a logical dynamic-programming sequence: initialize, traverse, compute, return. Nesting: Two loops plus conditional branches create moderate nesting, but consistent indentation keeps it manageable. Clarity of intent: The method name, documentation, and comments explain the goal, while names such as d, i1, min1, and temp obscure variable roles. Code length: Redundant index aliases, repetitive comments, repeated cost lookups, and sorting three values instead of using Math.min add unnecessary length and complexity. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Row-by-row traversal and explicit boundary checks provide a natural progression, though excessive commentary and the temporary sorting step interrupt the recurrence's flow.