Program: 68959
Project: 68959
Buggy source:
/** 
 * Draw move numbers and/or mark the last played move
 */
private void drawMoveNumbers(Graphics2D g){
  g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  int[] lastMove=Lizzie.board.getLastMove();
  int lastMoveNumber=Lizzie.board.getData().getMoveNumber();
  if (!Lizzie.optionSetting.isShowMoveNumber() && branch == null) {
    if (lastMove != null) {
      int lastMoveMarkerRadius=stoneRadius / 2;
      int stoneX=x + scaledMargin + squareLength * lastMove[0];
      int stoneY=y + scaledMargin + squareLength * lastMove[1];
      g.setColor(Lizzie.board.getStones()[Board.getIndex(lastMove[0],lastMove[1])].isWhite() ? Color.BLACK : Color.WHITE);
      drawCircle(g,stoneX,stoneY,lastMoveMarkerRadius);
    }
 else     if (lastMoveNumber != 0) {
      g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(255,255,255,150) : new Color(0,0,0,150));
      g.fillOval(x + boardLength / 2 - 4 * stoneRadius,y + boardLength / 2 - 4 * stoneRadius,stoneRadius * 8,stoneRadius * 8);
      g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(0,0,0,255) : new Color(255,255,255,255));
      drawString(g,x + boardLength / 2,y + boardLength / 2,"String_Node_Str","String_Node_Str",stoneRadius * 4,stoneRadius * 6);
    }
  }
 else {
    if (branch == null) {
      int[] moveNumberList=Lizzie.board.getMoveNumberList();
      for (int i=0; i < Board.BOARD_SIZE; i++) {
        for (int j=0; j < Board.BOARD_SIZE; j++) {
          int stoneX=x + scaledMargin + squareLength * i;
          int stoneY=y + scaledMargin + squareLength * j;
          Stone stoneAtThisPoint=Lizzie.board.getStones()[Board.getIndex(i,j)];
          if (moveNumberList[Board.getIndex(i,j)] > 0) {
            if (lastMove != null && i == lastMove[0] && j == lastMove[1])             g.setColor(Color.RED.brighter());
 else             g.setColor(stoneAtThisPoint.isBlack() ? Color.WHITE : Color.BLACK);
            String moveNumberString=moveNumberList[Board.getIndex(i,j)] + "String_Node_Str";
            drawString(g,stoneX,stoneY,"String_Node_Str",moveNumberString,(float)(stoneRadius * 1.4),(int)(stoneRadius * 1.4));
          }
        }
      }
      if (lastMove == null && lastMoveNumber != 0) {
        g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(255,255,255,150) : new Color(0,0,0,150));
        g.fillOval(x + boardLength / 2 - 4 * stoneRadius,y + boardLength / 2 - 4 * stoneRadius,stoneRadius * 8,stoneRadius * 8);
        g.setColor(Color.RED);
        drawString(g,x + boardLength / 2,y + boardLength / 2,"String_Node_Str",Font.PLAIN,String.valueOf(lastMoveNumber),stoneRadius * 4,stoneRadius * 6,1);
        g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(0,0,0,255) : new Color(255,255,255,255));
        drawString(g,x + boardLength / 2,y + boardLength / 2 + stoneRadius,"String_Node_Str","String_Node_Str",stoneRadius * 4,stoneRadius * 6);
      }
    }
 else {
      int nextVariationNumber=0;
      if (Lizzie.board.isInTryPlayState()) {
        nextVariationNumber=Lizzie.board.getData().getMoveNumber() - Lizzie.board.getTryPlayStateBeginMoveNumber();
        if (nextVariationNumber < 0) {
          nextVariationNumber=0;
        }
      }
      Stone nextStone=Lizzie.board.getData().getLastMoveColor();
      if (nextStone == Stone.EMPTY) {
        nextStone=Stone.WHITE;
      }
      for (      String move : branch.getVariation()) {
        ++nextVariationNumber;
        if (nextVariationNumber > Lizzie.optionSetting.getVariationLimit()) {
          break;
        }
        nextStone=nextStone.opposite();
        if (nextVariationNumber == 1) {
          continue;
        }
        int[] coords=Board.convertNameToCoordinates(move);
        int i=coords[0], j=coords[1];
        if (Board.isValid(i,j)) {
          int stoneX=x + scaledMargin + squareLength * i;
          int stoneY=y + scaledMargin + squareLength * j;
          g.setColor(nextStone.equals(Stone.BLACK) ? Color.WHITE : Color.BLACK);
          String moveNumberString=String.valueOf(nextVariationNumber);
          drawString(g,stoneX,stoneY,"String_Node_Str",moveNumberString,(float)(stoneRadius * 1.4),(int)(stoneRadius * 1.4));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Draw move numbers and/or mark the last played move
 */
private void drawMoveNumbers(Graphics2D g){
  g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  int[] lastMove=Lizzie.board.getLastMove();
  int lastMoveNumber=Lizzie.board.getData().getMoveNumber();
  if (!Lizzie.optionSetting.isShowMoveNumber() && branch == null) {
    if (lastMove != null) {
      int lastMoveMarkerRadius=stoneRadius / 2;
      int stoneX=x + scaledMargin + squareLength * lastMove[0];
      int stoneY=y + scaledMargin + squareLength * lastMove[1];
      g.setColor(Lizzie.board.getStones()[Board.getIndex(lastMove[0],lastMove[1])].isWhite() ? Color.BLACK : Color.WHITE);
      drawCircle(g,stoneX,stoneY,lastMoveMarkerRadius);
    }
 else     if (lastMoveNumber != 0) {
      g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(255,255,255,150) : new Color(0,0,0,150));
      g.fillOval(x + boardLength / 2 - 4 * stoneRadius,y + boardLength / 2 - 4 * stoneRadius,stoneRadius * 8,stoneRadius * 8);
      g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(0,0,0,255) : new Color(255,255,255,255));
      drawString(g,x + boardLength / 2,y + boardLength / 2,"String_Node_Str","String_Node_Str",stoneRadius * 4,stoneRadius * 6);
    }
  }
 else {
    if (branch == null) {
      int[] moveNumberList=Lizzie.board.getMoveNumberList();
      for (int i=0; i < Board.BOARD_SIZE; i++) {
        for (int j=0; j < Board.BOARD_SIZE; j++) {
          int stoneX=x + scaledMargin + squareLength * i;
          int stoneY=y + scaledMargin + squareLength * j;
          Stone stoneAtThisPoint=Lizzie.board.getStones()[Board.getIndex(i,j)];
          if (moveNumberList[Board.getIndex(i,j)] > 0) {
            if (lastMove != null && i == lastMove[0] && j == lastMove[1])             g.setColor(Color.RED.brighter());
 else             g.setColor(stoneAtThisPoint.isBlack() ? Color.WHITE : Color.BLACK);
            String moveNumberString=moveNumberList[Board.getIndex(i,j)] + "String_Node_Str";
            drawString(g,stoneX,stoneY,"String_Node_Str",moveNumberString,(float)(stoneRadius * 1.4),(int)(stoneRadius * 1.4));
          }
        }
      }
      if (lastMove == null && lastMoveNumber != 0) {
        g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(255,255,255,150) : new Color(0,0,0,150));
        g.fillOval(x + boardLength / 2 - 4 * stoneRadius,y + boardLength / 2 - 4 * stoneRadius,stoneRadius * 8,stoneRadius * 8);
        g.setColor(Color.RED);
        drawString(g,x + boardLength / 2,y + boardLength / 2,"String_Node_Str",Font.PLAIN,String.valueOf(lastMoveNumber),stoneRadius * 4,stoneRadius * 6,1);
        g.setColor(Lizzie.board.getData().isBlackToPlay() ? new Color(0,0,0,255) : new Color(255,255,255,255));
        drawString(g,x + boardLength / 2,y + boardLength / 2 + stoneRadius,"String_Node_Str","String_Node_Str",stoneRadius * 4,stoneRadius * 6);
      }
    }
 else {
      int nextVariationNumber=0;
      if (Lizzie.board.isInTryPlayState()) {
        nextVariationNumber=Lizzie.board.getData().getMoveNumber() - Lizzie.board.getTryPlayStateBeginMoveNumber();
        if (nextVariationNumber < 0) {
          nextVariationNumber=0;
        }
      }
      Stone nextStone=Lizzie.board.getData().getLastMoveColor();
      if (nextStone == Stone.EMPTY) {
        nextStone=Stone.WHITE;
      }
      for (      String move : branch.getVariation()) {
        ++nextVariationNumber;
        if (nextVariationNumber > Lizzie.optionSetting.getVariationLimit()) {
          break;
        }
        nextStone=nextStone.opposite();
        if (nextVariationNumber == 1) {
          continue;
        }
        if (nextVariationNumber > Lizzie.optionSetting.getVariationLimit()) {
          break;
        }
        int[] coords=Board.convertNameToCoordinates(move);
        int i=coords[0], j=coords[1];
        if (Board.isValid(i,j)) {
          int stoneX=x + scaledMargin + squareLength * i;
          int stoneY=y + scaledMargin + squareLength * j;
          g.setColor(nextStone.equals(Stone.BLACK) ? Color.WHITE : Color.BLACK);
          String moveNumberString=String.valueOf(nextVariationNumber);
          drawString(g,stoneX,stoneY,"String_Node_Str",moveNumberString,(float)(stoneRadius * 1.4),(int)(stoneRadius * 1.4));
        }
      }
    }
  }
}