Program: 103985
Project: 103985
Buggy source:
public boolean authorizationRequired(Screenname screenname,Group parentGroup){
  logger.trace("String_Node_Str" + screenname);
  logger.trace("String_Node_Str" + screenname);
  ContactIcqImpl srcContact=ssContactList.findContactByScreenName(screenname.getFormatted());
  if (srcContact == null) {
    ContactGroupIcqImpl parent=ssContactList.findContactGroup(parentGroup);
    srcContact=ssContactList.createUnresolvedContact((ContactGroupIcqImpl)parent,screenname);
    Buddy buddy=((ContactIcqImpl)srcContact).getJoustSimBuddy();
    if (buddy instanceof VolatileBuddy)     ((VolatileBuddy)buddy).setAwaitingAuthorization(true);
    ContactGroupIcqImpl theAwaitingAuthorizationGroup=ssContactList.findContactGroup(ServerStoredContactListIcqImpl.awaitingAuthorizationGroupName);
    if (theAwaitingAuthorizationGroup == null) {
      List emptyBuddies=new LinkedList();
      theAwaitingAuthorizationGroup=new ContactGroupIcqImpl(new VolatileGroup(ServerStoredContactListIcqImpl.awaitingAuthorizationGroupName),emptyBuddies,ssContactList,false);
      ((RootContactGroupIcqImpl)ssContactList.getRootGroup()).addSubGroup(theAwaitingAuthorizationGroup);
      ssContactList.fireGroupEvent(theAwaitingAuthorizationGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
    }
    ((ContactGroupIcqImpl)parent).removeContact(srcContact);
    theAwaitingAuthorizationGroup.addContact(srcContact);
    Object lock=new Object();
synchronized (lock) {
      try {
        lock.wait(500);
      }
 catch (      Exception e) {
      }
    }
    fireSubscriptionMovedEvent(srcContact,parent,theAwaitingAuthorizationGroup);
  }
  AuthorizationRequest authRequest=authorizationHandler.createAuthorizationRequest(srcContact);
  if (authRequest == null)   return false;
  parentProvider.getAimConnection().getSsiService().sendFutureBuddyAuthorization(screenname,authRequest.getReason());
  parentProvider.getAimConnection().getSsiService().requestBuddyAuthorization(screenname,authRequest.getReason());
  return true;
}

Fixed version (ground truth):
public boolean authorizationRequired(Screenname screenname,Group parentGroup){
  logger.trace("String_Node_Str" + screenname);
  logger.trace("String_Node_Str" + screenname);
  ContactIcqImpl srcContact=ssContactList.findContactByScreenName(screenname.getFormatted());
  if (srcContact == null) {
    ContactGroupIcqImpl parent=ssContactList.findContactGroup(parentGroup);
    srcContact=ssContactList.createUnresolvedContact((ContactGroupIcqImpl)parent,screenname);
    Buddy buddy=((ContactIcqImpl)srcContact).getJoustSimBuddy();
    if (buddy instanceof VolatileBuddy)     ((VolatileBuddy)buddy).setAwaitingAuthorization(true);
    ContactGroupIcqImpl theAwaitingAuthorizationGroup=ssContactList.findContactGroup(ServerStoredContactListIcqImpl.awaitingAuthorizationGroupName);
    if (theAwaitingAuthorizationGroup == null) {
      List emptyBuddies=new LinkedList();
      theAwaitingAuthorizationGroup=new ContactGroupIcqImpl(new VolatileGroup(ServerStoredContactListIcqImpl.awaitingAuthorizationGroupName),emptyBuddies,ssContactList,false);
      ((RootContactGroupIcqImpl)ssContactList.getRootGroup()).addSubGroup(theAwaitingAuthorizationGroup);
      ssContactList.fireGroupEvent(theAwaitingAuthorizationGroup,ServerStoredGroupEvent.GROUP_CREATED_EVENT);
    }
    ((ContactGroupIcqImpl)parent).removeContact(srcContact);
    theAwaitingAuthorizationGroup.addContact(srcContact);
    try {
      Thread.sleep(500);
    }
 catch (    InterruptedException ex) {
    }
    fireSubscriptionMovedEvent(srcContact,parent,theAwaitingAuthorizationGroup);
  }
  AuthorizationRequest authRequest=authorizationHandler.createAuthorizationRequest(srcContact);
  if (authRequest == null)   return false;
  parentProvider.getAimConnection().getSsiService().sendFutureBuddyAuthorization(screenname,authRequest.getReason());
  parentProvider.getAimConnection().getSsiService().requestBuddyAuthorization(screenname,authRequest.getReason());
  return true;
}