Program: 76331
Project: 76331
Buggy source:
/** 
 * Return an object in the queue or history. The object is not removed from the queue or history. If the offset argument is zero, return the oldest object in the queue. If the offset is 1, return the second oldest object, etc. If there is no such object in the queue (the offset is greater than or equal to the current queue size), throw an exception. If the argument is -1, return the most recent object that was put in the history. If the argument is -2, return the second most recent object in the history, etc. If there is no such object in the history (the history capacity is zero or the absolute value of the offset is greater than the current size of the history queue), throw an exception.
 * @param offset The position of the desired object.
 * @return The desired object in the queue or history.
 * @exception NoSuchElementException If the offset is out of range.
 */
public Object get(int offset) throws NoSuchElementException {
  Object obj=null;
  if (offset >= 0) {
    if (offset >= size()) {
      String str="String_Node_Str";
      if (_container != null) {
        str="String_Node_Str" + _container.getFullName();
      }
      throw new NoSuchElementException("String_Node_Str" + offset + "String_Node_Str"+ str);
    }
    int loc=_queueback + offset;
    if (loc >= _queuearray.length)     loc=loc % _queuearray.length;
    obj=_queuearray[loc];
  }
 else {
    try {
      obj=_historylist.at(historySize() + offset);
    }
 catch (    NoSuchElementException ex) {
      String str="String_Node_Str";
      if (_container != null) {
        str="String_Node_Str" + _container.getFullName();
      }
      throw new NoSuchElementException("String_Node_Str" + offset + "String_Node_Str"+ str);
    }
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * Return an object in the queue or history. The object is not removed from the queue or history. If the offset argument is zero, return the oldest object in the queue. If the offset is 1, return the second oldest object, etc. If there is no such object in the queue (the offset is greater than or equal to the current queue size), throw an exception. If the argument is -1, return the most recent object that was put in the history. If the argument is -2, return the second most recent object in the history, etc. If there is no such object in the history (the history capacity is zero or the absolute value of the offset is greater than the current size of the history queue), throw an exception.
 * @param offset The position of the desired object.
 * @return The desired object in the queue or history.
 * @exception NoSuchElementException If the offset is out of range.
 */
public Object get(int offset) throws NoSuchElementException {
  Object obj=null;
  if (offset >= 0) {
    if (offset >= size()) {
      String str="String_Node_Str";
      if (_container != null) {
        str="String_Node_Str" + _container.getFullName();
      }
      throw new NoSuchElementException("String_Node_Str" + offset + "String_Node_Str"+ str);
    }
    int loc=_queueBack + offset;
    if (loc >= _queueArray.length)     loc=loc % _queueArray.length;
    obj=_queueArray[loc];
  }
 else {
    try {
      obj=_historyList.get(historySize() + offset);
    }
 catch (    Exception ex) {
      String str="String_Node_Str";
      if (_container != null) {
        str="String_Node_Str" + _container.getFullName();
      }
      throw new NoSuchElementException("String_Node_Str" + offset + "String_Node_Str"+ str);
    }
  }
  return obj;
}