Program: 103268
Project: 103268
Buggy source:
/** 
 * Analyzes the <tt>sessionIQ</tt>'s action and passes it to the corresponding handler.
 * @param sessionIQ the {@link SessionIQ} packet we need to be analyzing.
 */
private void processSessionIQ(SessionIQ sessionIQ){
  CallPeerGTalkImpl callPeer=activeGTalkCallsRepository.findCallPeer(sessionIQ.getID());
  IQ.Type type=sessionIQ.getType();
  if (type == Type.RESULT) {
    return;
  }
  if (type == Type.ERROR) {
    logger.error("String_Node_Str");
    XMPPError error=sessionIQ.getError();
    RedirectPacketExtension redirect=null;
    if (error != null) {
      for (      PacketExtension e : error.getExtensions()) {
        if (e.getElementName().equals(RedirectPacketExtension.ELEMENT_NAME)) {
          redirect=(RedirectPacketExtension)e;
        }
      }
    }
    if (redirect != null) {
      CallGTalkImpl call=callPeer.getCall();
      try {
        String redir=redirect.getRedir();
        callPeer.setState(CallPeerState.DISCONNECTED);
        if (redir.startsWith("String_Node_Str"))         redir=redir.substring(5);
        call.initiateGTalkSession(redir,null);
      }
 catch (      Exception e) {
        logger.info("String_Node_Str");
      }
      return;
    }
    String message="String_Node_Str";
    if (error != null) {
      logger.error("String_Node_Str" + error.getCode() + "String_Node_Str"+ error.getMessage());
      if (error.getMessage() != null)       message=error.getMessage();
    }
    if (callPeer != null)     callPeer.setState(CallPeerState.FAILED,message);
    return;
  }
  GTalkType action=sessionIQ.getGTalkType();
  if (action == GTalkType.INITIATE) {
    CallGTalkImpl call=null;
    if (call == null) {
      call=new CallGTalkImpl(this);
    }
    call.processGTalkInitiate(sessionIQ);
    return;
  }
 else   if (callPeer == null) {
    if (logger.isDebugEnabled())     logger.debug("String_Node_Str");
    return;
  }
 else   if (action == GTalkType.CANDIDATES) {
    callPeer.processCandidates(sessionIQ);
  }
 else   if (action == GTalkType.REJECT) {
    callPeer.processSessionReject(sessionIQ);
  }
 else   if (action == GTalkType.TERMINATE) {
    callPeer.processSessionTerminate(sessionIQ);
  }
 else   if (action == GTalkType.ACCEPT) {
    callPeer.processSessionAccept(sessionIQ);
  }
}

Fixed version (ground truth):
/** 
 * Analyzes the <tt>sessionIQ</tt>'s action and passes it to the corresponding handler.
 * @param sessionIQ the {@link SessionIQ} packet we need to be analyzing.
 */
private void processSessionIQ(SessionIQ sessionIQ){
  final CallPeerGTalkImpl callPeer=activeGTalkCallsRepository.findCallPeer(sessionIQ.getID());
  IQ.Type type=sessionIQ.getType();
  if (type == Type.RESULT) {
    return;
  }
  if (type == Type.ERROR) {
    logger.error("String_Node_Str");
    XMPPError error=sessionIQ.getError();
    RedirectPacketExtension redirect=null;
    if (error != null) {
      for (      PacketExtension e : error.getExtensions()) {
        if (e.getElementName().equals(RedirectPacketExtension.ELEMENT_NAME)) {
          redirect=(RedirectPacketExtension)e;
        }
      }
    }
    if (redirect != null) {
      final CallGTalkImpl call=callPeer.getCall();
      final String redirAddr;
      String redir=redirect.getRedir();
      if (redir.startsWith("String_Node_Str"))       redirAddr=redir.substring(5);
 else       redirAddr=null;
      if (redirAddr == null)       return;
      new Thread(){
        public void run(){
          try {
            call.initiateGTalkSession(redirAddr,null);
            callPeer.setState(CallPeerState.DISCONNECTED);
          }
 catch (          Exception e) {
            logger.info("String_Node_Str");
          }
        }
      }
.start();
      return;
    }
    String message="String_Node_Str";
    if (error != null) {
      logger.error("String_Node_Str" + error.getCode() + "String_Node_Str"+ error.getMessage());
      if (error.getMessage() != null)       message=error.getMessage();
    }
    if (callPeer != null)     callPeer.setState(CallPeerState.FAILED,message);
    return;
  }
  GTalkType action=sessionIQ.getGTalkType();
  if (action == GTalkType.INITIATE) {
    CallGTalkImpl call=null;
    if (call == null) {
      call=new CallGTalkImpl(this);
    }
    call.processGTalkInitiate(sessionIQ);
    return;
  }
 else   if (callPeer == null) {
    if (logger.isDebugEnabled())     logger.debug("String_Node_Str");
    return;
  }
 else   if (action == GTalkType.CANDIDATES) {
    callPeer.processCandidates(sessionIQ);
  }
 else   if (action == GTalkType.REJECT) {
    callPeer.processSessionReject(sessionIQ);
  }
 else   if (action == GTalkType.TERMINATE) {
    callPeer.processSessionTerminate(sessionIQ);
  }
 else   if (action == GTalkType.ACCEPT) {
    callPeer.processSessionAccept(sessionIQ);
  }
}