Program: 154389
Project: 154389
Buggy source:
/** 
 * Makes a naive move based on the current state of the game using a heuristic
 * @return
 */
private Move naiveMove(){
  ArrayList<Move> possibleMoves=findPossibleMoves(game);
  Move move=null;
  int myValue=game.shortestPath(game.myTurn()).size();
  int playerShortestPath=game.shortestPath(game.players().other(game.myTurn())).size();
  int highestValue=(int)Double.NEGATIVE_INFINITY;
  int index=0;
  Random random=new Random();
  if (myValue >= playerShortestPath - 1 && game.myTurn().wallsLeft() != 0 && game.moves.size() > random.nextInt(4)) {
    for (int i=0; i < possibleMoves.size(); i++) {
      int value=0;
      if (possibleMoves.get(i).direction() == MoveType.HORIZONTAL || possibleMoves.get(i).direction() == MoveType.VERTICAL) {
        Game tempGame=createTempGame(game.moves);
        tempGame.move(possibleMoves.get(i),tempGame.myTurn);
        int tempShortest=tempGame.shortestPath(tempGame.myTurn).size();
        int myTempShortest=tempGame.shortestPath(tempGame.players.other(tempGame.myTurn)).size();
        value=(tempGame.shortestPath(tempGame.myTurn).size()) - (myTempShortest - myValue) - wallDistance(possibleMoves.get(i));
        if (playerShortestPath == tempShortest) {
          if (myValue == myTempShortest) {
            value=value * 1 / 2 - 20;
            System.out.println(value);
          }
        }
        if (isAdjacent(possibleMoves.get(i))) {
          value++;
        }
        if (value > highestValue) {
          highestValue=value;
          index=i;
        }
      }
      move=possibleMoves.get(index);
    }
  }
 else {
    move=game.shortestPath(game.myTurn()).get(1);
    if (!game.isValid(move,game.myTurn())) {
      move=game.shortestPath(game.myTurn()).get(2);
      if (!game.isValid(move,game.myTurn())) {
        Game tempGame=createTempGame(game.moves);
        Game tempGameTwo=createTempGame(game.moves);
        Point p=game.myTurn().pawn();
        Move tempMove=new Move(p.x() + 1,p.y(),MoveType.PAWN);
        Move tempMoveTwo=new Move(p.x() - 1,p.y(),MoveType.PAWN);
        if (tempGame.isValid(tempMove,tempGame.myTurn())) {
          move=tempMove;
          if (tempGame.isValid(tempMoveTwo,tempGame.myTurn())) {
            tempGame.move(tempMove,game.myTurn());
            tempGameTwo.move(tempMoveTwo,game.myTurn());
            if (tempGame.shortestPath(tempGame.players().other(tempGame.myTurn())).size() < tempGameTwo.shortestPath(tempGameTwo.players().other(tempGameTwo.myTurn())).size()) {
              move=tempMove;
            }
 else {
              move=tempMoveTwo;
            }
          }
        }
 else         if (tempGame.isValid(tempMoveTwo,tempGame.myTurn())) {
          move=tempMoveTwo;
        }
      }
    }
  }
  return move;
}

Fixed version (ground truth):
/** 
 * Makes a naive move based on the current state of the game using a heuristic
 * @return
 */
private Move naiveMove(){
  ArrayList<Move> possibleMoves=findPossibleMoves(game);
  Move move=null;
  int myValue=game.shortestPath(game.myTurn()).size();
  int playerShortestPath=game.shortestPath(game.players().other(game.myTurn())).size();
  int highestValue=(int)Double.NEGATIVE_INFINITY;
  int index=0;
  Random random=new Random();
  if (myValue >= playerShortestPath - 1 && game.myTurn().wallsLeft() != 0 && game.moves.size() > random.nextInt(4)) {
    for (int i=0; i < possibleMoves.size(); i++) {
      int value=0;
      if (possibleMoves.get(i).direction() == MoveType.HORIZONTAL || possibleMoves.get(i).direction() == MoveType.VERTICAL) {
        Game tempGame=createTempGame(game.moves);
        tempGame.move(possibleMoves.get(i),tempGame.myTurn);
        int tempShortest=tempGame.shortestPath(tempGame.myTurn).size();
        int myTempShortest=tempGame.shortestPath(tempGame.players.other(tempGame.myTurn)).size();
        value=(tempGame.shortestPath(tempGame.myTurn).size()) - (myTempShortest - myValue) - wallDistance(possibleMoves.get(i));
        if (playerShortestPath == tempShortest) {
          if (myValue == myTempShortest) {
            value=value * 1 / 2 - 20;
          }
        }
        if (isAdjacent(possibleMoves.get(i))) {
          value++;
        }
        if (value > highestValue) {
          highestValue=value;
          index=i;
        }
      }
      move=possibleMoves.get(index);
    }
  }
 else {
    move=game.shortestPath(game.myTurn()).get(1);
    if (!game.isValid(move,game.myTurn())) {
      move=game.shortestPath(game.myTurn()).get(2);
      if (!game.isValid(move,game.myTurn())) {
        Game tempGame=createTempGame(game.moves);
        Game tempGameTwo=createTempGame(game.moves);
        Point p=game.myTurn().pawn();
        Move tempMove=new Move(p.x() + 1,p.y(),MoveType.PAWN);
        Move tempMoveTwo=new Move(p.x() - 1,p.y(),MoveType.PAWN);
        if (tempGame.isValid(tempMove,tempGame.myTurn())) {
          move=tempMove;
          if (tempGame.isValid(tempMoveTwo,tempGame.myTurn())) {
            tempGame.move(tempMove,game.myTurn());
            tempGameTwo.move(tempMoveTwo,game.myTurn());
            if (tempGame.shortestPath(tempGame.players().other(tempGame.myTurn())).size() < tempGameTwo.shortestPath(tempGameTwo.players().other(tempGameTwo.myTurn())).size()) {
              move=tempMove;
            }
 else {
              move=tempMoveTwo;
            }
          }
        }
 else         if (tempGame.isValid(tempMoveTwo,tempGame.myTurn())) {
          move=tempMoveTwo;
        }
      }
    }
  }
  return move;
}