Program: 35228
Project: 35228
Buggy source:
@SuppressWarnings("String_Node_Str") QREntry<T> update(QRNode<T> parent,double[] keyOldL,double[] keyOldU,double[] keyNewL,double[] keyNewU,int maxNodeSize,boolean[] requiresReinsert,int currentDepth,int maxDepth){
  if (subs != null) {
    QRNode<T> sub=findSubNode(keyOldL,keyOldU);
    if (sub != this) {
      if (sub == null) {
        return null;
      }
      QREntry<T> ret=sub.update(this,keyOldL,keyOldU,keyNewL,keyNewU,maxNodeSize,requiresReinsert,currentDepth + 1,maxDepth);
      if (ret != null && requiresReinsert[0] && QUtil.isRectEnclosed(ret.lower(),ret.upper(),center,radius / QUtil.EPS_MUL)) {
        requiresReinsert[0]=false;
        Object r=this;
        while (r instanceof QRNode) {
          r=((QRNode<T>)r).tryPut(ret,maxNodeSize,currentDepth++ > maxDepth);
        }
      }
      return ret;
    }
  }
  if (values == null) {
    return null;
  }
  for (int i=0; i < values.size(); i++) {
    QREntry<T> e=values.get(i);
    if (QUtil.isRectEqual(e,keyOldL,keyOldU)) {
      values.remove(i);
      e.setKey(keyNewL,keyNewU);
      if (QUtil.isRectEnclosed(keyNewL,keyNewU,center,radius / QUtil.EPS_MUL)) {
        requiresReinsert[0]=false;
        QRNode<T> sub=findSubNode(keyNewL,keyNewU);
        if (sub == this) {
          values.add(e);
        }
 else {
          if (false) {
          }
          Object r=this;
          while (r instanceof QRNode) {
            r=((QRNode<T>)r).tryPut(e,maxNodeSize,currentDepth++ > maxDepth);
          }
        }
      }
 else {
        requiresReinsert[0]=true;
        if (parent != null) {
          parent.checkAndMergeLeafNodes(maxNodeSize);
        }
      }
      return e;
    }
  }
  requiresReinsert[0]=false;
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") QREntry<T> update(QRNode<T> parent,double[] keyOldL,double[] keyOldU,double[] keyNewL,double[] keyNewU,int maxNodeSize,boolean[] requiresReinsert,int currentDepth,int maxDepth){
  if (subs != null) {
    QRNode<T> sub=findSubNode(keyOldL,keyOldU);
    if (sub != this) {
      if (sub == null) {
        return null;
      }
      QREntry<T> ret=sub.update(this,keyOldL,keyOldU,keyNewL,keyNewU,maxNodeSize,requiresReinsert,currentDepth + 1,maxDepth);
      if (ret != null && requiresReinsert[0] && QUtil.isRectEnclosed(ret.lower(),ret.upper(),center,radius)) {
        requiresReinsert[0]=false;
        Object r=this;
        while (r instanceof QRNode) {
          r=((QRNode<T>)r).tryPut(ret,maxNodeSize,currentDepth++ > maxDepth);
        }
      }
      return ret;
    }
  }
  if (values == null) {
    return null;
  }
  for (int i=0; i < values.size(); i++) {
    QREntry<T> e=values.get(i);
    if (QUtil.isRectEqual(e,keyOldL,keyOldU)) {
      values.remove(i);
      e.setKey(keyNewL,keyNewU);
      if (QUtil.isRectEnclosed(keyNewL,keyNewU,center,radius)) {
        requiresReinsert[0]=false;
        QRNode<T> sub=findSubNode(keyNewL,keyNewU);
        if (sub == this) {
          values.add(e);
        }
 else {
          Object r;
          if (sub == null) {
            r=this;
          }
 else {
            r=sub;
            currentDepth++;
          }
          while (r instanceof QRNode) {
            r=((QRNode<T>)r).tryPut(e,maxNodeSize,currentDepth++ > maxDepth);
          }
        }
      }
 else {
        requiresReinsert[0]=true;
        if (parent != null) {
          parent.checkAndMergeLeafNodes(maxNodeSize);
        }
      }
      return e;
    }
  }
  requiresReinsert[0]=false;
  return null;
}