Program: 135069
Project: 135069
Buggy source:
/** 
 * Creates a new instance of SimpleSupplier
 * @param cName name of the notification channel events will be published to.
 * @param services This is used to get the name of the component and to access the ACS logging system.
 * @throws AcsJException There are literally dozens of CORBA exceptions that could be thrown by the SimpleSupplier class. Instead, these are converted into an ACS Error System exception for the developer's convenience.
 */
public SimpleSupplier(String cName,ContainerServices services) throws AcsJException {
  m_channelName=cName;
  m_logger=services.getLogger();
  m_services=services;
  m_anyAide=new AnyAide(services);
  if (m_channelName == null) {
    String reason="String_Node_Str";
    throw new alma.ACSErrTypeJavaNative.wrappers.AcsJJavaLangEx(reason);
  }
  m_helper=new Helper(services);
  m_supplierAdmin=getNotificationChannel(cName).new_for_suppliers(IFGOP,new IntHolder());
  if (m_supplierAdmin == null) {
    String reason="String_Node_Str";
    throw new alma.ACSErrTypeJavaNative.wrappers.AcsJJavaLangEx(reason);
  }
  try {
    org.omg.CORBA.Object tempCorbaObj=m_supplierAdmin.obtain_notification_push_consumer(ClientType.STRUCTURED_EVENT,new IntHolder());
    if (tempCorbaObj == null) {
      String reason="String_Node_Str";
      throw new alma.ACSErrTypeJavaNative.wrappers.AcsJJavaLangEx(reason);
    }
    m_proxyConsumer=StructuredProxyPushConsumerHelper.narrow(tempCorbaObj);
  }
 catch (  org.omg.CosNotifyChannelAdmin.AdminLimitExceeded e) {
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(e.getMessage());
  }
  try {
    alma.ACS.OffShoot myOS=getHelper().getContainerServices().activateOffShoot(this);
    m_corbaRef=OSPushSupplierHelper.narrow(myOS);
    org.omg.CosNotifyComm.StructuredPushSupplier mySps=org.omg.CosNotifyComm.StructuredPushSupplierHelper.narrow(m_corbaRef);
    m_proxyConsumer.connect_structured_push_supplier(mySps);
  }
 catch (  alma.acs.container.ContainerException e) {
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(e);
  }
catch (  org.omg.CosEventChannelAdmin.AlreadyConnected e) {
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(e.getMessage());
  }
  if (m_helper.getChannelProperties().getIntegrationLogs(m_channelName) == true) {
    m_integrationLogs=true;
  }
}

Fixed version (ground truth):
/** 
 * Creates a new instance of SimpleSupplier
 * @param cName name of the notification channel events will be published to.
 * @param services This is used to get the name of the component and to access the ACS logging system.
 * @throws AcsJException There are literally dozens of CORBA exceptions that could be thrown by the SimpleSupplier class. Instead, these are converted into an ACS Error System exception for the developer's convenience.
 */
public SimpleSupplier(String cName,ContainerServices services) throws AcsJException {
  m_channelName=cName;
  m_logger=services.getLogger();
  m_services=services;
  m_anyAide=new AnyAide(services);
  if (m_channelName == null) {
    String reason="String_Node_Str";
    throw new alma.ACSErrTypeJavaNative.wrappers.AcsJJavaLangEx(reason);
  }
  m_helper=new Helper(services);
  EventChannel ec=getNotificationChannel(cName);
  IntHolder ih=new IntHolder();
  m_supplierAdmin=ec.new_for_suppliers(IFGOP,ih);
  if (m_supplierAdmin == null) {
    String reason="String_Node_Str";
    throw new alma.ACSErrTypeJavaNative.wrappers.AcsJJavaLangEx(reason);
  }
  try {
    IntHolder cp_ih=new IntHolder();
    org.omg.CORBA.Object tempCorbaObj=null;
    tempCorbaObj=m_supplierAdmin.obtain_notification_push_consumer(ClientType.STRUCTURED_EVENT,cp_ih);
    if (tempCorbaObj == null) {
      String reason="String_Node_Str";
      throw new alma.ACSErrTypeJavaNative.wrappers.AcsJJavaLangEx(reason);
    }
    m_proxyConsumer=StructuredProxyPushConsumerHelper.narrow(tempCorbaObj);
  }
 catch (  org.omg.CosNotifyChannelAdmin.AdminLimitExceeded e) {
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(e.getMessage());
  }
  try {
    ContainerServices cs=m_helper.getContainerServices();
    alma.ACS.OffShoot myOS=null;
    myOS=cs.activateOffShoot(this);
    m_corbaRef=OSPushSupplierHelper.narrow(myOS);
    org.omg.CosNotifyComm.StructuredPushSupplier mySps=null;
    mySps=org.omg.CosNotifyComm.StructuredPushSupplierHelper.narrow(m_corbaRef);
    m_proxyConsumer.connect_structured_push_supplier(mySps);
  }
 catch (  alma.acs.container.ContainerException e) {
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(e);
  }
catch (  org.omg.CosEventChannelAdmin.AlreadyConnected e) {
    throw new alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx(e);
  }
  ChannelProperties channelProps=m_helper.getChannelProperties();
  m_integrationLogs=channelProps.getIntegrationLogs(m_channelName);
}