Program: 56393
Project: 56393
Buggy source:
@Override public final Path findPath(IPathCalculateable requester,final short sx,final short sy,final short tx,final short ty){
  final boolean blockedAtStart;
  if (!isInBounds(sx,sy)) {
    throw new InvalidStartPositionException("String_Node_Str",sx,sy);
  }
 else   if (!isInBounds(tx,ty) || isBlocked(requester,tx,ty)) {
    return null;
  }
 else   if (sx == tx && sy == ty) {
    return null;
  }
 else   if (isBlocked(requester,sx,sy)) {
    blockedAtStart=true;
  }
 else {
    blockedAtStart=false;
  }
  float temp=xFactor;
  xFactor=yFactor;
  yFactor=temp;
  final int targetFlatIdx=getFlatIdx(tx,ty);
  closedList.clear();
  openList.clear();
  open.clear();
  boolean found=false;
  initStartNode(sx,sy,tx,ty);
  while (!open.isEmpty()) {
    int currFlatIdx=open.deleteMin();
    short x=getX(currFlatIdx);
    short y=getY(currFlatIdx);
    setClosed(x,y);
    if (targetFlatIdx == currFlatIdx) {
      found=true;
      break;
    }
    for (int i=0; i < EDirection.NUMBER_OF_DIRECTIONS; i++) {
      short neighborX=(short)(x + xDeltaArray[i]);
      short neighborY=(short)(y + yDeltaArray[i]);
      if (isValidPosition(requester,neighborX,neighborY,blockedAtStart)) {
        int flatNeighborIdx=getFlatIdx(neighborX,neighborY);
        if (!closedList.get(flatNeighborIdx)) {
          float newCosts=costsAndHeuristics[getCostsIdx(currFlatIdx)] + map.getCost(x,y,neighborX,neighborY);
          if (openList.get(flatNeighborIdx)) {
            if (costsAndHeuristics[getCostsIdx(flatNeighborIdx)] > newCosts) {
              costsAndHeuristics[getCostsIdx(flatNeighborIdx)]=newCosts;
              depthParentHeap[getDepthIdx(flatNeighborIdx)]=depthParentHeap[getDepthIdx(currFlatIdx)] + 1;
              depthParentHeap[getParentIdx(flatNeighborIdx)]=currFlatIdx;
              open.siftUp(flatNeighborIdx);
            }
          }
 else {
            costsAndHeuristics[getCostsIdx(flatNeighborIdx)]=newCosts;
            costsAndHeuristics[getHeuristicIdx(flatNeighborIdx)]=getHeuristicCost(neighborX,neighborY,tx,ty);
            depthParentHeap[getDepthIdx(flatNeighborIdx)]=depthParentHeap[getDepthIdx(currFlatIdx)] + 1;
            depthParentHeap[getParentIdx(flatNeighborIdx)]=currFlatIdx;
            openList.set(flatNeighborIdx);
            open.insert(flatNeighborIdx);
            map.markAsOpen(neighborX,neighborY);
          }
        }
      }
    }
  }
  if (found) {
    int pathlength=depthParentHeap[getDepthIdx(getFlatIdx(tx,ty))];
    Path path=new Path(pathlength);
    int idx=pathlength;
    int parentFlatIdx=targetFlatIdx;
    while (idx > 0) {
      idx--;
      path.insertAt(idx,getX(parentFlatIdx),getY(parentFlatIdx));
      parentFlatIdx=depthParentHeap[getParentIdx(parentFlatIdx)];
    }
    path.initPath();
    return path;
  }
  return null;
}

Fixed version (ground truth):
@Override public final Path findPath(IPathCalculateable requester,final short sx,final short sy,final short tx,final short ty){
  final boolean blockedAtStart;
  if (!isInBounds(sx,sy)) {
    throw new InvalidStartPositionException("String_Node_Str",sx,sy);
  }
 else   if (!isInBounds(tx,ty) || isBlocked(requester,tx,ty) || map.getBlockedPartition(sx,sy) != map.getBlockedPartition(tx,ty)) {
    return null;
  }
 else   if (sx == tx && sy == ty) {
    return null;
  }
 else   if (isBlocked(requester,sx,sy)) {
    blockedAtStart=true;
  }
 else {
    blockedAtStart=false;
  }
  float temp=xFactor;
  xFactor=yFactor;
  yFactor=temp;
  final int targetFlatIdx=getFlatIdx(tx,ty);
  closedList.clear();
  openList.clear();
  open.clear();
  boolean found=false;
  initStartNode(sx,sy,tx,ty);
  while (!open.isEmpty()) {
    int currFlatIdx=open.deleteMin();
    short x=getX(currFlatIdx);
    short y=getY(currFlatIdx);
    setClosed(x,y);
    if (targetFlatIdx == currFlatIdx) {
      found=true;
      break;
    }
    for (int i=0; i < EDirection.NUMBER_OF_DIRECTIONS; i++) {
      short neighborX=(short)(x + xDeltaArray[i]);
      short neighborY=(short)(y + yDeltaArray[i]);
      if (isValidPosition(requester,neighborX,neighborY,blockedAtStart)) {
        int flatNeighborIdx=getFlatIdx(neighborX,neighborY);
        if (!closedList.get(flatNeighborIdx)) {
          float newCosts=costsAndHeuristics[getCostsIdx(currFlatIdx)] + map.getCost(x,y,neighborX,neighborY);
          if (openList.get(flatNeighborIdx)) {
            if (costsAndHeuristics[getCostsIdx(flatNeighborIdx)] > newCosts) {
              costsAndHeuristics[getCostsIdx(flatNeighborIdx)]=newCosts;
              depthParentHeap[getDepthIdx(flatNeighborIdx)]=depthParentHeap[getDepthIdx(currFlatIdx)] + 1;
              depthParentHeap[getParentIdx(flatNeighborIdx)]=currFlatIdx;
              open.siftUp(flatNeighborIdx);
            }
          }
 else {
            costsAndHeuristics[getCostsIdx(flatNeighborIdx)]=newCosts;
            costsAndHeuristics[getHeuristicIdx(flatNeighborIdx)]=getHeuristicCost(neighborX,neighborY,tx,ty);
            depthParentHeap[getDepthIdx(flatNeighborIdx)]=depthParentHeap[getDepthIdx(currFlatIdx)] + 1;
            depthParentHeap[getParentIdx(flatNeighborIdx)]=currFlatIdx;
            openList.set(flatNeighborIdx);
            open.insert(flatNeighborIdx);
            map.markAsOpen(neighborX,neighborY);
          }
        }
      }
    }
  }
  if (found) {
    int pathlength=depthParentHeap[getDepthIdx(getFlatIdx(tx,ty))];
    Path path=new Path(pathlength);
    int idx=pathlength;
    int parentFlatIdx=targetFlatIdx;
    while (idx > 0) {
      idx--;
      path.insertAt(idx,getX(parentFlatIdx),getY(parentFlatIdx));
      parentFlatIdx=depthParentHeap[getParentIdx(parentFlatIdx)];
    }
    path.initPath();
    return path;
  }
  return null;
}