Program: 76509
Project: 76509
Buggy source:
/** 
 * Perform the actions contained by the mutation events in this mutation request. (Note that no events are passed to any listeners.) If any action throws an exception, undo all the actions done so far, and then throw a TopologyFailedException containing the original exception. If any action undo fails, throw a TopologyFailedException containing both the original exception and the exception thrown on undo.
 * @throws TopologyChangeFailedException if the mutation failed
 * @exception IllegalActionException If the change has alreadybeen implemented.
 */
public void performRequest() throws TopologyChangeFailedException, IllegalActionException {
  Enumeration elts=_events.elements();
  LinkedList doneEvents=new LinkedList();
  TopologyChangeFailedException exception;
  while (elts.hasMoreElements()) {
    TopologyEvent event=(TopologyEvent)elts.nextElement();
    try {
      event.doTopologyChange();
    }
 catch (    Exception doException) {
      try {
        event.undoTopologyChange();
      }
 catch (      Exception e) {
      }
      exception=new TopologyChangeFailedException(event,doException);
      elts=doneEvents.elements();
      while (elts.hasMoreElements()) {
        TopologyEvent undoEvent=(TopologyEvent)elts.nextElement();
        try {
          undoEvent.undoTopologyChange();
        }
 catch (        Exception undoException) {
          exception.failedEvent=undoEvent;
          exception.thrownExceptionOnUndo=undoException;
          throw exception;
        }
      }
      throw exception;
    }
    doneEvents.insertFirst(event);
  }
}

Fixed version (ground truth):
/** 
 * Perform the actions contained by the mutation events in this mutation request. (Note that no events are passed to any listeners.) If any action throws an exception, undo all the actions done so far, and then throw a TopologyFailedException containing the original exception. If any action undo fails, throw a TopologyFailedException containing both the original exception and the exception thrown on undo.
 * @exception TopologyChangeFailedException if the mutation failed
 * @exception IllegalActionException If the change has alreadybeen implemented.
 */
public void performRequest() throws TopologyChangeFailedException, IllegalActionException {
  Enumeration elts=_events.elements();
  LinkedList doneEvents=new LinkedList();
  TopologyChangeFailedException exception;
  while (elts.hasMoreElements()) {
    TopologyEvent event=(TopologyEvent)elts.nextElement();
    try {
      event.doTopologyChange();
    }
 catch (    Exception doException) {
      try {
        event.undoTopologyChange();
      }
 catch (      Exception e) {
      }
      exception=new TopologyChangeFailedException(event,doException);
      elts=doneEvents.elements();
      while (elts.hasMoreElements()) {
        TopologyEvent undoEvent=(TopologyEvent)elts.nextElement();
        try {
          undoEvent.undoTopologyChange();
        }
 catch (        Exception undoException) {
          exception.failedEvent=undoEvent;
          exception.thrownExceptionOnUndo=undoException;
          throw exception;
        }
      }
      throw exception;
    }
    doneEvents.insertFirst(event);
  }
}