Program: 72324
Project: 72324
Buggy source:
/** 
 * Manage the correct termination of the   {@link HlaManager}. Call the HLA services to: unsubscribe to HLA attributes, unpublish HLA attributes, resign a Federation and destroy a Federation if the current Federate is the last participant.
 * @exception IllegalActionException If the parent class throws itof if a CERTI exception is raised then displayed it to the user.
 */
@Override public void wrapup() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str");
  }
  super.wrapup();
  if (_enableHlaReporter) {
    if (_debugging) {
      _debug(_hlaReporter.displayAnalysisValues());
    }
    _hlaReporter.calculateRuntime();
    _hlaReporter.writeNumberOfHLACalls();
    _hlaReporter.writeDelays();
    _hlaReporter.writeUAVsInformation();
    _hlaReporter.writeRAVsInformation();
    _hlaReporter.writeTimes();
  }
  for (  Object[] obj : _hlaAttributesToSubscribeTo.values()) {
    try {
      _rtia.unsubscribeObjectClass(_getClassHandleFromTab(obj));
    }
 catch (    RTIexception e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
    if (_debugging) {
      _debug("String_Node_Str" + _getPortFromTab(obj).getContainer().getFullName() + "String_Node_Str"+ _getClassHandleFromTab(obj)+ "String_Node_Str");
    }
  }
  for (  Object[] obj : _hlaAttributesToPublish.values()) {
    try {
      _rtia.unpublishObjectClass(_getClassHandleFromTab(obj));
    }
 catch (    RTIexception e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
    if (_debugging) {
      _debug("String_Node_Str" + _getPortFromTab(obj).getContainer().getFullName() + "String_Node_Str"+ _getClassHandleFromTab(obj)+ "String_Node_Str");
    }
  }
  try {
    if (_rtia != null) {
      _rtia.resignFederationExecution(ResignAction.DELETE_OBJECTS_AND_RELEASE_ATTRIBUTES);
    }
  }
 catch (  RTIexception e) {
    throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
  }
  if (_debugging) {
    _debug("String_Node_Str");
  }
  System.out.println("String_Node_Str");
  boolean canDestroyRtig=false;
  while (!canDestroyRtig) {
    try {
      _rtia.destroyFederationExecution(_federationName);
    }
 catch (    FederatesCurrentlyJoined e) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      System.out.println("String_Node_Str");
    }
catch (    FederationExecutionDoesNotExist e) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      canDestroyRtig=true;
      System.out.println("String_Node_Str" + canDestroyRtig);
    }
catch (    RTIinternalError e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
catch (    ConcurrentAccessAttempted e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
    if (_debugging) {
      _debug("String_Node_Str" + "String_Node_Str");
    }
    canDestroyRtig=true;
    System.out.println("String_Node_Str" + canDestroyRtig);
  }
  if (_certiRtig != null) {
    _certiRtig.terminateProcess();
    if (_debugging) {
      _debug("String_Node_Str" + "String_Node_Str");
    }
    System.out.println("String_Node_Str" + "String_Node_Str");
  }
  _hlaAttributesToPublish.clear();
  _hlaAttributesToSubscribeTo.clear();
  _fromFederationEvents.clear();
  _objectIdToClassHandle.clear();
  _registerObjectInstanceMap.clear();
  _discoverObjectInstanceMap.clear();
  _usedJokerFilterMap.clear();
  _hlaReporter=null;
  if (_debugging) {
    _debug("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Manage the correct termination of the   {@link HlaManager}. Call the HLA services to: unsubscribe to HLA attributes, unpublish HLA attributes, resign a Federation and destroy a Federation if the current Federate is the last participant.
 * @exception IllegalActionException If the parent class throws itof if a CERTI exception is raised then displayed it to the user.
 */
@Override public void wrapup() throws IllegalActionException {
  if (_debugging) {
    _debug("String_Node_Str");
  }
  super.wrapup();
  if (_enableHlaReporter) {
    if (_debugging) {
      _debug(_hlaReporter.displayAnalysisValues());
    }
    _hlaReporter.calculateRuntime();
    _hlaReporter.writeNumberOfHLACalls();
    _hlaReporter.writeDelays();
    _hlaReporter.writeUAVsInformation();
    _hlaReporter.writeRAVsInformation();
    _hlaReporter.writeTimes();
  }
  for (  Object[] obj : _hlaAttributesToSubscribeTo.values()) {
    try {
      _rtia.unsubscribeObjectClass(_getClassHandleFromTab(obj));
    }
 catch (    RTIexception e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
    if (_debugging) {
      _debug("String_Node_Str" + _getPortFromTab(obj).getContainer().getFullName() + "String_Node_Str"+ _getClassHandleFromTab(obj)+ "String_Node_Str");
    }
  }
  for (  Object[] obj : _hlaAttributesToPublish.values()) {
    try {
      _rtia.unpublishObjectClass(_getClassHandleFromTab(obj));
    }
 catch (    RTIexception e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
    if (_debugging) {
      _debug("String_Node_Str" + _getPortFromTab(obj).getContainer().getFullName() + "String_Node_Str"+ _getClassHandleFromTab(obj)+ "String_Node_Str");
    }
  }
  try {
    if (_rtia != null) {
      _rtia.resignFederationExecution(ResignAction.DELETE_OBJECTS_AND_RELEASE_ATTRIBUTES);
    }
  }
 catch (  RTIexception e) {
    throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
  }
  if (_debugging) {
    _debug("String_Node_Str");
  }
  System.out.println("String_Node_Str" + _federateName + "String_Node_Str"+ _federationName+ "String_Node_Str"+ "String_Node_Str");
  boolean canDestroyRtig=false;
  while (!canDestroyRtig) {
    try {
      _rtia.destroyFederationExecution(_federationName);
      canDestroyRtig=true;
      if (_debugging) {
        _debug("String_Node_Str" + "String_Node_Str");
      }
      System.out.println("String_Node_Str" + _federateName + "String_Node_Str"+ _federationName+ "String_Node_Str"+ "String_Node_Str"+ canDestroyRtig);
    }
 catch (    FederatesCurrentlyJoined e) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      System.out.println("String_Node_Str" + _federateName + "String_Node_Str"+ _federationName+ "String_Node_Str"+ "String_Node_Str");
    }
catch (    FederationExecutionDoesNotExist e) {
      if (_debugging) {
        _debug("String_Node_Str");
      }
      canDestroyRtig=true;
      System.out.println("String_Node_Str" + _federateName + "String_Node_Str"+ _federationName+ "String_Node_Str"+ "String_Node_Str"+ canDestroyRtig);
    }
catch (    RTIinternalError e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
catch (    ConcurrentAccessAttempted e) {
      throw new IllegalActionException(this,e,"String_Node_Str" + e.getMessage());
    }
  }
  if (_certiRtig != null) {
    if (_debugging) {
      _debug("String_Node_Str" + "String_Node_Str");
    }
    System.out.println("String_Node_Str" + _federateName + "String_Node_Str"+ _federationName+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    _certiRtig.terminateProcess();
  }
  _hlaAttributesToPublish.clear();
  _hlaAttributesToSubscribeTo.clear();
  _fromFederationEvents.clear();
  _objectIdToClassHandle.clear();
  _registerObjectInstanceMap.clear();
  _discoverObjectInstanceMap.clear();
  _usedJokerFilterMap.clear();
  _hlaReporter=null;
  if (_debugging) {
    _debug("String_Node_Str");
  }
}