Program: 134755
Project: 134755
Buggy source:
/** 
 * Creates or reuses a logger, normally with both a local and a remote handler attached. If remote logging is suppressed then no remote handler is attached. <p> Logger names must be unique. If the requested logger name matches a given logger  of the same LoggerOwnerType then that logger is returned. If however a logger of a different type is matched, then a name uniqueness violation is avoided by appending  small integer numbers to the logger name.  Therefore the name of the returned Logger may be different from <code>loggerName</code>! The idea of this strategy is that uniqueness of component names will be enforced  by the system, while a component may in sick cases have the name of a container or the orb logger.
 * @param loggerName The unique logger name
 * @param loggerOwnerType  enum for the type of the logger owner.With ACS 7.0, this replaces the namespace strings previously prepended to the logger names.
 * @return
 * @throws IllegalArgumentException if loggerName is null or empty
 */
private AcsLogger getAcsLogger(String loggerName,LoggerOwnerType loggerOwnerType){
  if (loggerName == null || loggerName.trim().isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  AcsLoggerInfo loggerInfo=null;
  try {
synchronized (loggers) {
      loggerInfo=loggers.get(loggerName);
      int counter=2;
      while (loggerInfo != null && loggerOwnerType != loggerInfo.loggerOwnerType) {
        int lastIndexUnderscore=loggerName.lastIndexOf('_');
        if (lastIndexUnderscore > 0 && loggerName.length() > lastIndexUnderscore + 1) {
          try {
            int oldCounter=Integer.parseInt(loggerName.substring(lastIndexUnderscore + 1));
            counter=Math.max(counter,oldCounter + 1);
            loggerName=loggerName.substring(0,lastIndexUnderscore + 1) + counter;
            loggerInfo=loggers.get(loggerName);
            continue;
          }
 catch (          NumberFormatException ex) {
          }
        }
        loggerName+="String_Node_Str" + counter;
        loggerInfo=loggers.get(loggerName);
      }
      if (loggerInfo == null) {
        loggerInfo=new AcsLoggerInfo();
        loggerInfo.logger=new AcsLogger(loggerName,null,sharedLogConfig);
        loggerInfo.logger.setParent(parentRemoteLogger);
        loggerInfo.logger.setUseParentHandlers(false);
        loggerInfo.logger.setProcessName(this.processName);
        if (loggerOwnerType == LoggerOwnerType.ComponentLogger || loggerOwnerType == LoggerOwnerType.OrbLogger) {
          loggerInfo.logger.setSourceObject(loggerName);
        }
 else {
          loggerInfo.logger.setSourceObject(this.processName);
        }
        loggerInfo.localHandler=addLocalHandler(loggerInfo.logger);
        loggerInfo.remoteHandler=addRemoteHandler(loggerInfo.logger);
        loggerInfo.loggerOwnerType=loggerOwnerType;
        loggers.put(loggerName,loggerInfo);
      }
      if (DEBUG) {
        System.out.println("String_Node_Str" + loggerName + "String_Node_Str"+ loggerInfo.logger.getLevel()+ "String_Node_Str");
      }
    }
  }
 catch (  Throwable thr) {
    System.out.println("String_Node_Str" + loggerName + "String_Node_Str");
  }
  return loggerInfo.logger;
}

Fixed version (ground truth):
/** 
 * Creates or reuses a logger, normally with both a local and a remote handler attached. If remote logging is suppressed then no remote handler is attached. <p> Logger names must be unique. If the requested logger name matches a given logger  of the same LoggerOwnerType then that logger is returned. If however a logger of a different type is matched, then a name uniqueness violation is avoided by appending  small integer numbers to the logger name.  Therefore the name of the returned Logger may be different from <code>loggerName</code>! The idea of this strategy is that uniqueness of component names will be enforced  by the system, while a component may in sick cases have the name of a container or the orb logger.
 * @param loggerName The unique logger name
 * @param loggerOwnerType  enum for the type of the logger owner.With ACS 7.0, this replaces the namespace strings previously prepended to the logger names.
 * @return
 * @throws IllegalArgumentException if loggerName is null or empty
 */
private AcsLogger getAcsLogger(String loggerName,LoggerOwnerType loggerOwnerType){
  if (loggerName == null || loggerName.trim().isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  AcsLoggerInfo loggerInfo=null;
  try {
synchronized (loggers) {
      loggerInfo=loggers.get(loggerName);
      int counter=2;
      while (loggerInfo != null && loggerOwnerType != loggerInfo.loggerOwnerType) {
        int lastIndexUnderscore=loggerName.lastIndexOf('_');
        if (lastIndexUnderscore > 0 && loggerName.length() > lastIndexUnderscore + 1) {
          try {
            int oldCounter=Integer.parseInt(loggerName.substring(lastIndexUnderscore + 1));
            counter=Math.max(counter,oldCounter + 1);
            loggerName=loggerName.substring(0,lastIndexUnderscore + 1) + counter;
            loggerInfo=loggers.get(loggerName);
            continue;
          }
 catch (          NumberFormatException ex) {
          }
        }
        loggerName+="String_Node_Str" + counter;
        loggerInfo=loggers.get(loggerName);
      }
      if (loggerInfo == null) {
        loggerInfo=new AcsLoggerInfo();
        loggerInfo.logger=new AcsLogger(loggerName,null,sharedLogConfig);
        loggerInfo.logger.setParent(parentRemoteLogger);
        loggerInfo.logger.setUseParentHandlers(false);
        loggerInfo.logger.setProcessName(this.processName);
        if (loggerOwnerType == LoggerOwnerType.ComponentLogger || loggerOwnerType == LoggerOwnerType.OrbLogger) {
          loggerInfo.logger.setSourceObject(loggerName);
        }
 else {
          loggerInfo.logger.setSourceObject(this.processName);
        }
        loggerInfo.localHandler=addLocalHandler(loggerInfo.logger);
        loggerInfo.remoteHandler=addRemoteHandler(loggerInfo.logger);
        loggerInfo.loggerOwnerType=loggerOwnerType;
        loggers.put(loggerName,loggerInfo);
      }
      if (DEBUG) {
        System.out.println("String_Node_Str" + loggerName + "String_Node_Str"+ loggerInfo.logger.getLevel()+ "String_Node_Str");
      }
    }
  }
 catch (  Throwable thr) {
    System.out.println("String_Node_Str" + loggerName + "String_Node_Str");
    thr.printStackTrace(System.out);
  }
  return loggerInfo.logger;
}