AIMBuddy buddy = mySender.getBuddy(_buddyName); if (buddy == null) { mySender.addBuddy(new AIMBuddy(_buddyName)); buddy = mySender.getBuddy(_buddyName); }
AIMBuddy buddy = getBuddy(_buddyName);
  public synchronized void sendMessage(String _buddyName, String _message) throws MessageException {    if (mySender != null) {      AIMBuddy buddy = mySender.getBuddy(_buddyName);      if (buddy == null) {        mySender.addBuddy(new AIMBuddy(_buddyName));        buddy = mySender.getBuddy(_buddyName);      }      if (buddy != null) {        if (!buddy.isOnline()) {          throw new BuddyOfflineException("The buddy '" + _buddyName + "' is not online.");        }        mySender.sendMessage(buddy, _message);      }    }  }