Buggy code:
public class IRCChannelContainer extends IRCAbstractContainer implements IChatRoomContainer , IChatMessageSender { private static final long CONNECT_TIMEOUT = 10000 ; protected List participantListeners = new ArrayList ( ) ; protected IRCRootContainer rootContainer ; protected IRCUser ircUser = null ; protected String channelOperator ; protected Object connectLock = new Object ( ) ; protected boolean connectWaiting = false ; protected Vector channelParticipants = new Vector ( ) ; protected IChatRoomAdminSender adminSender = null ; protected IChatRoomMessageSender sender = new IChatRoomMessageSender ( ) { public void sendMessage ( String message ) throws ECFException { } } ; public IRCChannelContainer ( IRCRootContainer root , ID localID ) { } public void addChatRoomParticipantListener ( IChatRoomParticipantListener participantListener ) { } public void removeChatRoomParticipantListener ( IChatRoomParticipantListener participantListener ) { } protected void handleUserQuit ( String name ) { } private IPresence createPresence ( final boolean available ) { } protected boolean addChannelParticipant ( ID participantID ) { } protected ID removeChannelParticipant ( ID participantID ) { } protected ID containsChannelParticipant ( ID participantID ) { } protected void firePresenceListeners ( boolean joined , String [ ] users ) { } protected boolean isChannelOperator ( String user ) { } public IChatRoomMessageSender getChatRoomMessageSender ( ) { } protected String getIRCUserName ( IRCUser user ) { } protected void setIRCUser ( IRCUser user ) { } protected void fireContainerEvent ( IContainerEvent event ) { } public void connect ( ID connectID , IConnectContext connectContext ) throws ContainerConnectException { if ( connectID == null ) throw new ContainerConnectException ( Messages . IRCChannelContainer_Exception_TargetID_Null ) ; if ( connectWaiting ) throw new ContainerConnectException ( Messages . IRCChannelContainer_Exception_Connecting ) ; String channelName = connectID . getName ( ) ; fireContainerEvent ( new ContainerConnectingEvent ( this . getID ( ) , connectID , connectContext ) ) ; String pw = getPasswordFromConnectContext ( connectContext ) ; synchronized ( connectLock ) { connectWaiting = true ; try { rootContainer . doJoinChannel ( channelName , pw ) ; long timeout = ( IRCChannelContainer . CONNECT_TIMEOUT ) + ( System . currentTimeMillis ( ) ) ; while ( ( connectWaiting ) && ( timeout > ( System . currentTimeMillis ( ) ) ) ) { connectLock . wait ( 2000 ) ; } if ( connectWaiting ) <START_BUG> throw new org . eclipse . ecf . core . util . TimeoutException ( IRCChannelContainer . CONNECT_TIMEOUT , NLS . bind ( IRCChannelContainer_Exception_Connect_Timeout , targetID . getName ( ) ) ) ; <END_BUG> this . targetID = connectID ; fireContainerEvent ( new ContainerConnectedEvent ( this . getID ( ) , this . targetID ) ) ; } catch ( Exception e ) { throw new ContainerConnectException ( NLS . bind ( IRCChannelContainer_Exception_Connect_Failed , targetID . getName ( ) ) , e ) ; } finally { connectWaiting = false ; } } } public void disconnect ( ) { } public Object getAdapter ( Class serviceType ) { } public Namespace getConnectNamespace ( ) { } protected boolean isLocalUserChannelOperator ( ) { } protected boolean isLocalUserChannelOperator ( String chOperator ) { } protected void setChannelOperator ( String channelOperator ) { } public void sendChatMessage ( ID toID , ID threadID , Type type , String subject , String body , Map properties ) throws ECFException { } public void sendChatMessage ( ID toID , String body ) throws ECFException { } public IChatMessageSender getPrivateMessageSender ( ) { } public ID [ ] getChatRoomParticipants ( ) { } public IChatRoomAdminSender getChatRoomAdminSender ( ) { } }

Fix:
throw new org . eclipse . ecf . core . util . TimeoutException ( IRCChannelContainer . CONNECT_TIMEOUT , NLS . bind ( IRCChannelContainer_Exception_Connect_Timeout , connectID . getName ( ) ) ) ;