code: public void replaceInclusive(Instruction _head, Instruction _tail, Instruction _newOne) {
        _newOne.setNextExpr(null);
        _newOne.setPrevExpr(null);
        final Instruction prevHead = _head.getPrevExpr();
        if (_tail == null) {
           // this is the new tail
           _newOne.setPrevExpr(prevHead);
           prevHead.setNextExpr(_newOne);
           tail = _newOne;
        } else {
           final Instruction tailNext = _tail.getNextExpr();
           if (prevHead == null) {
              // this is the new head
              if (tailNext == null) {
                 head = tail = _newOne;
              } else {
                 _newOne.setNextExpr(head);
                 head.setPrevExpr(_newOne);
                 head = _newOne;
              }
           } else if (tailNext == null) {
              _newOne.setPrevExpr(prevHead);
              prevHead.setNextExpr(_newOne);
              tail = _newOne;
              _head.setPrevExpr(null);
           } else {
              _newOne.setNextExpr(tailNext);
              _newOne.setPrevExpr(prevHead);
              prevHead.setNextExpr(_newOne);
              tailNext.setPrevExpr(_newOne);
  
           }
           _tail.setNextExpr(null);
           _head.setPrevExpr(null);
        }
  
     }
docs: Inclusive replace between _head and _tail with _newOne.
  
  <pre>
  |      | --> |       | ---> ... ---> |       | ---> |      |
  | prev |     | _head |               | _tail |      | next |
  |      | <-- |       | <--- ... <----|       | <--- |      |
  </pre>
  To
  <pre>
  |      | --> |         | ---> |      |
  | prev |     | _newOne |      | next |
  |      | <-- |         | <--- |      |
  </pre>