Program: 95009
Project: 95009
Buggy source:
protected IRCEventListener getIRCEventListener(){
  return new IRCEventListener(){
    public void onRegistered(){
      trace("String_Node_Str");
synchronized (connectLock) {
        connectWaiting=false;
        connectLock.notify();
      }
    }
    public void onDisconnected(){
      trace("String_Node_Str");
synchronized (connectLock) {
        if (connectWaiting) {
          if (connectException == null)           connectException=new Exception(Messages.IRCRootContainer_Exception_Unexplained_Disconnect);
          connectWaiting=false;
          connectLock.notify();
        }
      }
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Disconnected,targetID.getName()));
      handleDisconnected();
    }
    public void onError(    String arg0){
      trace("String_Node_Str" + arg0 + "String_Node_Str");
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Error,arg0));
      handleErrorIfConnecting(arg0);
    }
    public void onError(    int arg0,    String arg1){
      String msg=arg0 + "String_Node_Str" + arg1;
      trace("String_Node_Str" + msg + "String_Node_Str");
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Error,msg));
      handleErrorIfConnecting(arg0 + msg);
    }
    public void onInvite(    String arg0,    IRCUser arg1,    String arg2){
      handleInvite(createIDFromString(arg0),createIDFromString(arg1.getNick()));
    }
    public void onJoin(    String arg0,    IRCUser arg1){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str");
      IRCChannelContainer container=getChannel(arg0);
      if (container != null) {
        container.setIRCUser(arg1);
      }
    }
    public void onKick(    String channelName,    IRCUser kicker,    String kicked,    String reason){
      trace("String_Node_Str" + channelName + "String_Node_Str"+ kicker+ "String_Node_Str"+ kicked+ "String_Node_Str"+ reason+ "String_Node_Str");
      IRCChannelContainer channel=getChannel(channelName);
      if (channel != null) {
        showMessage(channelName,NLS.bind(Messages.IRCRootContainer_UserKicked,new Object[]{kicker.getNick(),kicked,channelName,reason}));
        if (kicked.equals(((IRCID)targetID).getUsername())) {
          channel.fireContainerEvent(new ContainerDisconnectingEvent(channel.getID(),channel.targetID));
          channel.firePresenceListeners(false,new String[]{kicked});
          channel.fireContainerEvent(new ContainerDisconnectedEvent(channel.getID(),channel.targetID));
        }
 else {
          channel.firePresenceListeners(false,new String[]{kicked});
        }
      }
    }
    public void onMode(    String arg0,    IRCUser arg1,    IRCModeParser arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
    }
    public void onMode(    IRCUser arg0,    String arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
    }
    public void onNick(    IRCUser arg0,    String arg1){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str");
    }
    public void onNotice(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      showMessage(arg0,arg2);
    }
    public void onPart(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      IRCChannelContainer channel=(IRCChannelContainer)channels.get(arg0);
      if (channel != null) {
        channel.firePresenceListeners(false,new String[]{getIRCUserName(arg1)});
      }
    }
    public void onPing(    String arg0){
      trace("String_Node_Str" + arg0 + "String_Node_Str");
synchronized (IRCRootContainer.this) {
        if (connection != null) {
          connection.doPong(arg0);
        }
      }
    }
    public void onPrivmsg(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      showMessage(arg0,arg1.toString(),arg2);
    }
    public void onQuit(    IRCUser arg0,    String arg1){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str");
      for (Iterator i=channels.values().iterator(); i.hasNext(); ) {
        IRCChannelContainer container=(IRCChannelContainer)i.next();
        container.handleUserQuit(getIRCUserName(arg0));
      }
    }
    public void onReply(    int arg0,    String arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      replyHandler.handleReply(arg0,arg1,arg2);
    }
    public void onTopic(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      handleSetSubject(arg0,arg1,arg2);
    }
    public void unknown(    String arg0,    String arg1,    String arg2,    String arg3){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str"+ arg3+ "String_Node_Str");
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Unknown_Message,new Object[]{arg0,arg1,arg2,arg3}));
    }
  }
;
}

