Sample

JetBrains/b60

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.71
Lines47

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
0.0Δ 45.8
Scalabrino0.4550–1; higher is more readable
29.7Δ 16.1
Dorn0.1660–1; higher is more readable
11.0Δ 34.7
Mi0.3140–1; higher is more readable
26.3Δ 19.5
LLOC35Logical lines; fewer is more readable
1.7Δ 44.1
DeepSeek V4 Pro13.670–20; mean of three runs
32.2Δ 13.6
GPT-6.1 Sol160–20; mean of three runs
26.7Δ 19.1
BTTF0.4350–1; higher is more readable
35.6Δ 10.2
Human0.710–1; original rating
45.8

Views

Source code

public class GameOfLife { public static void main(String[] args) { char[][] grid = new char[32][32]; // fill the grid with initial values for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { // assign random value of # or . grid[i][j] = Math.random() > 0.5 ? '#' : '.'; } } // calculate the next state of the grid char[][] nextGrid = new char[32][32]; for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { int liveNeighbours = countLiveNeighbours(grid, i, j); if (grid[i][j] == '#' && (liveNeighbours == 2 || liveNeighbours == 3)) { nextGrid[i][j] = '#'; } else if (grid[i][j] == '.' && liveNeighbours == 3) { nextGrid[i][j] = '#'; } else { nextGrid[i][j] = '.'; } } } // output the next state of the grid for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { System.out.print(nextGrid[i][j]); } System.out.println(); } } private static int countLiveNeighbours(char[][] grid, int i, int j) { int count = 0; for (int x = -1; x <= 1; x++) { for (int y = -1; y <= 1; y++) { int row = i + x; int col = j + y; if (row >= 0 && row < 32 && col >= 0 && col < 32 && !(x == 0 && y == 0)) { count += grid[row][col] == '#' ? 1 : 0; } } } return count; } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.2402.925−79.297
Source linesThe number of non-empty source lines.47+18.8
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.706−5.56

Intercept 8.87 + feature contributions = -57.186 (log-odds).
Score = sigmoid(-57.186) = 0.

Score0.455

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.94+0.712
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.47−0.628
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.43−0.566
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.14−0.414
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.93.915−0.313
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.45.779+0.23

Intercept 0.07 + feature contributions = -1.611 (log-odds).
Score = sigmoid(-1.611) = 0.166.

Score0.314
Score35
Run 1

The code is structurally clear with separate main logic and a helper method for neighbor counting. Nesting is moderate (3 loops deep) and acceptable for grid operations. Intent is mostly clear, but magic numbers like 32 and hardcoded '#' '.' characters reduce clarity. Code length is reasonable but could be improved with named constants. Action granularity is good—most lines perform one action. Reading flow is natural, though the neighbor-check condition in countLiveNeighbours is long and somewhat hard to parse. Overall, the code is readable but would benefit from constants and perhaps extracting boundary logic for improved clarity.

Run 2

The code has a clear overall structure with logically separated sections: initialization, state calculation, output, and a helper method. However, the use of magic numbers (32) throughout hurts readability and maintainability. The nesting depth is moderate (two levels in most loops), but the `countLiveNeighbours` method has a complex conditional statement that combines multiple boundary checks, reducing clarity. The intent is fairly clear due to descriptive method names and comments, though the inline ternary operators add some cognitive load. Code length is reasonable and action granularity is mostly one action per line. Reading flow is natural and follows a logical sequence. The biggest weaknesses are the hardcoded array size and the dense neighbor-counting logic.

Run 3

The code is reasonably readable but has notable maintainability issues. The structure is logical, separating initialization, state computation, and output, with the neighbor counting extracted into a helper method. Nesting is moderate — mostly two levels, with a triple-nested condition in countLiveNeighbours. Intent is generally clear from comments and variable names, though magic numbers like 32 should be constants to clarify meaning. Code length is moderate; the neighbor check could be simplified for conciseness. Action granularity is mostly one action per line, aiding readability. Reading flow is natural — top-down with clear sequential steps. However, the lack of named constants, hardcoded grid dimensions, and slightly verbose boundary checks reduce clarity. Overall, the code is understandable but not highly polished.

Run 1

1. Code Structure: Initialization, state calculation, and output are logically separated, with neighbor counting extracted into a helper; main could be split further. 2. Nesting: Two-level loops are natural for grids, though conditionals add moderate depth. 3. Clarity of intent: Descriptive grid names, comments, and explicit rules make the purpose clear; repeated magic values (32, '#', '.') and index names reduce expressiveness. 4. Code length: Reasonably concise, with minor repetition in loop bounds and live-cell assignments. 5. Action granularity: Each line generally performs one clear action; ternary expressions remain compact and understandable. 6. Reading flow: The progression from initialization to calculation to output is natural, although the long boundary-check condition requires extra attention.

Run 2

Code Structure: Initialization, state calculation, and output are logically grouped, with neighbor counting extracted into a helper; main could be further decomposed. Nesting: Two nested loops plus conditionals create moderate, manageable depth. Clarity of intent: Descriptive names and section comments explain the purpose, though repeated magic values (32, '#', '.') and terse coordinate names reduce clarity. Code length: Reasonably concise, with some repetitive loop structure and duplicated live-cell assignments. Action granularity: Statements generally perform one action per line; ternary expressions are compact and understandable. Reading flow: Execution follows a natural initialize-update-print sequence, and the helper is straightforward, although its long boundary-and-center-exclusion condition requires extra attention.

Run 3

Code Structure: Initialization, state calculation, and output are logically ordered, with neighbor counting extracted into a helper; main could be split further. Nesting: Two nested loops plus conditionals create moderate, manageable depth. Clarity of intent: Descriptive names and section comments make the purpose clear, though repeated literals such as 32, '#' and '.' would benefit from named constants. Code length: Reasonably concise, with some repetitive grid traversal and assignments. Action granularity: Each line generally performs one action, and ternary expressions remain readable. Reading flow: Execution proceeds naturally from setup to computation to display; the lengthy boundary-check condition slightly slows reading.