Program: 31915
Project: 31915
Buggy source:
private void postProcess4SEVarSelect(SourceType source,String varSelectMSEOutputPath) throws IOException {
  String outputFilePattern=varSelectMSEOutputPath + Path.SEPARATOR + "String_Node_Str";
  if (!ShifuFileUtils.isFileExists(outputFilePattern,source)) {
    throw new RuntimeException("String_Node_Str");
  }
  int selectCnt=0;
  for (  ColumnConfig config : super.columnConfigList) {
    if (config.isFinalSelect()) {
      config.setFinalSelect(false);
    }
    if (config.isForceSelect()) {
      config.setFinalSelect(true);
      selectCnt++;
      log.info("String_Node_Str",config.getColumnName());
    }
  }
  List<Scanner> scanners=null;
  try {
    FileStatus[] globStatus=ShifuFileUtils.getFileSystemBySourceType(source).globStatus(new Path(outputFilePattern));
    if (globStatus == null || globStatus.length == 0) {
      throw new RuntimeException("String_Node_Str");
    }
    scanners=ShifuFileUtils.getDataScanners(globStatus[0].getPath().toString(),source);
    String str=null;
    int targetCnt=0;
    List<Integer> candidateColumnIdList=new ArrayList<Integer>();
    Scanner scanner=scanners.get(0);
    while (scanner.hasNext()) {
      ++targetCnt;
      str=scanner.nextLine().trim();
      candidateColumnIdList.add(Integer.parseInt(str));
    }
    int i=0;
    while (selectCnt < targetCnt && i < targetCnt) {
      Integer columnId=candidateColumnIdList.get(i++);
      ColumnConfig columnConfig=this.columnConfigList.get(columnId);
      if (!columnConfig.isForceSelect() && !columnConfig.isForceRemove()) {
        columnConfig.setFinalSelect(true);
        selectCnt++;
        log.info("String_Node_Str",columnConfig.getColumnName());
      }
    }
    log.info("String_Node_Str",selectCnt);
    log.info("String_Node_Str",varSelectMSEOutputPath,Constants.SHIFU_VARSELECT_SE_OUTPUT_NAME);
  }
  finally {
    if (scanners != null) {
      for (      Scanner scanner : scanners) {
        if (scanner != null) {
          scanner.close();
        }
      }
    }
  }
}

Fixed version (ground truth):
private void postProcess4SEVarSelect(SourceType source,String varSelectMSEOutputPath) throws IOException {
  String outputFilePattern=varSelectMSEOutputPath + Path.SEPARATOR + "String_Node_Str";
  if (!ShifuFileUtils.isFileExists(outputFilePattern,source)) {
    throw new RuntimeException("String_Node_Str");
  }
  int selectCnt=0;
  for (  ColumnConfig config : super.columnConfigList) {
    if (config.isFinalSelect()) {
      config.setFinalSelect(false);
    }
    if (config.isForceSelect()) {
      config.setFinalSelect(true);
      selectCnt++;
      log.info("String_Node_Str",config.getColumnName());
    }
  }
  List<Scanner> scanners=null;
  try {
    FileStatus[] globStatus=ShifuFileUtils.getFileSystemBySourceType(source).globStatus(new Path(outputFilePattern));
    if (globStatus == null || globStatus.length == 0) {
      throw new RuntimeException("String_Node_Str");
    }
    scanners=ShifuFileUtils.getDataScanners(globStatus[0].getPath().toString(),source);
    String str=null;
    int targetCnt=0;
    List<Integer> candidateColumnIdList=new ArrayList<Integer>();
    Scanner scanner=scanners.get(0);
    while (scanner.hasNext()) {
      ++targetCnt;
      str=scanner.nextLine().trim();
      candidateColumnIdList.add(Integer.parseInt(str));
    }
    int i=0;
    int candidateCount=candidateColumnIdList.size();
    while (selectCnt < targetCnt && i < targetCnt) {
      if (i >= candidateCount) {
        log.warn("String_Node_Str",candidateCount,targetCnt);
        break;
      }
      Integer columnId=candidateColumnIdList.get(i++);
      ColumnConfig columnConfig=this.columnConfigList.get(columnId);
      if (!columnConfig.isForceSelect() && !columnConfig.isForceRemove()) {
        columnConfig.setFinalSelect(true);
        selectCnt++;
        log.info("String_Node_Str",columnConfig.getColumnName());
      }
    }
    log.info("String_Node_Str",selectCnt);
    log.info("String_Node_Str",varSelectMSEOutputPath,Constants.SHIFU_VARSELECT_SE_OUTPUT_NAME);
  }
  finally {
    if (scanners != null) {
      for (      Scanner scanner : scanners) {
        if (scanner != null) {
          scanner.close();
        }
      }
    }
  }
}