Fixed version (ground truth):
protected IRCEventListener getIRCEventListener(){
  return new IRCEventListener(){
    public void onRegistered(){
      trace("String_Node_Str");
synchronized (connectLock) {
        connectWaiting=false;
        connectLock.notify();
      }
    }
    public void onDisconnected(){
      trace("String_Node_Str");
synchronized (connectLock) {
        if (connectWaiting) {
          if (connectException == null)           connectException=new Exception(Messages.IRCRootContainer_Exception_Unexplained_Disconnect);
          connectWaiting=false;
          connectLock.notify();
        }
      }
      if (targetID != null) {
        showMessage(null,NLS.bind(Messages.IRCRootContainer_Disconnected,targetID.getName()));
        handleDisconnected();
      }
    }
    public void onError(    String arg0){
      trace("String_Node_Str" + arg0 + "String_Node_Str");
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Error,arg0));
      handleErrorIfConnecting(arg0);
    }
    public void onError(    int arg0,    String arg1){
      String msg=arg0 + "String_Node_Str" + arg1;
      trace("String_Node_Str" + msg + "String_Node_Str");
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Error,msg));
      handleErrorIfConnecting(arg0 + msg);
    }
    public void onInvite(    String arg0,    IRCUser arg1,    String arg2){
      handleInvite(createIDFromString(arg0),createIDFromString(arg1.getNick()));
    }
    public void onJoin(    String arg0,    IRCUser arg1){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str");
      IRCChannelContainer container=getChannel(arg0);
      if (container != null) {
        container.setIRCUser(arg1);
      }
    }
    public void onKick(    String channelName,    IRCUser kicker,    String kicked,    String reason){
      trace("String_Node_Str" + channelName + "String_Node_Str"+ kicker+ "String_Node_Str"+ kicked+ "String_Node_Str"+ reason+ "String_Node_Str");
      IRCChannelContainer channel=getChannel(channelName);
      if (channel != null) {
        showMessage(channelName,NLS.bind(Messages.IRCRootContainer_UserKicked,new Object[]{kicker.getNick(),kicked,channelName,reason}));
        if (kicked.equals(((IRCID)targetID).getUsername())) {
          channel.fireContainerEvent(new ContainerDisconnectingEvent(channel.getID(),channel.targetID));
          channel.firePresenceListeners(false,new String[]{kicked});
          channel.fireContainerEvent(new ContainerDisconnectedEvent(channel.getID(),channel.targetID));
        }
 else {
          channel.firePresenceListeners(false,new String[]{kicked});
        }
      }
    }
    public void onMode(    String arg0,    IRCUser arg1,    IRCModeParser arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
    }
    public void onMode(    IRCUser arg0,    String arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
    }
    public void onNick(    IRCUser arg0,    String arg1){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str");
    }
    public void onNotice(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      showMessage(arg0,arg2);
    }
    public void onPart(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      IRCChannelContainer channel=(IRCChannelContainer)channels.get(arg0);
      if (channel != null) {
        channel.firePresenceListeners(false,new String[]{getIRCUserName(arg1)});
      }
    }
    public void onPing(    String arg0){
      trace("String_Node_Str" + arg0 + "String_Node_Str");
synchronized (IRCRootContainer.this) {
        if (connection != null) {
          connection.doPong(arg0);
        }
      }
    }
    public void onPrivmsg(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      showMessage(arg0,arg1.toString(),arg2);
    }
    public void onQuit(    IRCUser arg0,    String arg1){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str");
      for (Iterator i=channels.values().iterator(); i.hasNext(); ) {
        IRCChannelContainer container=(IRCChannelContainer)i.next();
        container.handleUserQuit(getIRCUserName(arg0));
      }
    }
    public void onReply(    int arg0,    String arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      replyHandler.handleReply(arg0,arg1,arg2);
    }
    public void onTopic(    String arg0,    IRCUser arg1,    String arg2){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str");
      handleSetSubject(arg0,arg1,arg2);
    }
    public void unknown(    String arg0,    String arg1,    String arg2,    String arg3){
      trace("String_Node_Str" + arg0 + "String_Node_Str"+ arg1+ "String_Node_Str"+ arg2+ "String_Node_Str"+ arg3+ "String_Node_Str");
      showMessage(null,NLS.bind(Messages.IRCRootContainer_Unknown_Message,new Object[]{arg0,arg1,arg2,arg3}));
    }
  }
;
}