Program: 3076
Project: 3076
Buggy source:
public void presenceChanged(org.jivesoftware.smack.packet.Presence presence){
  if (getSession().getBuddyManager().isActivated()) {
    try {
      final XMPPBuddy xmppBuddy=(XMPPBuddy)getSession().getBuddyManager().getBuddy(getSession().getTransport().convertIDToJID(presence.getFrom()));
      xmppBuddy.setPresenceAndStatus(((XMPPTransport)getSession().getTransport()).convertXMPPStatusToGateway(presence.getType(),presence.getMode()),presence.getStatus());
      if (JiveGlobals.getBooleanProperty("String_Node_Str" + getSession().getTransport().getType() + "String_Node_Str",true)) {
        PacketExtension pe=presence.getExtension("String_Node_Str",NameSpace.VCARD_TEMP_X_UPDATE);
        if (pe != null) {
          DefaultPacketExtension dpe=(DefaultPacketExtension)pe;
          String hash=dpe.getValue("String_Node_Str");
          final String from=presence.getFrom();
          if (hash != null) {
            Avatar curAvatar=xmppBuddy.getAvatar();
            if (curAvatar == null || !curAvatar.getLegacyIdentifier().equals(hash)) {
              new Thread(){
                public void run(){
                  VCard vcard=new VCard();
                  try {
                    vcard.load(getSession().conn,from);
                    xmppBuddy.setAvatar(new Avatar(xmppBuddy.getJID(),from,vcard.getAvatar()));
                  }
 catch (                  XMPPException e) {
                    Log.debug("String_Node_Str",e);
                  }
catch (                  IllegalArgumentException e) {
                    Log.debug("String_Node_Str");
                  }
                }
              }
.start();
            }
          }
        }
      }
    }
 catch (    NotFoundException e) {
      Log.debug("String_Node_Str" + presence.getFrom());
    }
  }
 else {
    getSession().getBuddyManager().storePendingStatus(getSession().getTransport().convertIDToJID(presence.getFrom()),((XMPPTransport)getSession().getTransport()).convertXMPPStatusToGateway(presence.getType(),presence.getMode()),presence.getStatus());
  }
}

Fixed version (ground truth):
public void presenceChanged(org.jivesoftware.smack.packet.Presence presence){
  if (getSession().getBuddyManager().isActivated()) {
    try {
      final XMPPBuddy xmppBuddy=(XMPPBuddy)getSession().getBuddyManager().getBuddy(getSession().getTransport().convertIDToJID(presence.getFrom()));
      Log.debug("String_Node_Str" + presence.getType() + "String_Node_Str"+ presence.getMode()+ "String_Node_Str"+ presence.getFrom());
      xmppBuddy.setPresenceAndStatus(((XMPPTransport)getSession().getTransport()).convertXMPPStatusToGateway(presence.getType(),presence.getMode()),presence.getStatus());
      if (JiveGlobals.getBooleanProperty("String_Node_Str" + getSession().getTransport().getType() + "String_Node_Str",true)) {
        PacketExtension pe=presence.getExtension("String_Node_Str",NameSpace.VCARD_TEMP_X_UPDATE);
        if (pe != null) {
          DefaultPacketExtension dpe=(DefaultPacketExtension)pe;
          String hash=dpe.getValue("String_Node_Str");
          final String from=presence.getFrom();
          if (hash != null) {
            Avatar curAvatar=xmppBuddy.getAvatar();
            if (curAvatar == null || !curAvatar.getLegacyIdentifier().equals(hash)) {
              new Thread(){
                public void run(){
                  VCard vcard=new VCard();
                  try {
                    vcard.load(getSession().conn,from);
                    xmppBuddy.setAvatar(new Avatar(xmppBuddy.getJID(),from,vcard.getAvatar()));
                  }
 catch (                  XMPPException e) {
                    Log.debug("String_Node_Str",e);
                  }
catch (                  IllegalArgumentException e) {
                    Log.debug("String_Node_Str");
                  }
                }
              }
.start();
            }
          }
        }
      }
    }
 catch (    NotFoundException e) {
      Log.debug("String_Node_Str" + presence.getFrom());
    }
  }
 else {
    getSession().getBuddyManager().storePendingStatus(getSession().getTransport().convertIDToJID(presence.getFrom()),((XMPPTransport)getSession().getTransport()).convertXMPPStatusToGateway(presence.getType(),presence.getMode()),presence.getStatus());
  }
}