Sample
JetBrains/b56
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 23.7Δ 26.3 |
| Scalabrino | 0.592 | 0–1; higher is more readable | 42.4Δ 7.6 |
| Dorn | 0.617 | 0–1; higher is more readable | 73.7Δ 23.7 |
| Mi | 0.348 | 0–1; higher is more readable | 30.5Δ 19.5 |
| LLOC | 19 | Logical lines; fewer is more readable | 25.4Δ 24.6 |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs | 49.6Δ 0.4 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 77.5Δ 27.5 |
| BTTF | 0.482 | 0–1; higher is more readable | 61.0Δ 11.0 |
| Human | 0.73 | 0–1; original rating | 50.0 |
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. | 994.123 | −32.806 |
| Source linesThe number of non-empty source lines. | 26 | +10.4 |
| 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.738 | −5.607 |
Intercept 8.87 + feature contributions = -19.143 (log-odds).
Score = sigmoid(-19.143) = 0.
| Score | 0.592 |
|---|
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. | 1 | +1.001 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 75 | +0.489 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.118 | −0.2 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 26 | −0.176 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 26 | +0.162 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 24.776 | −0.064 |
Intercept 0.07 + feature contributions = 0.478 (log-odds).
Score = sigmoid(0.478) = 0.617.
| Score | 0.348 |
|---|
| Score | 19 |
|---|
Run 1
The code is well-structured with clear separation between main logic and sequence generation. Nesting is minimal, with only one level of control flow inside the main loop. Intent is evident from method and variable names. The implementation is reasonably concise, though the boundary condition (i == sequence.length()) inside the loop adds slight complexity and could be simplified by handling the final run after the loop. Action granularity is good - each line performs one logical operation. Reading flow is natural: generate sequence, print, repeat. Minor improvements could include extracting the run-length encoding logic into a helper method or using a for-loop with a nested while for runs, making the boundary handling cleaner and reducing cognitive load.
Run 2
The code is generally clear and logically organized. The main method separates the looping concern from the sequence-generation concern by delegating to nextSequence, which is good structure. Nesting depth is moderate, with only one level inside the main loop and two inside the sequence loop. Intent is mostly clear, though the boundary condition in nextSequence (i <= length and the following if-checks) requires a little thought. Code length is appropriate and concise. Action granularity is mostly one action per line, supported by consistent formatting. Reading flow is natural: display, then update, then generate next. Minor improvements could include a clearer loop head (e.g., using a local variable for length) and perhaps a comment explaining the look-and-say transformation, but overall readability is strong.
Run 3
The code is fairly readable. Main method is concise, method extraction into `nextSequence` is good, and indentation is clear. The `nextSequence` logic mixes boundary and change detection in a single loop with multiple nested conditions and an early `if (i == sequence.length())` check, which complicates intent and nesting. Action granularity is reasonable, but the method could be clearer with helper functions or a more linear structure. Variable names are clear (sequence, digit, count, next), but `next` is slightly ambiguous. Overall, good structure and flow, but the core algorithm's condition handling reduces clarity.
Run 1
Code Structure: Clean separation between sequence generation and output. Nesting: Moderate nesting in nextSequence, with a loop and two conditional levels, but still easy to follow. Clarity of intent: Descriptive class, method, and variable names clearly communicate the look-and-say algorithm; the inclusive loop boundary requires some attention. Code length: Concise without unnecessary repetition. Action granularity: Statements generally perform one logical action; chained appends naturally express one output operation. Reading flow: Initialization, iteration, group emission, and return follow a logical order. Blank lines between methods and a brief explanation of the end-of-sequence condition would improve readability.
Run 2
Code Structure: Clearly separates sequence generation from printing through a dedicated method. Nesting: Mostly shallow, although the loop contains a conditional with another nested conditional. Clarity of intent: Descriptive class, method, and variable names make the look-and-say algorithm understandable; the inclusive loop bound and short-circuit boundary check require some attention. Code length: Concise without unnecessary repetition. Action granularity: Most lines perform one action; chained append calls combine two closely related operations clearly. Reading flow: Initialization, run counting, and output construction follow a logical order. Consistent indentation helps, but a blank line between methods and a brief explanation of the end-of-sequence handling would improve readability.
Run 3
Code Structure: Clear separation between sequence generation and output. Nesting: Modest loop and conditional nesting, with only one deeper conditional. Clarity of intent: Descriptive class, method, and variable names make the look-and-say algorithm understandable, though the fixed iteration count lacks explanation. Code length: Concise without unnecessary duplication. Action granularity: Most lines perform one action; chained append calls naturally express a count-digit pair. Reading flow: Initialization, scanning, group emission, and return follow a logical order. The inclusive loop bound and short-circuit end-of-string check require slightly more attention, and spacing between methods would improve readability.