Program: 30008
Project: 30008
Buggy source:
private Set<ServiceReference> discoverServiceReferences(ReadableArchive cloudArchive,String appName){
  Set<ServiceReference> serviceReferences=new HashSet<ServiceReference>();
  Application application=null;
  try {
    application=dolProvider.processDeploymentMetaData(cloudArchive);
  }
 catch (  Exception ex) {
    MQServicePluginLogger.getLogger().log(Level.INFO,"String_Node_Str",ex);
  }
  if (!DeploymentUtils.isJavaEE(cloudArchive,habitat)) {
    return serviceReferences;
  }
  if (application != null) {
    Set<BundleDescriptor> bundleDescriptors=application.getBundleDescriptors();
    for (    BundleDescriptor descriptor : bundleDescriptors) {
      populateResourceRefsAsServiceReferences(descriptor,serviceReferences);
      if (descriptor instanceof EjbBundleDescriptor) {
        EjbBundleDescriptor ejbDesc=(EjbBundleDescriptor)descriptor;
        Set<EjbDescriptor> ejbDescriptors=ejbDesc.getEjbs();
        for (        EjbDescriptor ejbDescriptor : ejbDescriptors) {
          populateResourceRefsAsServiceReferences(ejbDescriptor,serviceReferences);
        }
        Set<EjbInterceptor> ejbInterceptors=ejbDesc.getInterceptors();
        for (        EjbInterceptor ejbInterceptor : ejbInterceptors) {
          populateResourceRefsAsServiceReferences(ejbInterceptor,serviceReferences);
        }
      }
      Set<ManagedBeanDescriptor> managedBeanDescriptors=descriptor.getManagedBeans();
      for (      ManagedBeanDescriptor mbd : managedBeanDescriptors) {
        populateResourceRefsAsServiceReferences(mbd,serviceReferences);
      }
    }
  }
  return serviceReferences;
}

Fixed version (ground truth):
private Set<ServiceReference> discoverServiceReferences(ReadableArchive cloudArchive,String appName){
  Set<ServiceReference> serviceReferences=new HashSet<ServiceReference>();
  Application application=null;
  try {
    application=dolProvider.processDeploymentMetaData(cloudArchive);
  }
 catch (  Exception ex) {
    MQServicePluginLogger.getLogger().log(Level.INFO,"String_Node_Str",ex);
  }
  if (!JavaEEDeploymentUtils.isJavaEE(cloudArchive,habitat)) {
    return serviceReferences;
  }
  if (application != null) {
    Set<BundleDescriptor> bundleDescriptors=application.getBundleDescriptors();
    for (    BundleDescriptor descriptor : bundleDescriptors) {
      populateResourceRefsAsServiceReferences(descriptor,serviceReferences);
      if (descriptor instanceof EjbBundleDescriptor) {
        EjbBundleDescriptor ejbDesc=(EjbBundleDescriptor)descriptor;
        Set<EjbDescriptor> ejbDescriptors=ejbDesc.getEjbs();
        for (        EjbDescriptor ejbDescriptor : ejbDescriptors) {
          populateResourceRefsAsServiceReferences(ejbDescriptor,serviceReferences);
        }
        Set<EjbInterceptor> ejbInterceptors=ejbDesc.getInterceptors();
        for (        EjbInterceptor ejbInterceptor : ejbInterceptors) {
          populateResourceRefsAsServiceReferences(ejbInterceptor,serviceReferences);
        }
      }
      Set<ManagedBeanDescriptor> managedBeanDescriptors=descriptor.getManagedBeans();
      for (      ManagedBeanDescriptor mbd : managedBeanDescriptors) {
        populateResourceRefsAsServiceReferences(mbd,serviceReferences);
      }
    }
  }
  return serviceReferences;
}