Program: 181091
Project: 181091
Buggy source:
@Override public boolean isValid(){
  Square temp;
  Square temp2;
  boolean valid=true;
  int destination_col=destination.getCol();
  int destination_row=destination.getRow();
  int start_col=start.getCol();
  int start_row=start.getRow();
  Square between=isTwoAway(start,destination);
  if (destination_col > 8 || destination_col < 0 || destination_row > 8 || destination_row < 0) {
    valid=false;
  }
 else   if (start == destination) {
    valid=false;
  }
 else   if (isAdjacent(start,destination)) {
    if (setting.wallBetween(start,destination) || destination.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      valid=false;
    }
  }
 else   if (between != null) {
    if (!between.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      valid=false;
    }
 else     if (setting.wallBetween(start,between) || setting.wallBetween(between,destination)) {
      valid=false;
    }
  }
 else   if (start_col - destination_col == 1 && start_row - destination_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col - 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row - 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
  }
 else   if (destination_col - start_col == 1 && start_row - destination_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col + 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row - 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
  }
 else   if (destination_col - start_col == 1 && destination_row - start_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col + 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row + 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
  }
 else   if (start_col - destination_col == 1 && destination_row - start_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col - 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row + 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
  }
 else {
    valid=false;
  }
  return valid;
}

Fixed version (ground truth):
@Override public boolean isValid(){
  Square temp;
  Square temp2;
  boolean valid=true;
  int destination_col=destination.getCol();
  int destination_row=destination.getRow();
  int start_col=start.getCol();
  int start_row=start.getRow();
  Square between=isTwoAway(start,destination);
  if (destination_col > 8 || destination_col < 0 || destination_row > 8 || destination_row < 0) {
    valid=false;
  }
 else   if (start == destination) {
    valid=false;
  }
 else   if (isAdjacent(start,destination)) {
    if (setting.wallBetween(start,destination) || destination.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      valid=false;
    }
  }
 else   if (between != null) {
    if (!between.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      valid=false;
    }
 else     if (setting.wallBetween(start,between) || setting.wallBetween(between,destination)) {
      valid=false;
    }
  }
 else   if (start_col - destination_col == 1 && start_row - destination_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col - 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row - 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
 else {
      valid=false;
    }
  }
 else   if (destination_col - start_col == 1 && start_row - destination_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col + 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row - 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
 else {
      valid=false;
    }
  }
 else   if (destination_col - start_col == 1 && destination_row - start_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col + 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row + 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
 else {
      valid=false;
    }
  }
 else   if (start_col - destination_col == 1 && destination_row - start_row == 1) {
    temp=new SquareImpl(destination_col,start_row);
    temp2=new SquareImpl(start_col,destination_row);
    if (temp.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp2=new SquareImpl(destination_col - 1,start_row);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp,destination)) {
        valid=false;
      }
    }
 else     if (temp2.hasPawn(setting.getPawn(owner.getOpponent(),setting))) {
      temp=new SquareImpl(start_col,destination_row + 1);
      if (!setting.wallBetween(temp,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(start,temp2)) {
        valid=false;
      }
 else       if (setting.wallBetween(temp2,destination)) {
        valid=false;
      }
    }
 else {
      valid=false;
    }
  }
 else {
    valid=false;
  }
  return valid;
}