Program: 134759
Project: 134759
Buggy source:
/** 
 * Takes a generic Java object and tries to pack it into a CORBA Any and publish it to the event channel. This will fail if the parameter is not CORBA-generated from a user-defined IDL struct. In simple terms, trying to publish native Java types is impossible because they have no CORBA mapping to say Python or C++ types.
 * @param customStruct An instance of the IDL struct (Java class) to be published.
 * @throws AcsJPublishEventFailureEx If <code>customStruct</code> is not an IDL struct,for which it must be a subclass of IDLEntity.
 * @throws AcsJException There are an enormous amount of possibilities pertaining to why an AcsJException would be thrown by publishEvent.
 */
@Override public void publishEvent(T customStruct) throws AcsJException {
  if (!(customStruct instanceof IDLEntity)) {
    String msg="String_Node_Str";
    AcsJPublishEventFailureEx ex=new AcsJPublishEventFailureEx();
    ex.setFailureDescription(msg);
    ex.setChannelName(channelName);
    ex.setEventName(customStruct.getClass().getName());
    throw ex;
  }
  IDLEntity customStructEntity=(IDLEntity)customStruct;
  String typeName=customStructEntity.getClass().getSimpleName();
  StructuredEvent event=getCORBAEvent(typeName,"String_Node_Str");
  event.remainder_of_body=services.getAdvancedContainerServices().getAny();
  EventDescription descrip=new EventDescription(services.getName(),alma.acs.util.UTCUtility.utcJavaToOmg(System.currentTimeMillis()),count);
  EventDescriptionHelper.insert(event.remainder_of_body,descrip);
  event.filterable_data=new Property[1];
  event.filterable_data[0]=new Property(alma.acscommon.DEFAULTDATANAME.value,anyAide.complexObjectToCorbaAny(customStructEntity));
synchronized (eventQueueSync) {
    if (eventQueue != null) {
      CircularQueue<T>.Data tmp;
      try {
        while ((tmp=eventQueue.pop()) != null) {
          publishCORBAEvent(tmp.corbaData,tmp.userData);
        }
      }
 catch (      Exception ex) {
        Level lev=(isTraceEventsEnabled ? Level.INFO : Level.FINEST);
        logger.log(lev,"String_Node_Str",ex);
      }
    }
  }
  publishCORBAEvent(event,customStruct);
  count++;
}

Fixed version (ground truth):
/** 
 * Takes a generic Java object and tries to pack it into a CORBA Any and publish it to the event channel. This will fail if the parameter is not CORBA-generated from a user-defined IDL struct. In simple terms, trying to publish native Java types is impossible because they have no CORBA mapping to say Python or C++ types.
 * @param customStruct An instance of the IDL struct (Java class) to be published.
 * @throws AcsJPublishEventFailureEx If <code>customStruct</code> is not an IDL struct,for which it must be a subclass of IDLEntity.
 * @throws AcsJException There are an enormous amount of possibilities pertaining to why an AcsJException would be thrown by publishEvent.
 */
@Override public void publishEvent(T customStruct) throws AcsJException {
  if (!(customStruct instanceof IDLEntity)) {
    String msg="String_Node_Str";
    AcsJPublishEventFailureEx ex=new AcsJPublishEventFailureEx();
    ex.setFailureDescription(msg);
    ex.setChannelName(channelName);
    ex.setEventName(customStruct.getClass().getName());
    throw ex;
  }
  IDLEntity customStructEntity=(IDLEntity)customStruct;
  String typeName=customStructEntity.getClass().getSimpleName();
  StructuredEvent event=getCORBAEvent(typeName,"String_Node_Str");
  event.remainder_of_body=services.getAdvancedContainerServices().getAny();
  EventDescription descrip=new EventDescription(services.getName(),alma.acs.util.UTCUtility.utcJavaToOmg(System.currentTimeMillis()),count.getAndIncrement());
  EventDescriptionHelper.insert(event.remainder_of_body,descrip);
  event.filterable_data=new Property[1];
  event.filterable_data[0]=new Property(alma.acscommon.DEFAULTDATANAME.value,anyAide.complexObjectToCorbaAny(customStructEntity));
synchronized (eventQueueSync) {
    if (eventQueue != null) {
      CircularQueue<T>.Data tmp;
      try {
        while ((tmp=eventQueue.pop()) != null) {
          publishCORBAEvent(tmp.corbaData,tmp.userData);
        }
      }
 catch (      Exception ex) {
        Level lev=(isTraceEventsEnabled ? Level.INFO : Level.FINEST);
        logger.log(lev,"String_Node_Str",ex);
      }
    }
  }
  publishCORBAEvent(event,customStruct);
}