Program: 35225
Project: 35225
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) {
    int pos=calcSubPositionR(keyOldL,keyOldU);
    if (pos != OVERLAP_WITH_CENTER) {
      QRNode<T> sub=subs[pos];
      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;
        int pos=calcSubPositionR(keyNewL,keyNewU);
        if (pos == OVERLAP_WITH_CENTER) {
          values.add(e);
        }
 else {
          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) {
    int pos=calcSubPositionR(keyOldL,keyOldU);
    if (pos != OVERLAP_WITH_CENTER) {
      QRNode<T> sub=subs[pos];
      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;
        int pos=calcSubPositionR(keyNewL,keyNewU);
        if (pos == OVERLAP_WITH_CENTER) {
          values.add(e);
        }
 else {
          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;
}