Program: 94363
Project: 94363
Buggy source:
private void handleDiscoveredServiceAvailable(RemoteServiceEndpointDescription endpointDescription){
  IRemoteServiceContainer[] rsContainers=findProxyContainers(endpointDescription);
  if (rsContainers == null || rsContainers.length == 0) {
    logWarning("String_Node_Str","String_Node_Str" + endpointDescription);
    return;
  }
  ID endpointID=endpointDescription.getEndpointAsID();
  String remoteServiceFilter=endpointDescription.getRemoteServicesFilter();
  Collection providedInterfaces=endpointDescription.getProvidedInterfaces();
  for (int i=0; i < rsContainers.length; i++) {
    for (Iterator j=providedInterfaces.iterator(); j.hasNext(); ) {
      String providedInterface=(String)j.next();
      IRemoteServiceReference[] remoteReferences=null;
      firePreGetRemoteServiceReferences(endpointDescription,rsContainers[i]);
      try {
        remoteReferences=rsContainers[i].getContainerAdapter().getRemoteServiceReferences(endpointID,providedInterface,remoteServiceFilter);
      }
 catch (      ContainerConnectException e) {
        logError("String_Node_Str","String_Node_Str" + rsContainers[i] + "String_Node_Str"+ endpointID+ "String_Node_Str"+ providedInterface+ "String_Node_Str",e);
        continue;
      }
catch (      InvalidSyntaxException e) {
        logError("String_Node_Str","String_Node_Str" + rsContainers[i] + "String_Node_Str"+ endpointID+ "String_Node_Str"+ providedInterface+ "String_Node_Str",e);
        continue;
      }
      if (remoteReferences == null || remoteReferences.length == 0) {
        logError("String_Node_Str","String_Node_Str" + "String_Node_Str" + rsContainers[i] + "String_Node_Str"+ ((remoteReferences == null) ? "String_Node_Str" : Arrays.asList(remoteReferences).toString()),null);
        continue;
      }
 else       registerRemoteServiceReferences(endpointDescription,rsContainers[i],remoteReferences);
    }
  }
}

Fixed version (ground truth):
private void handleDiscoveredServiceAvailable(RemoteServiceEndpointDescription endpointDescription){
  IRemoteServiceContainer[] rsContainers=findProxyContainers(endpointDescription);
  if (rsContainers == null || rsContainers.length == 0) {
    logWarning("String_Node_Str","String_Node_Str" + endpointDescription);
    return;
  }
  ID endpointID=endpointDescription.getEndpointAsID();
  String remoteServiceFilter=getFullRemoteServicesFilter(endpointDescription.getRemoteServicesFilter(),endpointDescription.getRemoteServiceId());
  Collection providedInterfaces=endpointDescription.getProvidedInterfaces();
  for (int i=0; i < rsContainers.length; i++) {
    for (Iterator j=providedInterfaces.iterator(); j.hasNext(); ) {
      String providedInterface=(String)j.next();
      IRemoteServiceReference[] remoteReferences=null;
      firePreGetRemoteServiceReferences(endpointDescription,rsContainers[i]);
      try {
        remoteReferences=rsContainers[i].getContainerAdapter().getRemoteServiceReferences(endpointID,providedInterface,remoteServiceFilter);
      }
 catch (      ContainerConnectException e) {
        logError("String_Node_Str","String_Node_Str" + rsContainers[i] + "String_Node_Str"+ endpointID+ "String_Node_Str"+ providedInterface+ "String_Node_Str",e);
        continue;
      }
catch (      InvalidSyntaxException e) {
        logError("String_Node_Str","String_Node_Str" + rsContainers[i] + "String_Node_Str"+ endpointID+ "String_Node_Str"+ providedInterface+ "String_Node_Str",e);
        continue;
      }
      if (remoteReferences == null || remoteReferences.length == 0) {
        logError("String_Node_Str","String_Node_Str" + "String_Node_Str" + rsContainers[i] + "String_Node_Str"+ ((remoteReferences == null) ? "String_Node_Str" : Arrays.asList(remoteReferences).toString()),null);
        continue;
      }
 else {
        registerRemoteServiceReferences(endpointDescription,rsContainers[i],remoteReferences);
      }
    }
  }
}