Program: 104285
Project: 104285
Buggy source:
/** 
 * Initializes and creates an account corresponding to the specified accountProperties and registers the resulting ProtocolProvider in the <tt>context</tt> BundleContext parameter.
 * @param userIDStr the user identifier uniquely representing the newlycreated account within the protocol namespace.
 * @param accountProperties a set of protocol (or implementation)specific properties defining the new account.
 * @return the AccountID of the newly created account.
 * @throws IllegalArgumentException if userID does not correspond to anidentifier in the context of the underlying protocol or if accountProperties does not contain a complete set of account installation properties.
 * @throws IllegalStateException if the account has already beeninstalled.
 * @throws NullPointerException if any of the arguments is null.
 */
public AccountID installAccount(String userIDStr,Map accountProperties){
  BundleContext context=SipActivator.getBundleContext();
  if (context == null)   throw new NullPointerException("String_Node_Str");
  if (userIDStr == null)   throw new NullPointerException("String_Node_Str");
  accountProperties.put(USER_ID,userIDStr);
  if (accountProperties == null)   throw new NullPointerException("String_Node_Str");
  String serverAddress=(String)accountProperties.get(SERVER_ADDRESS);
  if (serverAddress == null)   throw new NullPointerException("String_Node_Str");
  if (!accountProperties.containsKey(PROTOCOL))   accountProperties.put(PROTOCOL,ProtocolNames.SIP);
  AccountID accountID=new SipAccountID(userIDStr,accountProperties,serverAddress);
  if (registeredAccounts.containsKey(accountID))   throw new IllegalStateException("String_Node_Str" + userIDStr + "String_Node_Str");
  this.storeAccount(accountID);
  try {
    accountID=loadAccount(accountProperties);
  }
 catch (  RuntimeException exc) {
    this.removeStoredAccount(SipActivator.getBundleContext(),accountID);
    throw exc;
  }
  return accountID;
}

Fixed version (ground truth):
/** 
 * Initializes and creates an account corresponding to the specified accountProperties and registers the resulting ProtocolProvider in the <tt>context</tt> BundleContext parameter.
 * @param userIDStr the user identifier uniquely representing the newlycreated account within the protocol namespace.
 * @param accountProperties a set of protocol (or implementation)specific properties defining the new account.
 * @return the AccountID of the newly created account.
 * @throws IllegalArgumentException if userID does not correspond to anidentifier in the context of the underlying protocol or if accountProperties does not contain a complete set of account installation properties.
 * @throws IllegalStateException if the account has already beeninstalled.
 * @throws NullPointerException if any of the arguments is null.
 */
public AccountID installAccount(String userIDStr,Map accountProperties){
  BundleContext context=SipActivator.getBundleContext();
  if (context == null)   throw new NullPointerException("String_Node_Str");
  if (userIDStr == null)   throw new NullPointerException("String_Node_Str");
  accountProperties.put(USER_ID,userIDStr);
  if (accountProperties == null)   throw new NullPointerException("String_Node_Str");
  String serverAddress=(String)accountProperties.get(SERVER_ADDRESS);
  if (!accountProperties.containsKey(PROTOCOL))   accountProperties.put(PROTOCOL,ProtocolNames.SIP);
  AccountID accountID=new SipAccountID(userIDStr,accountProperties,serverAddress);
  if (registeredAccounts.containsKey(accountID))   throw new IllegalStateException("String_Node_Str" + userIDStr + "String_Node_Str");
  this.storeAccount(accountID);
  try {
    accountID=loadAccount(accountProperties);
  }
 catch (  RuntimeException exc) {
    this.removeStoredAccount(SipActivator.getBundleContext(),accountID);
    throw exc;
  }
  return accountID;
}