Program: 134756
Project: 134756
Buggy source:
/** 
 * Gets a logger to be used by ORB and POA classes, or by hibernate.  The logger is connected to the central ACS logger. <p>
 * @TODO rename this method to accommodate non-corba frameworks into which we insert ACS loggers, such as hibernate,see  {@link org.slf4j.impl.ACSLoggerFactory}. <p> For hibernate and scxml loggers, the logger automatically receives an initial custom log level configuration,  to avoid jamming the log system with hibernate or scxml logs.  The applied custom log level is the maximum of the default log level and WARNING. Note that the hibernate/scxml logger can still be set to a more verbose level by giving it a custom log config in the CDB, or dynamically using logLevelGUI etc. <p>
 * @TODO Instead of this hard coded and probably confusing application of a custom log level,the CDB should offer a central configuration option for all jacorb, hibernate, scxml etc loggers, independently of the process (container or manager etc). <p>
 * @param corbaName e.g. <code>jacorb</code>. @TODO rename it.
 * @param autoConfigureContextName if true, the context (e.g. container name) will be appended to this logger's name as soon as it is available, changing the logger name to something like <code>jacorb@frodoContainer</code>.
 */
public AcsLogger getLoggerForCorba(String corbaName,boolean autoConfigureContextName){
  String loggerName=corbaName;
  AcsLogger corbaLogger=null;
  processNameLock.lock();
  try {
    if (autoConfigureContextName && processName != null) {
      loggerName+="String_Node_Str" + processName;
    }
    corbaLogger=getAcsLogger(loggerName,LoggerOwnerType.OrbLogger);
    corbaLogger.addIgnoreLogs("String_Node_Str","String_Node_Str");
    corbaLogger.addIgnoreLogs("String_Node_Str","String_Node_Str");
    corbaLogger.addIgnoreLogs("String_Node_Str","String_Node_Str");
    if (autoConfigureContextName && processName == null) {
      AcsLoggerInfo loggerInfo=loggers.get(loggerName);
      loggerInfo.needsProcessNameUpdate=true;
    }
  }
  finally {
    processNameLock.unlock();
  }
  if (suppressCorbaRemoteLogging) {
    sharedLogConfig.setAndLockMinLogLevel(AcsLogLevelDefinition.OFF,loggerName);
  }
 else   if (!sharedLogConfig.hasCustomConfig(loggerName)) {
    if (corbaName.startsWith(ACSLoggerFactory.HIBERNATE_LOGGER_NAME_PREFIX) || corbaName.startsWith(ACSLoggerFactory.HIBERNATE_SQL_LOGGER_NAME_PREFIX) || corbaName.startsWith(CommonsLoggingFactory.SCXML_LOGGER_NAME_PREFIX)) {
      AcsLogLevelDefinition minCustomLevel=AcsLogLevelDefinition.WARNING;
      AcsLogLevelDefinition customLevel=(minCustomLevel.compareTo(sharedLogConfig.getDefaultMinLogLevel()) > 0 ? minCustomLevel : sharedLogConfig.getDefaultMinLogLevel());
      sharedLogConfig.setMinLogLevel(customLevel,loggerName);
      AcsLogLevelDefinition customLevelLocal=(minCustomLevel.compareTo(sharedLogConfig.getDefaultMinLogLevelLocal()) > 0 ? minCustomLevel : sharedLogConfig.getDefaultMinLogLevelLocal());
      sharedLogConfig.setMinLogLevelLocal(customLevelLocal,loggerName);
      m_internalLogger.info("String_Node_Str" + loggerName + "String_Node_Str"+ customLevelLocal.name+ "String_Node_Str"+ customLevel.name+ "String_Node_Str");
    }
  }
  return corbaLogger;
}

