Program: 150999
Project: 150999
Buggy source:
/** 
 * <p> Updates the feature's location inside the image.  The feature's position can be modified even if tracking fails. </p>
 * @param feature Feature being tracked.
 * @return If the tracking was successful or not.
 */
public KltTrackFault track(KltFeature feature){
  widthFeature=feature.radius * 2 + 1;
  lengthFeature=widthFeature * widthFeature;
  boolean startedOutside;
  if (descFeature.data.length < lengthFeature)   descFeature.reshape(widthFeature,widthFeature);
  float origX=feature.x, origY=feature.y;
  setAllowedBounds(feature);
  float det=0;
  if (isFullyInside(feature.x,feature.y)) {
    startedOutside=false;
    Gxx=feature.Gxx;
    Gyy=feature.Gyy;
    Gxy=feature.Gxy;
    det=Gxx * Gyy - Gxy * Gxy;
    if (det < config.minDeterminant * lengthFeature) {
      return KltTrackFault.FAILED;
    }
  }
 else {
    startedOutside=true;
  }
  for (int iter=0; iter < config.maxIterations; iter++) {
    float dx, dy;
    if (!startedOutside && isFullyInside(feature.x,feature.y)) {
      computeE(feature,feature.x,feature.y);
    }
 else {
      int length=computeGandE_border(feature,feature.x,feature.y);
      det=Gxx * Gyy - Gxy * Gxy;
      if (det < config.minDeterminant * length) {
        return KltTrackFault.FAILED;
      }
    }
    dx=(Gyy * Ex - Gxy * Ey) / det;
    dy=(Gxx * Ey - Gxy * Ex) / det;
    feature.x+=dx;
    feature.y+=dy;
    if (isFullyOutside(feature.x,feature.y))     return KltTrackFault.OUT_OF_BOUNDS;
    if (Math.abs(feature.x - origX) > widthFeature || Math.abs(feature.y - origY) > widthFeature)     return KltTrackFault.DRIFTED;
    if (Math.abs(dx) < config.minPositionDelta && Math.abs(dy) < config.minPositionDelta) {
      break;
    }
  }
  if (computeError(feature) > config.maxPerPixelError)   return KltTrackFault.LARGE_ERROR;
  return KltTrackFault.SUCCESS;
}

Fixed version (ground truth):
/** 
 * <p> Updates the feature's location inside the image.  The feature's position can be modified even if tracking fails. </p>
 * @param feature Feature being tracked.
 * @return If the tracking was successful or not.
 */
public KltTrackFault track(KltFeature feature){
  setAllowedBounds(feature);
  if (descFeature.data.length < lengthFeature)   descFeature.reshape(widthFeature,widthFeature);
  float origX=feature.x, origY=feature.y;
  boolean complete=isDescriptionComplete(feature);
  float det=0;
  if (complete) {
    Gxx=feature.Gxx;
    Gyy=feature.Gyy;
    Gxy=feature.Gxy;
    det=Gxx * Gyy - Gxy * Gxy;
    if (det < config.minDeterminant * lengthFeature) {
      return KltTrackFault.FAILED;
    }
  }
  for (int iter=0; iter < config.maxIterations; iter++) {
    float dx, dy;
    if (complete && isFullyInside(feature.x,feature.y)) {
      computeE(feature,feature.x,feature.y);
    }
 else {
      int length=computeGandE_border(feature,feature.x,feature.y);
      det=Gxx * Gyy - Gxy * Gxy;
      if (det < config.minDeterminant * length) {
        return KltTrackFault.FAILED;
      }
    }
    dx=(Gyy * Ex - Gxy * Ey) / det;
    dy=(Gxx * Ey - Gxy * Ex) / det;
    feature.x+=dx;
    feature.y+=dy;
    if (isFullyOutside(feature.x,feature.y))     return KltTrackFault.OUT_OF_BOUNDS;
    if (Math.abs(feature.x - origX) > widthFeature || Math.abs(feature.y - origY) > widthFeature)     return KltTrackFault.DRIFTED;
    if (Math.abs(dx) < config.minPositionDelta && Math.abs(dy) < config.minPositionDelta) {
      break;
    }
  }
  if (computeError(feature) > config.maxPerPixelError)   return KltTrackFault.LARGE_ERROR;
  return KltTrackFault.SUCCESS;
}