Program: 94187
Project: 94187
Buggy source:
public RemoteServiceAdmin(Bundle clientBundle){
  this.clientBundle=clientBundle;
  Assert.isNotNull(this.clientBundle);
  Properties props=new Properties();
  props.put(org.osgi.framework.Constants.SERVICE_RANKING,new Integer(Integer.MIN_VALUE));
  ServiceReference[] hostContainerSelectorRefs=null;
  BundleContext rsaBundleContext=getRSABundleContext();
  try {
    hostContainerSelectorRefs=rsaBundleContext.getServiceReferences(IHostContainerSelector.class.getName(),null);
  }
 catch (  InvalidSyntaxException e) {
  }
  if (hostContainerSelectorRefs == null || hostContainerSelectorRefs.length == 0) {
    defaultHostContainerSelector=new HostContainerSelector(hostDefaultConfigTypes,hostAutoCreateContainer);
    defaultHostContainerSelectorRegistration=rsaBundleContext.registerService(IHostContainerSelector.class.getName(),defaultHostContainerSelector,(Dictionary)props);
  }
  ServiceReference[] consumerContainerSelectorRefs=null;
  try {
    consumerContainerSelectorRefs=rsaBundleContext.getServiceReferences(IConsumerContainerSelector.class.getName(),null);
  }
 catch (  InvalidSyntaxException e) {
  }
  if (consumerContainerSelectorRefs == null || consumerContainerSelectorRefs.length == 0) {
    defaultConsumerContainerSelector=new ConsumerContainerSelector(consumerAutoCreateContainer);
    defaultConsumerContainerSelectorRegistration=rsaBundleContext.registerService(IConsumerContainerSelector.class.getName(),defaultConsumerContainerSelector,(Dictionary)props);
  }
  eventListenerHookRegistration=rsaBundleContext.registerService(EventListenerHook.class.getName(),new RSAEventListenerHook(),null);
}

Fixed version (ground truth):
public RemoteServiceAdmin(Bundle clientBundle,Collection<org.osgi.service.remoteserviceadmin.ExportRegistration> exportedRegistrations,Collection<org.osgi.service.remoteserviceadmin.ImportRegistration> importedRegistrations){
  this.clientBundle=clientBundle;
  Assert.isNotNull(this.clientBundle);
  this.exportedRegistrations=exportedRegistrations;
  this.importedRegistrations=importedRegistrations;
  Properties props=new Properties();
  props.put(org.osgi.framework.Constants.SERVICE_RANKING,new Integer(Integer.MIN_VALUE));
  ServiceReference[] hostContainerSelectorRefs=null;
  BundleContext rsaBundleContext=getRSABundleContext();
  try {
    hostContainerSelectorRefs=rsaBundleContext.getServiceReferences(IHostContainerSelector.class.getName(),null);
  }
 catch (  InvalidSyntaxException e) {
  }
  if (hostContainerSelectorRefs == null || hostContainerSelectorRefs.length == 0) {
    defaultHostContainerSelector=new HostContainerSelector(hostDefaultConfigTypes,hostAutoCreateContainer);
    defaultHostContainerSelectorRegistration=rsaBundleContext.registerService(IHostContainerSelector.class.getName(),defaultHostContainerSelector,(Dictionary)props);
  }
  ServiceReference[] consumerContainerSelectorRefs=null;
  try {
    consumerContainerSelectorRefs=rsaBundleContext.getServiceReferences(IConsumerContainerSelector.class.getName(),null);
  }
 catch (  InvalidSyntaxException e) {
  }
  if (consumerContainerSelectorRefs == null || consumerContainerSelectorRefs.length == 0) {
    defaultConsumerContainerSelector=new ConsumerContainerSelector(consumerAutoCreateContainer);
    defaultConsumerContainerSelectorRegistration=rsaBundleContext.registerService(IConsumerContainerSelector.class.getName(),defaultConsumerContainerSelector,(Dictionary)props);
  }
  eventListenerHookRegistration=rsaBundleContext.registerService(EventListenerHook.class.getName(),new RSAEventListenerHook(),null);
}