Program: 104049
Project: 104049
Buggy source:
/** 
 * Stores an account represented in the form of an <code>AccountID</code> created by a specific <code>ProtocolProviderFactory</code>.
 * @param factory the <code>ProtocolProviderFactory</code> which created theaccount to be stored
 * @param accountID the account in the form of <code>AccountID</code> to bestored
 */
public void storeAccount(ProtocolProviderFactory factory,AccountID accountID){
  ConfigurationService configurationService=getConfigurationService();
  String factoryPackage=getFactoryImplPackageName(factory);
  List<String> storedAccounts=configurationService.getPropertyNamesByPrefix(factoryPackage,true);
  String accountUID=accountID.getAccountUniqueID();
  String accountNodeName=null;
  for (Iterator<String> storedAccountIter=storedAccounts.iterator(); storedAccountIter.hasNext(); ) {
    String storedAccount=storedAccountIter.next();
    String storedAccountUID=configurationService.getString(storedAccount + "String_Node_Str");
    if (storedAccountUID.equals(accountUID)) {
      accountNodeName=configurationService.getString(storedAccount);
    }
  }
  if (accountNodeName == null) {
    accountNodeName="String_Node_Str" + Long.toString(System.currentTimeMillis());
    configurationService.setProperty(factoryPackage + "String_Node_Str" + accountNodeName,accountNodeName);
    configurationService.setProperty(factoryPackage + "String_Node_Str" + accountNodeName+ "String_Node_Str"+ ProtocolProviderFactory.ACCOUNT_UID,accountID.getAccountUniqueID());
  }
  Map<?,?> accountProperties=accountID.getAccountProperties();
  for (  Map.Entry entry : accountProperties.entrySet()) {
    String property=(String)entry.getKey();
    String value=(String)entry.getValue();
    if (property.equals(ProtocolProviderFactory.PASSWORD))     value=new String(Base64.encode(value.getBytes()));
    configurationService.setProperty(factoryPackage + "String_Node_Str" + accountNodeName+ "String_Node_Str"+ property,value);
  }
  logger.debug("String_Node_Str" + accountID.getAccountUniqueID() + "String_Node_Str"+ factoryPackage);
}

Fixed version (ground truth):
/** 
 * Stores an account represented in the form of an <code>AccountID</code> created by a specific <code>ProtocolProviderFactory</code>.
 * @param factory the <code>ProtocolProviderFactory</code> which created theaccount to be stored
 * @param accountID the account in the form of <code>AccountID</code> to bestored
 */
public void storeAccount(ProtocolProviderFactory factory,AccountID accountID){
  ConfigurationService configurationService=getConfigurationService();
  String factoryPackage=getFactoryImplPackageName(factory);
  List<String> storedAccounts=configurationService.getPropertyNamesByPrefix(factoryPackage,true);
  String accountUID=accountID.getAccountUniqueID();
  String accountNodeName=null;
  for (Iterator<String> storedAccountIter=storedAccounts.iterator(); storedAccountIter.hasNext(); ) {
    String storedAccount=storedAccountIter.next();
    String storedAccountUID=configurationService.getString(storedAccount + "String_Node_Str");
    if (storedAccountUID.equals(accountUID)) {
      accountNodeName=configurationService.getString(storedAccount);
    }
  }
  if (accountNodeName == null) {
    accountNodeName="String_Node_Str" + Long.toString(System.currentTimeMillis());
    configurationService.setProperty(factoryPackage + "String_Node_Str" + accountNodeName,accountNodeName);
    configurationService.setProperty(factoryPackage + "String_Node_Str" + accountNodeName+ "String_Node_Str"+ ProtocolProviderFactory.ACCOUNT_UID,accountID.getAccountUniqueID());
  }
  Map<String,String> accountProperties=accountID.getAccountProperties();
  for (  Map.Entry<String,String> entry : accountProperties.entrySet()) {
    String property=entry.getKey();
    String value=entry.getValue();
    if (property.equals(ProtocolProviderFactory.PASSWORD))     value=new String(Base64.encode(value.getBytes()));
    configurationService.setProperty(factoryPackage + "String_Node_Str" + accountNodeName+ "String_Node_Str"+ property,value);
  }
  logger.debug("String_Node_Str" + accountID.getAccountUniqueID() + "String_Node_Str"+ factoryPackage);
}