Buggy code:
public class Activator implements BundleActivator { public static final String PLUGIN_ID = "org.eclipse.ecf.osgi.services.distribution" ; public static final boolean autoCreateProxyContainer = new Boolean ( System . getProperty ( "org.eclipse.ecf.osgi.services.distribution.autoCreateProxyContainer" , "true" ) ) . booleanValue ( ) ; public static final boolean autoCreateHostContainer = new Boolean ( System . getProperty ( "org.eclipse.ecf.osgi.services.distribution.autoCreateHostContainer" , "true" ) ) . booleanValue ( ) ; public static final String defaultHostConfigType = System . getProperty ( "org.eclipse.ecf.osgi.services.distribution.defaultConfigType" , "ecf.generic.server" ) ; private static Activator plugin ; private BundleContext context ; private ServiceTracker containerManagerTracker ; private DistributionProviderImpl distributionProvider ; private ServiceRegistration eventHookRegistration ; private ServiceRegistration discoveredServiceTrackerRegistration ; private DiscoveredServiceTrackerImpl discoveredServiceTrackerImpl ; private ServiceRegistration proxyrsContainerFinderRegistration ; private ServiceRegistration hostrsContainerFinderRegistration ; private ServiceTracker logServiceTracker = null ; private LogService logService = null ; private ServiceTracker adapterManagerTracker ; private ServiceTracker proxyrsContainerFinder ; private ServiceTracker hostrsContainerFinder ; private ServiceTracker hostRegistrationListenerServiceTracker ; private ServiceTracker proxyDistributionListenerServiceTracker ; private ServiceTracker idFactoryTracker ; public static Activator getDefault ( ) { } public BundleContext getContext ( ) { } protected synchronized LogService getLogService ( ) { } public void log ( IStatus status ) { } public void log ( ServiceReference sr , IStatus status ) { } public void log ( ServiceReference sr , int level , String message , Throwable t ) { } public void start ( final BundleContext ctxt ) throws Exception { } private void registerExistingServices ( final EventHookImpl hook , final BundleContext bundleContext ) { try { <START_BUG> final ServiceReference [ ] refs = bundleContext . getServiceReferences ( ( ( String ) ( null ) ) , ( ( "(" + ( IDistributionConstants . SERVICE_EXPORTED_INTERFACES ) ) + "=*)" ) ) ; <END_BUG> if ( refs != null ) { for ( int i = 0 ; i < ( refs . length ) ; i ++ ) { hook . handleRegisteredServiceEvent ( refs [ i ] , null ) ; } } } catch ( InvalidSyntaxException e ) { } } public void stop ( BundleContext ctxt ) throws Exception { } public synchronized IContainerManager getContainerManager ( ) { } public synchronized IProxyContainerFinder getProxyRemoteServiceContainerFinder ( ) { } public synchronized IHostContainerFinder getHostRemoteServiceContainerFinder ( ) { } public synchronized IHostDistributionListener [ ] getHostRegistrationListeners ( ) { } public synchronized IProxyDistributionListener [ ] getProxyDistributionListeners ( ) { } public synchronized IAdapterManager getAdapterManager ( ) { } public IIDFactory getIDFactory ( ) { } }

Fix:
final ServiceReference [ ] refs = bundleContext . getServiceReferences ( null , ( ( "(" + ( IDistributionConstants . SERVICE_EXPORTED_INTERFACES ) ) + "=*)" ) ) ;