Program: 63340
Project: 63340
Buggy source:
private static String sampleFactTable(String factTableName,int sampleRatio) throws IOException, JobException {
  String sampleTableName=factTableName + "String_Node_Str" + sampleRatio;
  String settingQueries="String_Node_Str";
  String dropQuery="String_Node_Str" + sampleTableName + "String_Node_Str";
  String createQuery="String_Node_Str" + sampleTableName + "String_Node_Str"+ factTableName+ "String_Node_Str";
  HiveSourceTableMgmt hstm=new HiveSourceTableMgmt();
  File dir=File.createTempFile("String_Node_Str",null);
  dir.delete();
  dir.mkdir();
  logger.info("String_Node_Str" + factTableName + "String_Node_Str"+ dir.getAbsolutePath());
  hstm.extractTableDescWithTablePattern(factTableName,dir.getAbsolutePath());
  String factTableExdFilePath=dir.getAbsolutePath() + File.separator + HiveSourceTableMgmt.TABLE_EXD_FOLDER_NAME+ File.separator+ factTableName.toUpperCase()+ "String_Node_Str"+ HiveSourceTableMgmt.OUTPUT_SURFIX;
  logger.info("String_Node_Str" + factTableExdFilePath);
  InputStream is=new FileInputStream(factTableExdFilePath);
  @SuppressWarnings("String_Node_Str") Map<String,String> attrs=JsonUtil.readValue(is,HashMap.class);
  is.close();
  String partitionClause=getPartitionClause(attrs);
  String insertQuery="String_Node_Str" + sampleTableName + "String_Node_Str"+ partitionClause+ "String_Node_Str"+ factTableName+ "String_Node_Str"+ sampleRatio+ "String_Node_Str";
  String query=settingQueries + dropQuery + createQuery+ insertQuery;
  logger.info("String_Node_Str" + query);
  is=HiveSourceTableMgmt.executeHiveCommand(query);
  InputStreamReader reader=new InputStreamReader(is);
  BufferedReader bufferedReader=new BufferedReader(reader);
  String line=null;
  while ((line=bufferedReader.readLine()) != null) {
    logger.info(line);
  }
  logger.info("String_Node_Str");
  is.close();
  return sampleTableName;
}

Fixed version (ground truth):
private static String sampleFactTable(String factTableName,int sampleRatio) throws IOException, JobException {
  String sampleTableName=factTableName + "String_Node_Str" + sampleRatio;
  String settingQueries="String_Node_Str";
  String dropQuery="String_Node_Str" + sampleTableName + "String_Node_Str";
  String createQuery="String_Node_Str" + sampleTableName + "String_Node_Str"+ factTableName+ "String_Node_Str";
  HiveSourceTableMgmt hstm=new HiveSourceTableMgmt();
  File dir=File.createTempFile("String_Node_Str",null);
  dir.delete();
  dir.mkdir();
  logger.info("String_Node_Str" + factTableName + "String_Node_Str"+ dir.getAbsolutePath());
  hstm.extractTableDescWithTablePattern(factTableName,dir.getAbsolutePath());
  String factTableExdFilePath=dir.getAbsolutePath() + File.separator + HiveSourceTableMgmt.TABLE_EXD_FOLDER_NAME+ File.separator+ factTableName.toUpperCase()+ "String_Node_Str"+ HiveSourceTableMgmt.OUTPUT_SURFIX;
  logger.info("String_Node_Str" + factTableExdFilePath);
  InputStream is=new FileInputStream(factTableExdFilePath);
  @SuppressWarnings("String_Node_Str") Map<String,String> attrs=JsonUtil.readValue(is,HashMap.class);
  is.close();
  String partitionClause=getPartitionClause(attrs);
  String insertQuery="String_Node_Str" + sampleTableName + "String_Node_Str"+ partitionClause+ "String_Node_Str"+ factTableName+ "String_Node_Str"+ sampleRatio+ "String_Node_Str";
  String query=settingQueries + dropQuery + createQuery+ insertQuery;
  logger.info("String_Node_Str" + query);
  is=HiveSourceTableMgmt.executeHiveCommand(query);
  InputStreamReader reader=new InputStreamReader(is);
  BufferedReader bufferedReader=new BufferedReader(reader);
  String line=null;
  while ((line=bufferedReader.readLine()) != null) {
    logger.info(line);
  }
  logger.info("String_Node_Str");
  bufferedReader.close();
  return sampleTableName;
}