Sample
JetBrains/e56
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 15.3Δ 12.7 |
| Scalabrino | 0.109 | 0–1; higher is more readable | 1.7Δ 0.8 |
| Dorn | 0.712 | 0–1; higher is more readable | 89.0Δ 86.4 |
| Mi | 0.399 | 0–1; higher is more readable | 37.3Δ 34.7 |
| LLOC | 23 | Logical lines; fewer is more readable | 14.8Δ 12.3 |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs | 43.6Δ 41.1 |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs | 58.5Δ 55.9 |
| BTTF | 0.469 | 0–1; higher is more readable | 51.7Δ 49.2 |
| Human | 0.33 | 0–1; original rating | 2.5 |
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. | 1139.786 | −37.613 |
| Source linesThe number of non-empty source lines. | 29 | +11.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. | 3.596 | −5.394 |
Intercept 8.87 + feature contributions = -22.537 (log-odds).
Score = sigmoid(-22.537) = 0.
| Score | 0.109 |
|---|
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. | 67.931 | +0.788 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.112 | −0.15 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 27.768 | −0.022 |
Intercept 0.07 + feature contributions = 0.904 (log-odds).
Score = sigmoid(0.904) = 0.712.
| Score | 0.399 |
|---|
| Score | 23 |
|---|
Run 1
The code has a clear, logical structure and the algorithm is implemented concisely. Variable names are mostly clear, and the two main loops are well-organized. However, readability suffers slightly from repeated sequence[i - 1] indexing, which adds noise. The inner loop's logic—building the next term via character counting—is understandable but could be clearer if a helper method (e.g., nextTerm) were extracted. Nesting is minimal and action granularity is good, but the repeated sequence[i - 1].charAt() calls reduce clarity. Overall, the code is readable but could be improved with small refactors for clarity.
Run 2
The code has a clear overall structure: initialize, generate terms in a loop, output results. Nesting is minimal, with only a single if-else inside a loop, keeping the logic relatively flat. The intent is understandable—compute the look-and-say sequence. However, repeated access to 'sequence[i - 1]' hurts clarity and adds length; storing it in a local variable would improve readability. The for-loop index management for grouping characters is concise but somewhat dense. Each line performs one primary action, though several lines are logically coupled. Overall, the code is concise and readable but would benefit from minor refactoring for better clarity.
Run 3
The code is logically organized with a clear overall purpose (generating look-and-say sequence), and the main algorithm is somewhat readable. Variables are named reasonably well and the action granularity is good. However, the logic inside the nested loops is dense and the inner loop's manipulations of 'last' and 'count' could be clearer. There is a lack of comments to guide the reader through the algorithm. The nesting is moderate but acceptable. The code is relatively concise, but it sacrifices some clarity. Overall, it is above average but not highly readable for a beginner or someone unfamiliar with the algorithm.
Run 1
1. Code Structure: Initialization, sequence generation, and output are logically organized; extracting term generation into a helper would improve separation. 2. Nesting: The nested loops and conditional are moderate and appropriate for the algorithm. 3. Clarity of intent: The class name and variables make the look-and-say purpose clear, though 'sb' is generic and a brief explanation of run counting could help. 4. Code length: Concise without unnecessary complexity; repeated access to sequence[i - 1] could be replaced with a named local variable. 5. Action granularity: Each statement performs one clear action, making state updates easy to follow. 6. Reading flow: Execution progresses naturally from initialization through generation to printing, with consistent formatting.
Run 2
Code Structure: Logically organized into initialization, sequence generation, and output; extracting term generation into a method would improve separation. Nesting: Moderate nesting from two loops and an if/else, appropriate for the algorithm but slightly demanding to follow. Clarity of intent: The class name and variables make the look-and-say purpose clear, though sb is abbreviated and MAX_TERM resembles a constant without being final. Code length: Concise, with no unnecessary logic; repeatedly accessing sequence[i - 1] could be simplified with a local variable. Action granularity: Each statement performs one clear action, including separate count and character appends. Reading flow: Natural progression through counting runs, recording them, and printing results; the final append correctly handles the remaining run, though a brief comment could clarify this step.
Run 3
Code Structure: Logically organized into initialization, sequence generation, and output, though extracting term generation into a helper would improve separation. Nesting: Moderate nesting from two loops and an if/else is manageable and appropriate to the algorithm. Clarity of intent: The class name and variables make the look-and-say purpose clear; sb is less descriptive, and MAX_TERM uses constant-style naming without being final. Code length: Concise, with little unnecessary code, though repeated sequence[i - 1] access could be replaced by a named local variable. Action granularity: Each statement performs one clear action, including separate append operations. Reading flow: Natural progression from setup through counting runs to printing; appending the final run outside the inner loop is correct but could benefit from a brief explanatory comment.