Program: 134823
Project: 134823
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> 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 processName){
  if (this.processName == null && processName != null) {
    processNameLock.lock();
    try {
      this.processName=processName;
synchronized (loggers) {
        for (        String oldLoggerName : new ArrayList<String>(loggers.keySet())) {
          AcsLoggerInfo loggerInfo=loggers.get(oldLoggerName);
          if (loggerInfo.needsProcessNameUpdate) {
            String newLoggerName=oldLoggerName + "String_Node_Str" + processName;
            loggerInfo.logger.setLoggerName(newLoggerName);
            loggerInfo.logger.setProcessName(processName);
            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);
          }
        }
      }
    }
  finally {
      processNameLock.unlock();
    }
  }
 else {
    m_internalLogger.info("String_Node_Str" + this.processName + "String_Node_Str"+ processName+ "String_Node_Str");
  }
}

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> 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 processName){
  if (processName == null) {
    return;
  }
  if (this.processName == null) {
    processNameLock.lock();
    try {
      this.processName=processName;
synchronized (loggers) {
        for (        String oldLoggerName : new ArrayList<String>(loggers.keySet())) {
          AcsLoggerInfo loggerInfo=loggers.get(oldLoggerName);
          if (loggerInfo.needsProcessNameUpdate) {
            String newLoggerName=oldLoggerName + "String_Node_Str" + processName;
            loggerInfo.logger.setLoggerName(newLoggerName);
            loggerInfo.logger.setProcessName(processName);
            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);
          }
        }
      }
    }
  finally {
      processNameLock.unlock();
    }
  }
 else   if (!processName.equals(this.processName)) {
    m_internalLogger.info("String_Node_Str" + this.processName + "String_Node_Str"+ processName+ "String_Node_Str");
  }
}