Program: 85531
Project: 85531
Buggy source:
@Override public List<MatchMetaData> discover(IDBFactory factory,Properties dataDiscoveryProperties,Set<String> tables) throws AnonymizerException {
  log.info("String_Node_Str");
  double probabilityThreshold=parseDouble(dataDiscoveryProperties.getProperty("String_Node_Str"));
  IMetaData metaData=factory.fetchMetaData();
  List<MatchMetaData> map=metaData.getMetaData();
  InputStream modelInToken=null;
  InputStream modelIn=null;
  TokenizerModel modelToken=null;
  Tokenizer tokenizer=null;
  TokenNameFinderModel model=null;
  NameFinderME nameFinder=null;
  try {
    modelInToken=new FileInputStream(dataDiscoveryProperties.getProperty("String_Node_Str"));
    modelIn=new FileInputStream(dataDiscoveryProperties.getProperty("String_Node_Str"));
    modelToken=new TokenizerModel(modelInToken);
    tokenizer=new TokenizerME(modelToken);
    model=new TokenNameFinderModel(modelIn);
    nameFinder=new NameFinderME(model);
    modelInToken.close();
    modelIn.close();
  }
 catch (  FileNotFoundException ex) {
    log.error(ex.toString());
    try {
      if (modelInToken != null) {
        modelInToken.close();
      }
      if (modelIn != null) {
        modelIn.close();
      }
    }
 catch (    IOException ioe) {
      log.error(ioe.toString());
    }
  }
catch (  IOException ex) {
    log.error(ex.toString());
  }
  ISQLBuilder sqlBuilder=factory.createSQLBuilder();
  log.info("String_Node_Str");
  log.info(String.format("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  DecimalFormat decimalFormat=new DecimalFormat("String_Node_Str");
  matches=new ArrayList<>();
  for (  MatchMetaData data : map) {
    if (SQLToJavaMapping.isString(data.getColumnType())) {
      String tableName=data.getTableName();
      String columnName=data.getColumnName();
      List<Double> probabilityList=new ArrayList<>();
      if (!tables.isEmpty() && !tables.contains(tableName.toLowerCase())) {
        continue;
      }
      String tableNamePattern=dataDiscoveryProperties.getProperty("String_Node_Str");
      if (!CommonUtils.isEmptyString(tableNamePattern)) {
        Pattern p=compile(tableNamePattern);
        if (!p.matcher(tableName).matches()) {
          continue;
        }
      }
      String table=sqlBuilder.prefixSchema(tableName);
      int limit=Integer.parseInt(dataDiscoveryProperties.getProperty("String_Node_Str"));
      String query=sqlBuilder.buildSelectWithLimit("String_Node_Str" + columnName + "String_Node_Str"+ table+ "String_Node_Str"+ columnName+ "String_Node_Str",limit);
      try (Statement stmt=factory.getConnection().createStatement();ResultSet resultSet=stmt.executeQuery(query)){
        while (resultSet.next()) {
          String sentence=resultSet.getString(1);
          if (sentence != null && !sentence.isEmpty()) {
            String tokens[]=tokenizer.tokenize(sentence);
            Span nameSpans[]=nameFinder.find(tokens);
            double[] spanProbs=nameFinder.probs(nameSpans);
            for (int i=0; i < nameSpans.length; i++) {
              probabilityList.add(spanProbs[i]);
            }
          }
        }
      }
 catch (      SQLException sqle) {
        log.error(sqle.toString());
      }
      double averageProbability=calculateAverage(probabilityList);
      if ((averageProbability >= probabilityThreshold) && (averageProbability <= 0.99)) {
        String probability=decimalFormat.format(averageProbability);
        String result=String.format("String_Node_Str",tableName,columnName,probability);
        log.info(result);
        matches.add(data);
      }
    }
  }
  return matches;
}

Fixed version (ground truth):
@Override public List<MatchMetaData> discover(IDBFactory factory,Properties dataDiscoveryProperties,Set<String> tables) throws AnonymizerException {
  log.info("String_Node_Str");
  double probabilityThreshold=parseDouble(dataDiscoveryProperties.getProperty("String_Node_Str"));
  IMetaData metaData=factory.fetchMetaData();
  List<MatchMetaData> map=metaData.getMetaData();
  InputStream modelInToken=null;
  InputStream modelIn=null;
  TokenizerModel modelToken=null;
  Tokenizer tokenizer=null;
  TokenNameFinderModel model=null;
  NameFinderME nameFinder=null;
  try {
    modelInToken=new FileInputStream(dataDiscoveryProperties.getProperty("String_Node_Str"));
    modelIn=new FileInputStream(dataDiscoveryProperties.getProperty("String_Node_Str"));
    modelToken=new TokenizerModel(modelInToken);
    tokenizer=new TokenizerME(modelToken);
    model=new TokenNameFinderModel(modelIn);
    nameFinder=new NameFinderME(model);
    modelInToken.close();
    modelIn.close();
  }
 catch (  FileNotFoundException ex) {
    log.error(ex.toString());
    try {
      if (modelInToken != null) {
        modelInToken.close();
      }
      if (modelIn != null) {
        modelIn.close();
      }
    }
 catch (    IOException ioe) {
      log.error(ioe.toString());
    }
  }
catch (  IOException ex) {
    log.error(ex.toString());
  }
  ISQLBuilder sqlBuilder=factory.createSQLBuilder();
  log.info("String_Node_Str");
  log.info(String.format("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  DecimalFormat decimalFormat=new DecimalFormat("String_Node_Str");
  matches=new ArrayList<>();
  for (  MatchMetaData data : map) {
    if (SQLToJavaMapping.isString(data.getColumnType())) {
      String tableName=data.getTableName();
      String columnName=data.getColumnName();
      List<Double> probabilityList=new ArrayList<>();
      log.debug("String_Node_Str" + tableName + "String_Node_Str");
      if (!tables.isEmpty() && !tables.contains(tableName.toLowerCase())) {
        log.debug("String_Node_Str");
        continue;
      }
      String tableNamePattern=dataDiscoveryProperties.getProperty("String_Node_Str");
      if (!CommonUtils.isEmptyString(tableNamePattern)) {
        Pattern p=compile(tableNamePattern);
        if (!p.matcher(tableName).matches()) {
          continue;
        }
      }
      String table=sqlBuilder.prefixSchema(tableName);
      int limit=Integer.parseInt(dataDiscoveryProperties.getProperty("String_Node_Str"));
      String query=sqlBuilder.buildSelectWithLimit("String_Node_Str" + columnName + "String_Node_Str"+ table+ "String_Node_Str"+ columnName+ "String_Node_Str",limit);
      log.debug("String_Node_Str" + query);
      try (Statement stmt=factory.getConnection().createStatement();ResultSet resultSet=stmt.executeQuery(query)){
        while (resultSet.next()) {
          String sentence=resultSet.getString(1);
          if (sentence != null && !sentence.isEmpty()) {
            String tokens[]=tokenizer.tokenize(sentence);
            Span nameSpans[]=nameFinder.find(tokens);
            double[] spanProbs=nameFinder.probs(nameSpans);
            for (int i=0; i < nameSpans.length; i++) {
              probabilityList.add(spanProbs[i]);
            }
          }
        }
      }
 catch (      SQLException sqle) {
        log.error(sqle.toString());
      }
      double averageProbability=calculateAverage(probabilityList);
      if ((averageProbability >= probabilityThreshold) && (averageProbability <= 0.99)) {
        String probability=decimalFormat.format(averageProbability);
        String result=String.format("String_Node_Str",tableName,columnName,probability);
        log.info(result);
        matches.add(data);
      }
    }
  }
  return matches;
}