Buggy code:
public class DiscoveredServiceTrackerImpl implements DiscoveredServiceTracker , IProxyContainerFinder { DistributionProviderImpl distributionProvider ; IExecutor executor ; IProgressMonitor executorProgressMonitor ; List serviceLocations = new ArrayList ( ) ; private boolean addDiscoveredServiceID ( ECFServiceEndpointDescription desc ) { } private boolean removeDiscoveredServiceID ( ECFServiceEndpointDescription desc ) { } private boolean containsDiscoveredServiceID ( ECFServiceEndpointDescription desc ) { } public DiscoveredServiceTrackerImpl ( DistributionProviderImpl dp , IExecutor executor ) { } Map discoveredRemoteServiceRegistrations = Collections . synchronizedMap ( new HashMap ( ) ) ; List ecfRemoteServiceProperties = Arrays . asList ( new String [ ] { Constants . SERVICE_ID , Constants . OBJECTCLASS , IServicePublication . PROP_KEY_ENDPOINT_ID , IServicePublication . PROP_KEY_ENDPOINT_INTERFACE_NAME , IServicePublication . PROP_KEY_ENDPOINT_LOCATION , IServicePublication . PROP_KEY_SERVICE_INTERFACE_NAME , IServicePublication . PROP_KEY_SERVICE_INTERFACE_VERSION , IServicePublication . PROP_KEY_SERVICE_PROPERTIES } ) ; public void serviceChanged ( final DiscoveredServiceNotification notification ) { } private boolean isValidService ( ECFServiceEndpointDescription desc ) { } private IRemoteServiceContainer [ ] findRemoteServiceContainersViaService ( IServiceID serviceID , IServiceEndpointDescription description , IProgressMonitor monitor ) { } private void handleDiscoveredServiceAvailable ( ECFServiceEndpointDescription ecfSED , IProgressMonitor monitor ) { IRemoteServiceContainer [ ] rsContainers = findRemoteServiceContainersViaService ( ecfSED . getServiceID ( ) , ecfSED , monitor ) ; if ( ( rsContainers == null ) || ( ( rsContainers . length ) == 0 ) ) { logError ( "handleDiscoveredServiceAvailable" , ( "No<seq2seq4repair_space>RemoteServiceContainerAdapters<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>description=" + ecfSED ) , null ) ; return ; } if ( ( rsContainers . length ) > 1 ) { logWarning ( "handleDiscoveredServiceAvailable" , ( ( ( "Multiple<seq2seq4repair_space>remote<seq2seq4repair_space>service<seq2seq4repair_space>containers=" + ( Arrays . asList ( rsContainers ) ) ) + "<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>service<seq2seq4repair_space>endpoint<seq2seq4repair_space>description=" ) + ecfSED ) ) ; } ID ecfEndpointID = ecfSED . getECFEndpointID ( ) ; <START_BUG> String remoteServiceFilter = ecfSED . getECFRemoteServicesFilter ( ) ; <END_BUG> Collection providedInterfaces = ecfSED . getProvidedInterfaces ( ) ; for ( int i = 0 ; i < ( rsContainers . length ) ; i ++ ) { for ( Iterator j = providedInterfaces . iterator ( ) ; j . hasNext ( ) ; ) { String providedInterface = ( ( String ) ( j . next ( ) ) ) ; IRemoteServiceReference [ ] remoteReferences = null ; try { remoteReferences = rsContainers [ i ] . getContainerAdapter ( ) . getRemoteServiceReferences ( ecfEndpointID , providedInterface , remoteServiceFilter ) ; } catch ( ContainerConnectException e ) { logError ( "handleDiscoveredServiceAvailable" , ( ( ( ( ( ( "rsca=" + ( rsContainers [ i ] ) ) + ",endpointId=" ) + ecfEndpointID ) + ",intf=" ) + providedInterface ) + ".<seq2seq4repair_space>Connect<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>getRemoteServiceReferences" ) , e ) ; continue ; } catch ( InvalidSyntaxException e ) { logError ( "handleDiscoveredServiceAvailable" , ( ( ( ( ( ( "rsca=" + ( rsContainers [ i ] ) ) + ",endpointId=" ) + ecfEndpointID ) + ",intf=" ) + providedInterface ) + "<seq2seq4repair_space>Filter<seq2seq4repair_space>syntax<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>getRemoteServiceReferences" ) , e ) ; continue ; } if ( ( remoteReferences == null ) || ( ( remoteReferences . length ) == 0 ) ) { logError ( "handleDiscoveredServiceAvailable" , ( ( ( ( "getRemoteServiceReferences<seq2seq4repair_space>result<seq2seq4repair_space>is<seq2seq4repair_space>empty.<seq2seq4repair_space>" + "containerHelper=" ) + ( rsContainers [ i ] ) ) + "remoteReferences=" ) + ( remoteReferences == null ? "null" : Arrays . asList ( remoteReferences ) . toString ( ) ) ) , null ) ; continue ; } else registerRemoteServiceReferences ( ecfSED , rsContainers [ i ] , remoteReferences ) ; } } } private ECFServiceEndpointDescription getECFserviceEndpointDescription ( ServiceEndpointDescription aServiceEndpointDesc ) { } private boolean findProxyServiceRegistration ( ServiceEndpointDescription sed ) { } private ServiceRegistration [ ] removeProxyServiceRegistrations ( ServiceEndpointDescription sed ) { } class RemoteServiceReferenceUnregisteredListener implements IRemoteServiceListener { public void handleServiceEvent ( IRemoteServiceEvent event ) { } } private void unregisterProxyServiceRegistration ( ServiceRegistration reg ) { } private void registerRemoteServiceReferences ( ECFServiceEndpointDescription sed , IRemoteServiceContainer ch , IRemoteServiceReference [ ] remoteReferences ) { } private boolean isRemoteServiceProperty ( String propertyKey ) { } private Dictionary getPropertiesForRemoteService ( ServiceEndpointDescription description , IRemoteServiceContainerAdapter containerAdapter , IRemoteServiceReference remoteReference , IRemoteService remoteService ) { } protected void trace ( String methodName , String message ) { } protected void traceException ( String methodName , String message , Throwable t ) { } protected void logError ( String methodName , String message , Throwable t ) { } protected void logError ( String methodName , String message ) { } private void logWarning ( String methodName , String message ) { } public IRemoteServiceContainer [ ] findProxyContainers ( IServiceID serviceID , IServiceEndpointDescription endpointDescription , IProgressMonitor monitor ) { } private boolean includeRCSAForDescription ( IContainer container , ServiceEndpointDescription description ) { } }

Fix:
String remoteServiceFilter = ecfSED . getRemoteServicesFilter ( ) ;