Fixed version (ground truth):
/** 
 * Gets a logger to be used by ORB and POA classes, or by hibernate.  The logger is connected to the central ACS logger. <p>
 * @TODO rename this method to accommodate non-corba frameworks into which we insert ACS loggers, such as hibernate,see  {@link org.slf4j.impl.ACSLoggerFactory}. <p> For hibernate and scxml loggers, the logger automatically receives an initial custom log level configuration,  to avoid jamming the log system with hibernate or scxml logs.  The applied custom log level is the maximum of the default log level and WARNING. Note that the hibernate/scxml logger can still be set to a more verbose level by giving it a custom log config in the CDB, or dynamically using logLevelGUI etc. <p>
 * @TODO Instead of this hard coded and probably confusing application of a custom log level,the CDB should offer a central configuration option for all jacorb, hibernate, scxml etc loggers, independently of the process (container or manager etc). <p>
 * @param corbaName e.g. <code>jacorb</code>. @TODO rename it.
 * @param autoConfigureContextName if true, the context (e.g. container name) will be appended to this logger's name as soon as it is available, changing the logger name to something like <code>jacorb@frodoContainer</code>.
 */
public AcsLogger getLoggerForCorba(String corbaName,boolean autoConfigureContextName){
  String loggerName=corbaName;
  AcsLogger corbaLogger=null;
  processNameLock.lock();
  try {
    if (autoConfigureContextName && processName != null) {
      loggerName+="String_Node_Str" + processName;
    }
    corbaLogger=getAcsLogger(loggerName,LoggerOwnerType.OrbLogger);
    if (corbaName.equals(JacORBLoggerFactory.JACORB_LOGGER_NAME)) {
      corbaLogger.addIgnoreLogs("String_Node_Str","String_Node_Str");
      corbaLogger.addIgnoreLogs("String_Node_Str","String_Node_Str");
      corbaLogger.addIgnoreLogs("String_Node_Str","String_Node_Str");
    }
    if (autoConfigureContextName && processName == null) {
      AcsLoggerInfo loggerInfo=loggers.get(loggerName);
      loggerInfo.needsProcessNameUpdate=true;
    }
  }
  finally {
    processNameLock.unlock();
  }
  if (suppressCorbaRemoteLogging) {
    sharedLogConfig.setAndLockMinLogLevel(AcsLogLevelDefinition.OFF,loggerName);
  }
 else   if (!sharedLogConfig.hasCustomConfig(loggerName)) {
    AcsLogLevelDefinition minCustomLevel=null;
    if (corbaName.startsWith(ACSLoggerFactory.HIBERNATE_LOGGER_NAME_PREFIX) || corbaName.startsWith(ACSLoggerFactory.HIBERNATE_SQL_LOGGER_NAME_PREFIX) || corbaName.startsWith(CommonsLoggingFactory.SCXML_LOGGER_NAME_PREFIX)) {
      minCustomLevel=AcsLogLevelDefinition.WARNING;
    }
 else     if (corbaName.equals(JacORBLoggerFactory.JACORB_LOGGER_NAME)) {
      AcsLogLevelDefinition level=JacORBLoggerFactory.getLogLevelFromJacorbVerbosity();
      if (level != null) {
        minCustomLevel=level;
      }
 else {
        minCustomLevel=AcsLogLevelDefinition.WARNING;
        m_internalLogger.info("String_Node_Str");
      }
    }
    if (minCustomLevel != null) {
      AcsLogLevelDefinition customLevel=(minCustomLevel.compareTo(sharedLogConfig.getDefaultMinLogLevel()) > 0 ? minCustomLevel : sharedLogConfig.getDefaultMinLogLevel());
      sharedLogConfig.setMinLogLevel(customLevel,loggerName);
      AcsLogLevelDefinition customLevelLocal=(minCustomLevel.compareTo(sharedLogConfig.getDefaultMinLogLevelLocal()) > 0 ? minCustomLevel : sharedLogConfig.getDefaultMinLogLevelLocal());
      sharedLogConfig.setMinLogLevelLocal(customLevelLocal,loggerName);
      m_internalLogger.info("String_Node_Str" + loggerName + "String_Node_Str"+ customLevelLocal.name+ "String_Node_Str"+ customLevel.name+ "String_Node_Str");
    }
  }
  return corbaLogger;
}