Buggy code:
public class JMDNSDiscoveryContainer implements ServiceListener , ServiceTypeListener , IContainer , IDiscoveryContainerAdapter { public static final int DEFAULT_REQUEST_TIMEOUT = 3000 ; protected static String JMDNS_NAMESPACE_ID = Messages . getString ( "JmdnsPlugin.namespace.identifier" ) ; static Trace trace = Trace . create ( "container" ) ; protected static void trace ( String msg ) { } ContainerConfig config = null ; InetAddress intf = null ; JmDNS jmdns = null ; int requestTimeout = JMDNSDiscoveryContainer . DEFAULT_REQUEST_TIMEOUT ; Map serviceListeners = new HashMap ( ) ; Vector serviceTypeListeners = new Vector ( ) ; private Vector listeners = new Vector ( ) ; public JMDNSDiscoveryContainer ( ) throws IOException , IDCreateException { } public ID getID ( ) { } public JMDNSDiscoveryContainer ( InetAddress addr ) throws IOException , IDCreateException { } public void addServiceListener ( ServiceID type , IServiceListener listener ) { } public void addServiceTypeListener ( IServiceTypeListener listener ) { } protected void fireContainerEvent ( IContainerEvent event ) { } public void dispose ( ) { } protected void fireServiceAdded ( ServiceEvent arg0 ) { } protected void fireServiceRemoved ( ServiceEvent arg0 ) { } protected void fireServiceResolved ( ServiceEvent arg0 ) { } protected void fireServiceTypeAdded ( ServiceEvent arg0 ) { } public Object getAdapter ( Class adapter ) { } public ID getConnectedID ( ) { } public IServiceInfo getServiceInfo ( ServiceID service , int timeout ) { } public IServiceInfo [ ] getServices ( ServiceID type ) { } public void connect ( ID groupID , IConnectContext joinContext ) throws ContainerConnectException { } public void disconnect ( ) { } protected IServiceInfo createIServiceInfoFromServiceEvent ( ServiceEvent event ) { } protected IServiceInfo createIServiceInfoFromServiceInfo ( final ServiceInfo serviceInfo ) { } protected ServiceID createServiceID ( String type , String name ) { } protected ServiceInfo createServiceInfoFromIServiceInfo ( IServiceInfo serviceInfo ) { } protected String prepareSvcTypeForBonjour ( String svcType ) { } public void registerService ( IServiceInfo serviceInfo ) throws IOException { } public void registerServiceType ( ServiceID serviceType ) { } public void registerServiceType ( String serviceType ) { } protected void registerServiceWithJmDNS ( IServiceInfo serviceInfo ) throws IOException { } public void removeServiceListener ( ServiceID type , IServiceListener listener ) { } public void removeServiceTypeListener ( IServiceTypeListener listener ) { } public void requestServiceInfo ( ServiceID service , int timeout ) { } public void serviceAdded ( ServiceEvent arg0 ) { } public void serviceRemoved ( ServiceEvent arg0 ) { } public void serviceResolved ( ServiceEvent arg0 ) { } public void serviceTypeAdded ( ServiceEvent arg0 ) { } public void unregisterService ( IServiceInfo serviceInfo ) { } public Namespace getConnectNamespace ( ) { } <START_BUG> public void addListener ( IContainerListener l , String filter ) { <END_BUG> synchronized ( listeners ) { listeners . add ( l ) ; } } public void removeListener ( IContainerListener l ) { } }

Fix:
public void addListener ( IContainerListener l ) {