Program: 29258
Project: 29258
Buggy source:
public void changed(File changedFile){
synchronized (gfHandlers) {
    try {
      Map<String,String> props=getLoggingProperties();
      loggerReference=new Vector<Logger>();
      if (props == null)       return;
      Set<String> keys=props.keySet();
      for (      String a : keys) {
        if (a.endsWith("String_Node_Str")) {
          String n=a.substring(0,a.lastIndexOf("String_Node_Str"));
          Level l=Level.parse(props.get(a));
          Logger appLogger=logMgr.getLogger(n);
          if (appLogger != null) {
            appLogger.setLevel(l);
            loggerReference.add(appLogger);
          }
 else           if (gfHandlers.containsKey(n)) {
            Handler h=(Handler)gfHandlers.get(n);
            h.setLevel(l);
          }
 else           if (n.equals("String_Node_Str")) {
            Logger logger=Logger.global.getParent();
            Handler[] h=logger.getHandlers();
            for (int i=0; i < h.length; i++) {
              String name=h[i].toString();
              if (name.contains("String_Node_Str"))               h[i].setLevel(l);
            }
          }
        }
 else         if (a.equals(SERVER_LOG_FILE_PROPERTY)) {
          if (!props.get(a).equals(serverLogFileDetail)) {
            PropertyChangeEvent pce=new PropertyChangeEvent(this,a,serverLogFileDetail,props.get(a));
            UnprocessedChangeEvents ucel=new UnprocessedChangeEvents(new UnprocessedChangeEvent(pce,"String_Node_Str"));
            List<UnprocessedChangeEvents> b=new ArrayList();
            b.add(ucel);
            ucl.unprocessedTransactedEvents(b);
          }
        }
 else         if (a.equals(HANDLER_PROPERTY)) {
          if (!props.get(a).equals(handlerDetail)) {
            generateAttributeChangeEvent(HANDLER_PROPERTY,handlerDetail,props);
          }
        }
 else         if (a.equals(CONSOLEHANDLER_FORMATTER_PROPERTY)) {
          if (!props.get(a).equals(consoleHandlerFormatterDetail)) {
            generateAttributeChangeEvent(CONSOLEHANDLER_FORMATTER_PROPERTY,consoleHandlerFormatterDetail,props);
          }
        }
 else         if (a.equals(GFFILEHANDLER_FORMATTER_PROPERTY)) {
          if (!props.get(a).equals(gffileHandlerFormatterDetail)) {
            generateAttributeChangeEvent(GFFILEHANDLER_FORMATTER_PROPERTY,gffileHandlerFormatterDetail,props);
          }
        }
 else         if (a.equals(ROTATIONTIMELIMITINMINUTES_PROPERTY)) {
          if (!props.get(a).equals(rotationOnTimeLimitInMinutesDetail)) {
            generateAttributeChangeEvent(ROTATIONTIMELIMITINMINUTES_PROPERTY,rotationOnTimeLimitInMinutesDetail,props);
          }
        }
 else         if (a.equals(FLUSHFREQUENCY_PROPERTY)) {
          if (!props.get(a).equals(flushFrequencyDetail)) {
            generateAttributeChangeEvent(FLUSHFREQUENCY_PROPERTY,flushFrequencyDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_LIMIT_PROPERTY)) {
          if (!props.get(a).equals(filterHandlerDetails)) {
            generateAttributeChangeEvent(FILEHANDLER_LIMIT_PROPERTY,filterHandlerDetails,props);
          }
        }
 else         if (a.equals(LOGTOCONSOLE_PROPERTY)) {
          if (!props.get(a).equals(logToConsoleDetail)) {
            generateAttributeChangeEvent(LOGTOCONSOLE_PROPERTY,logToConsoleDetail,props);
          }
        }
 else         if (a.equals(ROTATIONLIMITINBYTES_PROPERTY)) {
          if (!props.get(a).equals(rotationInTimeLimitInBytesDetail)) {
            generateAttributeChangeEvent(ROTATIONLIMITINBYTES_PROPERTY,rotationInTimeLimitInBytesDetail,props);
          }
        }
 else         if (a.equals(USESYSTEMLOGGING_PROPERTY)) {
          if (!props.get(a).equals(useSystemLoggingDetail)) {
            generateAttributeChangeEvent(USESYSTEMLOGGING_PROPERTY,useSystemLoggingDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_COUNT_PROPERTY)) {
          if (!props.get(a).equals(fileHandlerCountDetail)) {
            generateAttributeChangeEvent(FILEHANDLER_COUNT_PROPERTY,fileHandlerCountDetail,props);
          }
        }
 else         if (a.equals(RETAINERRORSSTATICTICS_PROPERTY)) {
          if (!props.get(a).equals(retainErrorsStaticticsDetail)) {
            generateAttributeChangeEvent(RETAINERRORSSTATICTICS_PROPERTY,retainErrorsStaticticsDetail,props);
          }
        }
 else         if (a.equals(LOG4J_VERSION_PROPERTY)) {
          if (!props.get(a).equals(log4jVersionDetail)) {
            generateAttributeChangeEvent(LOG4J_VERSION_PROPERTY,log4jVersionDetail,props);
          }
        }
 else         if (a.equals(MAXHISTORY_FILES_PROPERTY)) {
          if (!props.get(a).equals(maxHistoryFilesDetail)) {
            generateAttributeChangeEvent(MAXHISTORY_FILES_PROPERTY,maxHistoryFilesDetail,props);
          }
        }
 else         if (a.equals(ROTATIONONDATECHANGE_PROPERTY)) {
          if (!props.get(a).equals(rotationOnDateChangeDetail)) {
            generateAttributeChangeEvent(ROTATIONONDATECHANGE_PROPERTY,rotationOnDateChangeDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_PATTERN_PROPERTY)) {
          if (!props.get(a).equals(fileHandlerPatternDetail)) {
            generateAttributeChangeEvent(FILEHANDLER_PATTERN_PROPERTY,fileHandlerPatternDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_FORMATTER_PROPERTY)) {
          if (!props.get(a).equals(fileHandlerFormatterDetail)) {
            generateAttributeChangeEvent(FILEHANDLER_FORMATTER_PROPERTY,fileHandlerFormatterDetail,props);
          }
        }
 else         if (a.equals(LOGFORMAT_DATEFORMAT_PROPERTY)) {
          if (!props.get(a).equals(logFormatDateFormatDetail)) {
            generateAttributeChangeEvent(LOGFORMAT_DATEFORMAT_PROPERTY,logFormatDateFormatDetail,props);
          }
        }
      }
      logger.log(Level.INFO,"String_Node_Str");
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
public void changed(File changedFile){
synchronized (gfHandlers) {
    try {
      Map<String,String> props=getLoggingProperties();
      loggerReference=new Vector<Logger>();
      if (props == null)       return;
      for (      Map.Entry<String,String> entry : props.entrySet()) {
        String a=entry.getKey();
        String val=entry.getValue();
        if (a.endsWith("String_Node_Str")) {
          String n=a.substring(0,a.lastIndexOf("String_Node_Str"));
          Level l=Level.parse(val);
          Logger appLogger=logMgr.getLogger(n);
          if (appLogger != null) {
            appLogger.setLevel(l);
            loggerReference.add(appLogger);
          }
 else           if (gfHandlers.containsKey(n)) {
            Handler h=(Handler)gfHandlers.get(n);
            h.setLevel(l);
          }
 else           if (n.equals("String_Node_Str")) {
            Logger logger=Logger.global.getParent();
            Handler[] h=logger.getHandlers();
            for (int i=0; i < h.length; i++) {
              String name=h[i].toString();
              if (name.contains("String_Node_Str"))               h[i].setLevel(l);
            }
          }
        }
 else         if (a.equals(SERVER_LOG_FILE_PROPERTY)) {
          if (!val.equals(serverLogFileDetail)) {
            PropertyChangeEvent pce=new PropertyChangeEvent(this,a,serverLogFileDetail,val);
            UnprocessedChangeEvents ucel=new UnprocessedChangeEvents(new UnprocessedChangeEvent(pce,"String_Node_Str"));
            List<UnprocessedChangeEvents> b=new ArrayList();
            b.add(ucel);
            ucl.unprocessedTransactedEvents(b);
          }
        }
 else         if (a.equals(HANDLER_PROPERTY)) {
          if (!val.equals(handlerDetail)) {
            generateAttributeChangeEvent(HANDLER_PROPERTY,handlerDetail,props);
          }
        }
 else         if (a.equals(CONSOLEHANDLER_FORMATTER_PROPERTY)) {
          if (!val.equals(consoleHandlerFormatterDetail)) {
            generateAttributeChangeEvent(CONSOLEHANDLER_FORMATTER_PROPERTY,consoleHandlerFormatterDetail,props);
          }
        }
 else         if (a.equals(GFFILEHANDLER_FORMATTER_PROPERTY)) {
          if (!val.equals(gffileHandlerFormatterDetail)) {
            generateAttributeChangeEvent(GFFILEHANDLER_FORMATTER_PROPERTY,gffileHandlerFormatterDetail,props);
          }
        }
 else         if (a.equals(ROTATIONTIMELIMITINMINUTES_PROPERTY)) {
          if (!val.equals(rotationOnTimeLimitInMinutesDetail)) {
            generateAttributeChangeEvent(ROTATIONTIMELIMITINMINUTES_PROPERTY,rotationOnTimeLimitInMinutesDetail,props);
          }
        }
 else         if (a.equals(FLUSHFREQUENCY_PROPERTY)) {
          if (!val.equals(flushFrequencyDetail)) {
            generateAttributeChangeEvent(FLUSHFREQUENCY_PROPERTY,flushFrequencyDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_LIMIT_PROPERTY)) {
          if (!val.equals(filterHandlerDetails)) {
            generateAttributeChangeEvent(FILEHANDLER_LIMIT_PROPERTY,filterHandlerDetails,props);
          }
        }
 else         if (a.equals(LOGTOCONSOLE_PROPERTY)) {
          if (!val.equals(logToConsoleDetail)) {
            generateAttributeChangeEvent(LOGTOCONSOLE_PROPERTY,logToConsoleDetail,props);
          }
        }
 else         if (a.equals(ROTATIONLIMITINBYTES_PROPERTY)) {
          if (!val.equals(rotationInTimeLimitInBytesDetail)) {
            generateAttributeChangeEvent(ROTATIONLIMITINBYTES_PROPERTY,rotationInTimeLimitInBytesDetail,props);
          }
        }
 else         if (a.equals(USESYSTEMLOGGING_PROPERTY)) {
          if (!val.equals(useSystemLoggingDetail)) {
            generateAttributeChangeEvent(USESYSTEMLOGGING_PROPERTY,useSystemLoggingDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_COUNT_PROPERTY)) {
          if (!val.equals(fileHandlerCountDetail)) {
            generateAttributeChangeEvent(FILEHANDLER_COUNT_PROPERTY,fileHandlerCountDetail,props);
          }
        }
 else         if (a.equals(RETAINERRORSSTATICTICS_PROPERTY)) {
          if (!val.equals(retainErrorsStaticticsDetail)) {
            generateAttributeChangeEvent(RETAINERRORSSTATICTICS_PROPERTY,retainErrorsStaticticsDetail,props);
          }
        }
 else         if (a.equals(LOG4J_VERSION_PROPERTY)) {
          if (!val.equals(log4jVersionDetail)) {
            generateAttributeChangeEvent(LOG4J_VERSION_PROPERTY,log4jVersionDetail,props);
          }
        }
 else         if (a.equals(MAXHISTORY_FILES_PROPERTY)) {
          if (!val.equals(maxHistoryFilesDetail)) {
            generateAttributeChangeEvent(MAXHISTORY_FILES_PROPERTY,maxHistoryFilesDetail,props);
          }
        }
 else         if (a.equals(ROTATIONONDATECHANGE_PROPERTY)) {
          if (!val.equals(rotationOnDateChangeDetail)) {
            generateAttributeChangeEvent(ROTATIONONDATECHANGE_PROPERTY,rotationOnDateChangeDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_PATTERN_PROPERTY)) {
          if (!val.equals(fileHandlerPatternDetail)) {
            generateAttributeChangeEvent(FILEHANDLER_PATTERN_PROPERTY,fileHandlerPatternDetail,props);
          }
        }
 else         if (a.equals(FILEHANDLER_FORMATTER_PROPERTY)) {
          if (!val.equals(fileHandlerFormatterDetail)) {
            generateAttributeChangeEvent(FILEHANDLER_FORMATTER_PROPERTY,fileHandlerFormatterDetail,props);
          }
        }
 else         if (a.equals(LOGFORMAT_DATEFORMAT_PROPERTY)) {
          if (!val.equals(logFormatDateFormatDetail)) {
            generateAttributeChangeEvent(LOGFORMAT_DATEFORMAT_PROPERTY,logFormatDateFormatDetail,props);
          }
        }
      }
      logger.log(Level.INFO,"String_Node_Str");
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
}