Program: 85534
Project: 85534
Buggy source:
@Override public void discover(Properties databaseProperties,Properties dataDiscoveryProperties,Collection<String> tables) throws AnonymizerException {
  log.info("String_Node_Str");
  double probabilityThreshold=parseDouble(dataDiscoveryProperties.getProperty("String_Node_Str"));
  IMetaData metaData=MetaDataFactory.fetchMetaData(databaseProperties);
  List<ColumnMetaData> map=metaData.getMetaData();
  InputStream modelInToken=null;
  InputStream modelIn=null;
  TokenizerModel modelToken=null;
  Tokenizer tokenizer=null;
  TokenNameFinderModel model=null;
  NameFinderME nameFinder=null;
  try {
    firstAndLastNames=CommonUtils.readStreamOfLines(dataDiscoveryProperties.getProperty("String_Node_Str"));
    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());
  }
  IDBConnection dbConnection=DBConnectionFactory.createDBConnection(databaseProperties);
  Connection connection=dbConnection.connect(databaseProperties);
  String schema=databaseProperties.getProperty("String_Node_Str");
  log.info("String_Node_Str");
  Formatter formatter=new Formatter();
  log.info(formatter.format("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  for (  ColumnMetaData pair : map) {
    if (SQLToJavaMapping.isString(pair.getColumnType())) {
      String tableName=pair.getTableName();
      String columnName=pair.getColumnName();
      List<Double> probabilityList=new ArrayList<>();
      if (!tables.isEmpty() && !tables.contains(tableName.toLowerCase())) {
        continue;
      }
      Statement stmt=null;
      ResultSet resultSet=null;
      try {
        stmt=connection.createStatement();
        String table=tableName;
        if (schema != null && !schema.equals("String_Node_Str")) {
          table=schema + "String_Node_Str" + tableName;
        }
        int limit=Integer.parseInt(dataDiscoveryProperties.getProperty("String_Node_Str"));
        ISQLBuilder sqlBuilder=SQLBuilderFactory.createSQLBuilder(databaseProperties);
        String query=sqlBuilder.buildSelectWithLimit("String_Node_Str" + columnName + "String_Node_Str"+ table+ "String_Node_Str"+ columnName+ "String_Node_Str",limit);
        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]);
            }
            if (firstAndLastNames.contains(sentence.toUpperCase())) {
              probabilityList.add(0.95);
            }
          }
        }
        resultSet.close();
        stmt.close();
      }
 catch (      SQLException sqle) {
        try {
          if (stmt != null) {
            stmt.close();
          }
          if (resultSet != null) {
            resultSet.close();
          }
        }
 catch (        SQLException sql) {
          log.error(sql.toString());
        }
        log.error(sqle.toString());
      }
      double averageProbability=calculateAverage(probabilityList);
      if ((averageProbability >= probabilityThreshold) && (averageProbability <= 0.99)) {
        formatter=new Formatter();
        log.info(formatter.format("String_Node_Str",tableName,columnName,averageProbability));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void discover(Properties databaseProperties,Properties dataDiscoveryProperties,Collection<String> tables) throws AnonymizerException {
  log.info("String_Node_Str");
  double probabilityThreshold=parseDouble(dataDiscoveryProperties.getProperty("String_Node_Str"));
  IMetaData metaData=MetaDataFactory.fetchMetaData(databaseProperties);
  List<ColumnMetaData> map=metaData.getMetaData();
  InputStream modelInToken=null;
  InputStream modelIn=null;
  TokenizerModel modelToken=null;
  Tokenizer tokenizer=null;
  TokenNameFinderModel model=null;
  NameFinderME nameFinder=null;
  try {
    firstAndLastNames=CommonUtils.readStreamOfLines(dataDiscoveryProperties.getProperty("String_Node_Str"));
    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());
  }
  IDBConnection dbConnection=DBConnectionFactory.createDBConnection(databaseProperties);
  Connection connection=dbConnection.connect(databaseProperties);
  String schema=databaseProperties.getProperty("String_Node_Str");
  log.info("String_Node_Str");
  Formatter formatter=new Formatter();
  log.info(formatter.format("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  for (  ColumnMetaData pair : map) {
    if (SQLToJavaMapping.isString(pair.getColumnType())) {
      String tableName=pair.getTableName();
      String columnName=pair.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;
        }
      }
      Statement stmt=null;
      ResultSet resultSet=null;
      try {
        stmt=connection.createStatement();
        String table=tableName;
        if (schema != null && !schema.equals("String_Node_Str")) {
          table=schema + "String_Node_Str" + tableName;
        }
        int limit=Integer.parseInt(dataDiscoveryProperties.getProperty("String_Node_Str"));
        ISQLBuilder sqlBuilder=SQLBuilderFactory.createSQLBuilder(databaseProperties);
        String query=sqlBuilder.buildSelectWithLimit("String_Node_Str" + columnName + "String_Node_Str"+ table+ "String_Node_Str"+ columnName+ "String_Node_Str",limit);
        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]);
            }
            if (firstAndLastNames.contains(sentence.toUpperCase())) {
              probabilityList.add(0.95);
            }
          }
        }
        resultSet.close();
        stmt.close();
      }
 catch (      SQLException sqle) {
        try {
          if (stmt != null) {
            stmt.close();
          }
          if (resultSet != null) {
            resultSet.close();
          }
        }
 catch (        SQLException sql) {
          log.error(sql.toString());
        }
        log.error(sqle.toString());
      }
      double averageProbability=calculateAverage(probabilityList);
      if ((averageProbability >= probabilityThreshold) && (averageProbability <= 0.99)) {
        formatter=new Formatter();
        String probability=new DecimalFormat("String_Node_Str").format(averageProbability);
        log.info(formatter.format("String_Node_Str",tableName,columnName,probability));
      }
    }
  }
}