Sample
JetBrains/i60
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 1.7Δ 64.8 |
| Scalabrino | 0.069 | 0–1; higher is more readable | 0.8Δ 65.7 |
| Dorn | 0.542 | 0–1; higher is more readable | 55.9Δ 10.6 |
| Mi | 0.167 | 0–1; higher is more readable | 13.6Δ 53.0 |
| LLOC | 36 | Logical lines; fewer is more readable | 0.8Δ 65.7 |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs | 23.3Δ 43.2 |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs | 10.2Δ 56.4 |
| BTTF | 0.451 | 0–1; higher is more readable | 44.1Δ 22.5 |
| Human | 0.82 | 0–1; original rating | 66.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. | 2076.108 | −68.512 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| 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.594 | −5.392 |
Intercept 8.87 + feature contributions = -45.033 (log-odds).
Score = sigmoid(-45.033) = 0.
| Score | 0.069 |
|---|
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. | 50 | −0.734 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 41 | +0.681 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 83.98 | +0.551 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 40 | −0.497 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.126 | −0.287 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.882 | +0.273 |
| 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. | 83.94 | +0.11 |
Intercept 0.07 + feature contributions = 0.167 (log-odds).
Score = sigmoid(0.167) = 0.542.
| Score | 0.167 |
|---|
| Score | 36 |
|---|
Run 1
The code has a clear overall structure and follows a logical sequence: input, process, output. The main intent is understandable, and comments help clarify each section. However, it suffers from moderate readability issues: multiple nested loops (up to 4 levels) create deep nesting, magic numbers (32) are repeated instead of using constants, and the rule-checking logic is verbose. The input source `inputGrid` is undefined, making the code incomplete and ambiguous. Action granularity is mostly fine, but the rule application block combines multiple actions in a single if-else chain. Reading flow is natural but could be improved with helper methods.
Run 2
The code has a clear sequential structure and comments that explain each major step, which aids comprehension. However, it is unnecessarily verbose due to repeated hardcoded grid size (32) and manual boundary checking. The four-level nesting for neighbor counting is somewhat deep and hurts readability. Variable names like x, y, i, j are acceptable but could be more descriptive (e.g., rowOffset, colOffset). The use of magic numbers (0, 1, 32) reduces clarity and maintainability. Action granularity is mostly reasonable, but some lines combine multiple comparisons (e.g., row < 0 || col<0 || row>=32 || col>=32). Overall, the logic is understandable but could be simplified with helper methods or constants to improve readability.
Run 3
The code has a clear logical structure for a Game of Life implementation, but has several readability issues. Magic numbers (32) are hardcoded throughout instead of constants. There's an undefined 'inputGrid' variable that should be a parameter. The neighbor-checking logic with four nested loops is excessive, though well-commented. Comments are helpful but somewhat repetitive. Variable names are descriptive ('liveNeighbors', 'newGrid'). Action granularity is generally good with one operation per line. The reading flow is natural, following initialize-count-update-print order. Overall, the logic is understandable but the code would benefit from extracting constants, methods, and improving the undefined input handling.
Run 1
Code Structure: Initialization, neighbor counting, rule application, and output are logically ordered, but all logic resides in main rather than focused methods. Nesting: Four nested loops plus conditionals make neighbor counting harder to follow; continue statements reduce some nesting. Clarity of intent: Descriptive grid and liveNeighbors names and comments explain the algorithm, although undefined inputGrid and repeated magic number 32 weaken clarity. Code length: Reasonably concise, but repeated dimensions and initialization logic could be simplified. Action granularity: Statements generally perform one action per line, making individual operations easy to scan. Reading flow: The sequence naturally follows one simulation step, but inconsistent operator spacing and the dense neighbor-counting block interrupt readability.
Run 2
Code Structure: Initialization, simulation, and output are logically ordered, but all responsibilities reside in main rather than separate methods. Nesting: Four nested loops plus conditionals make neighbor counting harder to follow; continue statements reduce additional nesting. Clarity of intent: Descriptive grid names and comments explain the Game of Life rules, but inputGrid is undefined and the repeated size literal 32 lacks a named constant. Code length: Reasonably concise, although extracting neighbor counting and removing redundant comments would improve readability. Action granularity: Each line generally performs one action, with straightforward assignments and updates. Reading flow: The progression from input to computation to output is natural, but deep indentation and inconsistent operator spacing interrupt scanning.
Run 3
Code Structure: Initialization, neighbor counting, rule application, and output are logically ordered, but all responsibilities are bundled into main rather than separate methods. Nesting: Four nested loops plus conditionals make neighbor counting harder to follow, though continue statements avoid additional nesting. Clarity of intent: Descriptive grid names and comments explain the Game of Life logic, but inputGrid is undefined in the snippet and repeated magic number 32 obscures configuration. Code length: Reasonably concise, although constants and helper methods would reduce repetition and improve scanning. Action granularity: Each statement generally performs one action, with clear assignments and updates. Reading flow: The sequence is natural and easy to trace, but deep indentation and inconsistent operator spacing interrupt readability.