Buggy code:
public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter implements IDiscoveryService , ServiceListener , ServiceTypeListener { private static final String SCHEME_PROPERTY = "jmdns.ptcl" ; public static final int DEFAULT_REQUEST_TIMEOUT = 3000 ; private static int instanceCount = 0 ; private InetAddress intf = null ; JmDNS jmdns = null ; private ID targetID = null ; List serviceTypes = null ; boolean disposed = false ; Object lock = new Object ( ) ; SimpleFIFOQueue queue = null ; Thread notificationThread = null ; public JMDNSDiscoveryContainer ( InetAddress addr ) throws IDCreateException { } public ID getConnectedID ( ) { } public void dispose ( ) { } public void connect ( ID targetID1 , IConnectContext joinContext ) throws ContainerConnectException { synchronized ( lock ) { if ( disposed ) throw new ContainerConnectException ( Messages . JMDNSDiscoveryContainer_EXCEPTION_CONTAINER_DISPOSED ) ; if ( ( this . targetID ) != null ) throw new ContainerConnectException ( Messages . JMDNSDiscoveryContainer_EXCEPTION_ALREADY_CONNECTED ) ; this . targetID = ( targetID1 == null ) ? getConfig ( ) . getID ( ) : targetID1 ; fireContainerEvent ( new ContainerConnectingEvent ( this . getID ( ) , this . targetID , joinContext ) ) ; initializeQueue ( ) ; try { this . jmdns = JmDNS . create ( intf ) ; jmdns . addServiceTypeListener ( this ) ; } catch ( final IOException e ) { if ( ( this . jmdns ) != null ) { jmdns . close ( ) ; jmdns = null ; } <START_BUG> throw new ContainerConnectException ( Messages . JMDNSDiscoveryContainer_EXCEPTION_CREATE_JMDNS_INSTANCE ) ; <END_BUG> } fireContainerEvent ( new ContainerConnectedEvent ( this . getID ( ) , this . targetID ) ) ; } } private void initializeQueue ( ) { } protected void handleRuntimeException ( Throwable t ) { } public void disconnect ( ) { } public IServiceInfo getServiceInfo ( IServiceID service ) { } public IServiceInfo [ ] getServices ( ) { } public IServiceInfo [ ] getServices ( IServiceTypeID type ) { } public IServiceTypeID [ ] getServiceTypes ( ) { } public void registerService ( IServiceInfo serviceInfo ) throws ECFException { } public void unregisterService ( IServiceInfo serviceInfo ) { } private void runInThread ( Runnable runnable ) { } private void logError ( String errorString ) { } public void serviceTypeAdded ( final ServiceEvent arg0 ) { } void fireTypeDiscovered ( final IServiceTypeID serviceType ) { } public void serviceAdded ( final ServiceEvent arg0 ) { } Collection getAllListeners ( IServiceTypeID serviceTypeID ) { } public void serviceRemoved ( final ServiceEvent arg0 ) { } void fireUndiscovered ( IServiceInfo serviceInfo ) { } public void serviceResolved ( final ServiceEvent arg0 ) { } void fireDiscovered ( IServiceInfo serviceInfo ) { } private void checkServiceInfo ( ServiceInfo serviceInfo ) throws ECFException { } private IServiceTypeID createServiceTypeID ( String type ) { } IServiceInfo createIServiceInfoFromServiceEvent ( final ServiceEvent event ) throws Exception { } private IServiceInfo createIServiceInfoFromServiceInfo ( final ServiceInfo serviceInfo ) throws Exception { } ServiceID createServiceID ( String type , String name ) { } private ServiceInfo createServiceInfoFromIServiceInfo ( IServiceInfo serviceInfo ) { } }

Fix:
throw new ContainerConnectException ( Messages . JMDNSDiscoveryContainer_EXCEPTION_CREATE_JMDNS_INSTANCE , e ) ;