Program: 134825
Project: 134825
Buggy source:
/** 
 * Takes the process name and overwrites previous names, and updates all Loggers which are waiting to get their overly simple name enriched. The new name will be the old name + @ + processName. <p> For example, the Java container first uses a logger from which the process name "AcsContainerRunner" is derived. Only later when the the real container name has been parsed out, this gets renamed. <p> The update mechanism ensures that the process name will eventually be set also on loggers which were created before the process name was known, e.g. component logger created before container logger.
 * @TODO check if we still need the process name appended to the logger name, now that we have a separate field for it in AcsLogger.
 * @param name
 */
private void setProcessName(String newProcessName){
  if (newProcessName == null) {
    return;
  }
  if (!newProcessName.equals(this.processName)) {
    processNameLock.lock();
    try {
      this.processName=newProcessName;
synchronized (loggers) {
        for (        String oldLoggerName : new ArrayList<String>(loggers.keySet())) {
          AcsLoggerInfo loggerInfo=loggers.get(oldLoggerName);
          if (loggerInfo.needsProcessNameUpdate) {
            String newLoggerName=oldLoggerName + "String_Node_Str" + newProcessName;
            loggerInfo.logger.setLoggerName(newLoggerName);
            loggerInfo.logger.setProcessName(newProcessName);
            loggerInfo.needsProcessNameUpdate=false;
            AcsLoggerInfo gonner=loggers.put(newLoggerName,loggerInfo);
            if (gonner != null) {
              m_internalLogger.info("String_Node_Str" + newLoggerName + "String_Node_Str");
            }
            loggers.remove(oldLoggerName);
          }
        }
      }
      m_internalLogger.finer("String_Node_Str" + this.processName + "String_Node_Str"+ newProcessName+ "String_Node_Str");
    }
  finally {
      processNameLock.unlock();
    }
  }
}

Fixed version (ground truth):
/** 
 * Takes the process name and overwrites previous names, and updates all Loggers which are waiting to get their overly simple name enriched. The new name will be the old name + @ + processName. <p> For example, the Java container first uses a logger from which the process name "AcsContainerRunner" is derived. Only later when the the real container name has been parsed out, this gets renamed. <p> The update mechanism ensures that the process name will eventually be set also on loggers which were created before the process name was known, e.g. component logger created before container logger.
 * @TODO check if we still need the process name appended to the logger name, now that we have a separate field for it in AcsLogger.
 * @param name
 */
private void setProcessName(String newProcessName){
  if (newProcessName == null) {
    return;
  }
  if (!newProcessName.equals(this.processName)) {
    processNameLock.lock();
    try {
      String oldProcessName=this.processName;
      this.processName=newProcessName;
synchronized (loggers) {
        for (        String oldLoggerName : new ArrayList<String>(loggers.keySet())) {
          AcsLoggerInfo loggerInfo=loggers.get(oldLoggerName);
          if (loggerInfo.needsProcessNameUpdate) {
            String newLoggerName=oldLoggerName + "String_Node_Str" + newProcessName;
            loggerInfo.logger.setLoggerName(newLoggerName);
            loggerInfo.logger.setProcessName(newProcessName);
            loggerInfo.needsProcessNameUpdate=false;
            AcsLoggerInfo gonner=loggers.put(newLoggerName,loggerInfo);
            if (gonner != null) {
              m_internalLogger.info("String_Node_Str" + newLoggerName + "String_Node_Str");
            }
            loggers.remove(oldLoggerName);
          }
        }
      }
      m_internalLogger.finer("String_Node_Str" + oldProcessName + "String_Node_Str"+ newProcessName+ "String_Node_Str");
    }
  finally {
      processNameLock.unlock();
    }
  }
}