docs: public void replace(BlockVector writeList)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(this, tc, "replace", writeList);
  
      boolean pushed = false;
  
      // examine lowest and highest stamp of writeList
      int wlength = writeList.size();
      long fstamp = ((RangeObject) writeList.get(0)).startstamp;
      long lstamp = ((RangeObject) writeList.get(wlength - 1)).endstamp;
  
      // Set index to position of this low. Using linear search as usually
      // called after a get() that has set the cursor to a 'good' index.
  
      int findex = linearSearch(fstamp, 0, blockVector.size() - 1);
      int lindex;
      RangeObject lastro;
      for (lindex = findex;; lindex++)
      {
        lastro = (RangeObject) blockVector.get(lindex);
        if ((lstamp <= lastro.endstamp) && (lstamp >= lastro.startstamp))
          break;
      }
      int index, count;
      if (findex == lindex)
      {
        if ((fstamp > lastro.startstamp) && (lstamp < lastro.endstamp))
        {
          // need to clone lastro
          RangeObject ro2 = (RangeObject) lastro.clone();
          ro2.startstamp = lstamp + 1;
          //and push it onto end of writeList
          writeList.add(ro2);
          wlength++;
          pushed = true;
          // adjust lastro.endstamp
          // lastro = (RangeObject) lastro.clone(); *no cloning unless necessary*
          lastro.endstamp = fstamp - 1;
          // blockVector.m_data[findex] = lastro; *no cloning unless necessary*
          // set the index to point to where need to add to put writeList
          index = findex + 1;
          count = wlength; // space to be created/destroyed
        }
        else
          if (fstamp > lastro.startstamp)
          {
            // adjust lastro.endstamp
            // lastro = (RangeObject) lastro.clone(); *no cloning unless necessary*
            lastro.endstamp = fstamp - 1;
            // blockVector.m_data[findex] = lastro; *no cloning unless necessary*
            // set the index to point to where need to add to put writeList
            index = findex + 1;
            count = wlength; // space to be created/destroyed
          }
          else
            if (lstamp < lastro.endstamp)
            {
              // adjust lastro.startstamp
              // lastro = (RangeObject) lastro.clone(); *no cloning unless necessary*
              lastro.startstamp = lstamp + 1;
              // blockVector.m_data[findex] = lastro; *no cloning unless necessary*
              // set the index to point to where need to add to put writeList
              index = findex;
              count = wlength; // space to be created/destroyed
            }
            else
            {
              // need to remove lastro
              index = findex;
              count = wlength - 1;
            }
      }
      else
      { // lindex > findex
        // in the worst case (lindex - findex + 1) elements will be replaced by
        // wlength elements, so only need the following extra space
        count = wlength - (lindex - findex + 1);
        index = findex;
        // adjust range in object at findex or remove it
        RangeObject firstro = (RangeObject) blockVector.get(findex);
        if (fstamp > firstro.startstamp)
        {
          // adjust firstro.endstamp
          // firstro = (RangeObject) firstro.clone();
          firstro.endstamp = fstamp - 1;
          // blockVector.m_data[findex] = firstro;
          // set the index to point to where need to add to put writeList
          index++;
          count++; // the element at findex will not be removed
        }
        // adjust range in object at lindex or remove it
        if (lstamp < lastro.endstamp)
        {
          // adjust lastro.startstamp
          // lastro = (RangeObject) lastro.clone();
          lastro.startstamp = lstamp + 1;
          // blockVector.m_data[lindex] = lastro;
          count++;
        }
      }
  
      // now do the removal and addition in one-shot
      if (count > 0)
        blockVector.insertNullElementsAt(index, count);
      else
        if (count < 0)
        {
          count = -count;
          blockVector.removeElementsAt(index, count);
        }
  
      // put the stuff in writeList into blockVector
      for (int i = 0; i < writeList.size(); i++)
      {
        if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "Setting " + writeList.get(i) + " at index " + (i+ index) );
        
        blockVector.set(i + index, writeList.get(i));
        
        // Just to make sure that worked (see 240699)
        if(blockVector.get(i + index) == null)
        {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "replace", "SIErrorException: null range at index " + (i + index));
          
          throw new SIErrorException( 
            nls.getFormattedMessage( 
            "INTERNAL_MESSAGING_ERROR_CWSIP0005", 
            new Object[] { "ARangeList", 
                           "1:347:1.25", 
                           "Null range at index " + (i + index)},  
            null)); 
        }
      }
      if (pushed) // remove the extraneous element pushed onto the end of writeList
        writeList.remove(writeList.size() - 1);
  
      cursor = index;
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "replace", Integer.valueOf(cursor));
    }