Program: 31914
Project: 31914
Buggy source:
/** 
 * For RF/GBT model, no need do normalizing, but clean and filter data is needed. Before real training, we have to clean and filter data.
 */
private void checkAndCleanDataForTreeModels() throws IOException {
  String alg=super.getModelConfig().getTrain().getAlgorithm();
  if (!CommonUtils.isDesicionTreeAlgorithm(alg)) {
    return;
  }
  for (  ColumnConfig columnConfig : columnConfigList) {
    if (columnConfig.isFinalSelect() && !columnConfig.isTarget() && !columnConfig.isMeta()) {
      if (columnConfig.isNumerical() && columnConfig.getBinBoundary() == null) {
        throw new IllegalArgumentException("String_Node_Str" + columnConfig.getColumnName() + "String_Node_Str");
      }
      if (columnConfig.isNumerical() && columnConfig.getBinBoundary().size() <= 1) {
        LOG.warn("String_Node_Str");
      }
      if (columnConfig.isCategorical() && columnConfig.getBinCategory() == null) {
        throw new IllegalArgumentException("String_Node_Str" + columnConfig.getColumnName() + "String_Node_Str");
      }
      if (columnConfig.isCategorical() && columnConfig.getBinCategory().size() <= 0) {
        LOG.warn("String_Node_Str");
      }
    }
  }
  SourceType sourceType=modelConfig.getDataSet().getSource();
  String cleanedDataPath=super.pathFinder.getCleanedDataPath();
  String needReGen=Environment.getProperty("String_Node_Str",Boolean.FALSE.toString());
  if (Boolean.TRUE.toString().equalsIgnoreCase(needReGen) || !ShifuFileUtils.isFileExists(cleanedDataPath,sourceType) || (StringUtils.isNotBlank(modelConfig.getValidationDataSetRawPath()) && !ShifuFileUtils.isFileExists(pathFinder.getCleanedValidationDataPath(),sourceType))) {
    LOG.info("String_Node_Str");
    if (ShifuFileUtils.isFileExists(cleanedDataPath,sourceType)) {
      ShifuFileUtils.deleteFile(cleanedDataPath,sourceType);
    }
    String cleandedValidationDataPath=pathFinder.getCleanedValidationDataPath();
    if (ShifuFileUtils.isFileExists(cleandedValidationDataPath,sourceType)) {
      ShifuFileUtils.deleteFile(cleandedValidationDataPath,sourceType);
    }
    Map<String,String> paramsMap=new HashMap<String,String>();
    paramsMap.put("String_Node_Str",modelConfig.getNormalizeSampleRate().toString());
    paramsMap.put("String_Node_Str",((Boolean)modelConfig.isNormalizeSampleNegOnly()).toString());
    paramsMap.put("String_Node_Str",CommonUtils.escapePigString(modelConfig.getDataSetDelimiter()));
    try {
      String normPigPath=pathFinder.getScriptPath("String_Node_Str");
      paramsMap.put(Constants.IS_COMPRESS,"String_Node_Str");
      paramsMap.put(Constants.IS_NORM_FOR_CLEAN,"String_Node_Str");
      paramsMap.put(Constants.PATH_NORMALIZED_DATA,pathFinder.getCleanedDataPath());
      PigExecutor.getExecutor().submitJob(modelConfig,normPigPath,paramsMap,sourceType,super.pathFinder);
      if (StringUtils.isNotBlank(modelConfig.getValidationDataSetRawPath())) {
        paramsMap.put(Constants.IS_COMPRESS,"String_Node_Str");
        paramsMap.put(Constants.PATH_RAW_DATA,modelConfig.getValidationDataSetRawPath());
        paramsMap.put(Constants.PATH_NORMALIZED_DATA,pathFinder.getCleanedValidationDataPath());
        PigExecutor.getExecutor().submitJob(modelConfig,normPigPath,paramsMap,sourceType,super.pathFinder);
      }
    }
 catch (    IOException e) {
      throw new ShifuException(ShifuErrorCode.ERROR_RUNNING_PIG_JOB,e);
    }
catch (    Throwable e) {
      throw new RuntimeException(e);
    }
    LOG.info("String_Node_Str");
  }
 else {
    LOG.warn("String_Node_Str",cleanedDataPath);
    LOG.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * For RF/GBT model, no need do normalizing, but clean and filter data is needed. Before real training, we have to clean and filter data.
 */
private void checkAndCleanDataForTreeModels() throws IOException {
  String alg=super.getModelConfig().getTrain().getAlgorithm();
  if (!CommonUtils.isDesicionTreeAlgorithm(alg)) {
    return;
  }
  for (  ColumnConfig columnConfig : columnConfigList) {
    if (columnConfig.isFinalSelect() && !columnConfig.isTarget() && !columnConfig.isMeta()) {
      if (columnConfig.isNumerical() && columnConfig.getBinBoundary() == null) {
        throw new IllegalArgumentException("String_Node_Str" + columnConfig.getColumnName() + "String_Node_Str");
      }
      if (columnConfig.isNumerical() && columnConfig.getBinBoundary().size() <= 1) {
        LOG.warn("String_Node_Str",columnConfig.getColumnNum(),columnConfig.getColumnName());
      }
      if (columnConfig.isCategorical() && columnConfig.getBinCategory() == null) {
        throw new IllegalArgumentException("String_Node_Str" + columnConfig.getColumnName() + "String_Node_Str");
      }
      if (columnConfig.isCategorical() && columnConfig.getBinCategory().size() <= 0) {
        LOG.warn("String_Node_Str",columnConfig.getColumnNum(),columnConfig.getColumnName());
      }
    }
  }
  SourceType sourceType=modelConfig.getDataSet().getSource();
  String cleanedDataPath=super.pathFinder.getCleanedDataPath();
  String needReGen=Environment.getProperty("String_Node_Str",Boolean.FALSE.toString());
  if (Boolean.TRUE.toString().equalsIgnoreCase(needReGen) || !ShifuFileUtils.isFileExists(cleanedDataPath,sourceType) || (StringUtils.isNotBlank(modelConfig.getValidationDataSetRawPath()) && !ShifuFileUtils.isFileExists(pathFinder.getCleanedValidationDataPath(),sourceType))) {
    LOG.info("String_Node_Str");
    if (ShifuFileUtils.isFileExists(cleanedDataPath,sourceType)) {
      ShifuFileUtils.deleteFile(cleanedDataPath,sourceType);
    }
    String cleandedValidationDataPath=pathFinder.getCleanedValidationDataPath();
    if (ShifuFileUtils.isFileExists(cleandedValidationDataPath,sourceType)) {
      ShifuFileUtils.deleteFile(cleandedValidationDataPath,sourceType);
    }
    Map<String,String> paramsMap=new HashMap<String,String>();
    paramsMap.put("String_Node_Str",modelConfig.getNormalizeSampleRate().toString());
    paramsMap.put("String_Node_Str",((Boolean)modelConfig.isNormalizeSampleNegOnly()).toString());
    paramsMap.put("String_Node_Str",CommonUtils.escapePigString(modelConfig.getDataSetDelimiter()));
    try {
      String normPigPath=pathFinder.getScriptPath("String_Node_Str");
      paramsMap.put(Constants.IS_COMPRESS,"String_Node_Str");
      paramsMap.put(Constants.IS_NORM_FOR_CLEAN,"String_Node_Str");
      paramsMap.put(Constants.PATH_NORMALIZED_DATA,pathFinder.getCleanedDataPath());
      PigExecutor.getExecutor().submitJob(modelConfig,normPigPath,paramsMap,sourceType,super.pathFinder);
      if (StringUtils.isNotBlank(modelConfig.getValidationDataSetRawPath())) {
        paramsMap.put(Constants.IS_COMPRESS,"String_Node_Str");
        paramsMap.put(Constants.PATH_RAW_DATA,modelConfig.getValidationDataSetRawPath());
        paramsMap.put(Constants.PATH_NORMALIZED_DATA,pathFinder.getCleanedValidationDataPath());
        PigExecutor.getExecutor().submitJob(modelConfig,normPigPath,paramsMap,sourceType,super.pathFinder);
      }
    }
 catch (    IOException e) {
      throw new ShifuException(ShifuErrorCode.ERROR_RUNNING_PIG_JOB,e);
    }
catch (    Throwable e) {
      throw new RuntimeException(e);
    }
    LOG.info("String_Node_Str");
  }
 else {
    LOG.warn("String_Node_Str",cleanedDataPath);
    LOG.warn("String_Node_Str");
  }
}