Program: 103265
Project: 103265
Buggy source:
/** 
 * Creates a <tt>CallPeerGTalkImpl</tt> from <tt>calleeJID</tt> and sends them <tt>initiate</tt> IQ request.
 * @param calleeJID the party that we would like to invite to this call.
 * @param sessionInitiateExtensions a collection of additional and optional<tt>PacketExtension</tt>s to be added to the <tt>initiate</tt> {@link SessionIQ} which is to init this <tt>CallJabberImpl</tt>
 * @return the newly created <tt>Call</tt> corresponding to<tt>calleeJID</tt>. All following state change events will be delivered through this call peer.
 * @throws OperationFailedException  with the corresponding code if we failto create the call.
 */
public CallPeerGTalkImpl initiateGTalkSession(String calleeJID,Iterable<PacketExtension> sessionInitiateExtensions) throws OperationFailedException {
  CallPeerGTalkImpl callPeer=new CallPeerGTalkImpl(calleeJID,this);
  addCallPeer(callPeer);
  callPeer.setState(CallPeerState.INITIATING_CALL);
  if (getCallPeerCount() == 1)   parentOpSet.fireCallEvent(CallEvent.CALL_INITIATED,this);
  CallPeerMediaHandlerGTalkImpl mediaHandler=callPeer.getMediaHandler();
  mediaHandler.setLocalVideoTransmissionEnabled(localVideoAllowed);
  callPeer.setState(CallPeerState.CONNECTING);
  callPeer.initiateSession(sessionInitiateExtensions);
  return callPeer;
}

Fixed version (ground truth):
/** 
 * Creates a <tt>CallPeerGTalkImpl</tt> from <tt>calleeJID</tt> and sends them <tt>initiate</tt> IQ request.
 * @param calleeJID the party that we would like to invite to this call.
 * @param sessionInitiateExtensions a collection of additional and optional<tt>PacketExtension</tt>s to be added to the <tt>initiate</tt> {@link SessionIQ} which is to init this <tt>CallJabberImpl</tt>
 * @return the newly created <tt>Call</tt> corresponding to<tt>calleeJID</tt>. All following state change events will be delivered through this call peer.
 * @throws OperationFailedException  with the corresponding code if we failto create the call.
 */
public CallPeerGTalkImpl initiateGTalkSession(String calleeJID,Iterable<PacketExtension> sessionInitiateExtensions) throws OperationFailedException {
  CallPeerGTalkImpl callPeer=new CallPeerGTalkImpl(calleeJID,this);
  if (!firstCallPeerIsGV)   firstCallPeerIsGV=calleeJID.endsWith(ProtocolProviderServiceJabberImpl.GOOGLE_VOICE_DOMAIN);
  addCallPeer(callPeer);
  callPeer.setState(CallPeerState.INITIATING_CALL);
  if (getCallPeerCount() == 1 && !calleeJID.endsWith(ProtocolProviderServiceJabberImpl.GOOGLE_VOICE_DOMAIN) || getCallPeerCount() == 2 && firstCallPeerIsGV) {
    if (firstCallPeerIsGV) {
      firstCallPeerIsGV=false;
      Iterator<CallPeerGTalkImpl> it=getCallPeersVector().iterator();
      String sub=calleeJID.substring(0,calleeJID.indexOf("String_Node_Str"));
      while (it.hasNext()) {
        CallPeer p=it.next();
        if (p.getAddress().equals(sub)) {
          it.remove();
          break;
        }
      }
    }
    parentOpSet.fireCallEvent(CallEvent.CALL_INITIATED,this);
  }
  CallPeerMediaHandlerGTalkImpl mediaHandler=callPeer.getMediaHandler();
  mediaHandler.setLocalVideoTransmissionEnabled(localVideoAllowed);
  callPeer.setState(CallPeerState.CONNECTING);
  callPeer.initiateSession(sessionInitiateExtensions);
  return callPeer;
}