Program: 104409
Project: 104409
Buggy source:
/** 
 * Check if we can't subscribe to this contact now
 */
public void run(){
  Iterator groupsIter=getServerStoredContactListRoot().subgroups();
  while (groupsIter.hasNext()) {
    ContactGroupSipImpl group=(ContactGroupSipImpl)groupsIter.next();
    Iterator contactsIter=group.contacts();
    while (contactsIter.hasNext()) {
      ContactSipImpl contact=(ContactSipImpl)contactsIter.next();
      if (!contact.isResolvable() || (!contact.getPresenceStatus().equals(SipStatusEnum.UNKNOWN) && !contact.getPresenceStatus().equals(SipStatusEnum.OFFLINE))) {
        continue;
      }
      Request subscription=null;
      try {
        subscription=createSubscription(contact,SUBSCRIBE_DEFAULT_EXPIRE);
      }
 catch (      OperationFailedException e) {
        logger.debug("String_Node_Str",e);
        return;
      }
      ClientTransaction subscribeTransaction;
      SipProvider jainSipProvider=parentProvider.getDefaultJainSipProvider();
      try {
        subscribeTransaction=jainSipProvider.getNewClientTransaction(subscription);
      }
 catch (      TransactionUnavailableException ex) {
        logger.error("String_Node_Str" + "String_Node_Str" + "String_Node_Str",ex);
        return;
      }
      CallIdHeader idheader=(CallIdHeader)subscription.getHeader(CallIdHeader.NAME);
      subscribedContacts.put(idheader.getCallId(),contact);
      logger.debug("String_Node_Str" + contact);
      try {
        subscribeTransaction.sendRequest();
      }
 catch (      SipException ex) {
        logger.error("String_Node_Str",ex);
        subscribedContacts.remove(idheader.getCallId());
        return;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if we can't subscribe to this contact now
 */
public void run(){
  Iterator groupsIter=getServerStoredContactListRoot().subgroups();
  while (groupsIter.hasNext()) {
    ContactGroupSipImpl group=(ContactGroupSipImpl)groupsIter.next();
    Iterator contactsIter=group.contacts();
    while (contactsIter.hasNext()) {
      ContactSipImpl contact=(ContactSipImpl)contactsIter.next();
      if (!contact.isResolvable() || contact.getClientDialog() != null) {
        continue;
      }
      Request subscription=null;
      try {
        subscription=createSubscription(contact,SUBSCRIBE_DEFAULT_EXPIRE);
      }
 catch (      OperationFailedException e) {
        logger.debug("String_Node_Str",e);
        return;
      }
      ClientTransaction subscribeTransaction;
      SipProvider jainSipProvider=parentProvider.getDefaultJainSipProvider();
      try {
        subscribeTransaction=jainSipProvider.getNewClientTransaction(subscription);
      }
 catch (      TransactionUnavailableException ex) {
        logger.error("String_Node_Str" + "String_Node_Str" + "String_Node_Str",ex);
        return;
      }
      CallIdHeader idheader=(CallIdHeader)subscription.getHeader(CallIdHeader.NAME);
      subscribedContacts.put(idheader.getCallId(),contact);
      logger.debug("String_Node_Str" + contact);
      try {
        subscribeTransaction.sendRequest();
      }
 catch (      SipException ex) {
        logger.error("String_Node_Str",ex);
        subscribedContacts.remove(idheader.getCallId());
        return;
      }
    }
  }
}