Program: 96067
Project: 96067
Buggy source:
public void refreshSampleInfo(String schemaName,boolean isCreateSample){
  TableUniqueName metaNameTable=getMetaNameTableForOriginalSchema(schemaName);
  TableUniqueName metaSizeTable=getMetaSizeTableForOriginalSchema(schemaName);
  List<List<Object>> result;
  try {
    clearSampleInformationFor(schemaName);
    Set<String> databases=getDatabases();
    if (databases.contains(metaNameTable.getSchemaName())) {
      Set<String> tables=getTables(metaNameTable.getSchemaName());
      if (tables != null && tables.contains(metaNameTable.getTableName())) {
        if (isCreateSample) {
          vc.getDbms().cacheTable(metaNameTable);
        }
        result=SingleRelation.from(vc,metaNameTable).select("String_Node_Str").collect();
        for (        List<Object> row : result) {
          String originalSchemaName=row.get(0).toString();
          String originalTabName=row.get(1).toString();
          String sampleSchemaName=row.get(2).toString();
          String sampleTabName=row.get(3).toString();
          String sampleType=row.get(4).toString();
          double samplingRatio=TypeCasting.toDouble(row.get(5));
          String columnNamesString=row.get(6).toString();
          List<String> columnNames=(columnNamesString.length() == 0) ? new ArrayList<String>() : Arrays.asList(columnNamesString.split("String_Node_Str"));
          TableUniqueName originalTable=TableUniqueName.uname(originalSchemaName,originalTabName);
          if (!sampleNameMeta.containsKey(originalTable)) {
            sampleNameMeta.put(originalTable,new HashMap<SampleParam,TableUniqueName>());
          }
          sampleNameMeta.get(originalTable).put(new SampleParam(vc,originalTable,sampleType,samplingRatio,columnNames),TableUniqueName.uname(sampleSchemaName,sampleTabName));
          TableUniqueName sampleTable=TableUniqueName.uname(sampleSchemaName,sampleTabName);
          if (tables.contains(sampleTabName)) {
            if (isCreateSample) {
              vc.getDbms().cacheTable(sampleTable);
            }
          }
 else {
            VerdictLogger.error(this,String.format("String_Node_Str",sampleTable));
          }
        }
      }
    }
    if (databases.contains(metaSizeTable.getSchemaName())) {
      Set<String> tables=getTables(metaSizeTable.getSchemaName());
      if (tables != null && tables.contains(metaSizeTable.getTableName())) {
        if (isCreateSample) {
          vc.getDbms().cacheTable(metaSizeTable);
        }
        result=SingleRelation.from(vc,metaSizeTable).select("String_Node_Str").collect();
        for (        List<Object> row : result) {
          String sampleSchemaName=row.get(0).toString();
          String sampleTabName=row.get(1).toString();
          Long sampleSize=TypeCasting.toLong(row.get(2));
          Long originalTableSize=TypeCasting.toLong(row.get(3));
          sampleSizeMeta.put(TableUniqueName.uname(sampleSchemaName,sampleTabName),new SampleSizeInfo(sampleSize,originalTableSize));
        }
      }
    }
  }
 catch (  VerdictException e) {
    VerdictLogger.error(this,e.getMessage());
  }
  uptodateSchemas.put(schemaName,vc.getCurrentQid());
  VerdictLogger.info(this,"String_Node_Str");
}

Fixed version (ground truth):
public void refreshSampleInfo(String schemaName,boolean isCreateSample){
  TableUniqueName metaNameTable=getMetaNameTableForOriginalSchema(schemaName);
  TableUniqueName metaSizeTable=getMetaSizeTableForOriginalSchema(schemaName);
  Map<TableUniqueName,TableUniqueName> sampleToOriginalTable=new HashMap<>();
  List<List<Object>> result;
  try {
    clearSampleInformationFor(schemaName);
    Set<String> databases=getDatabases();
    if (databases.contains(metaNameTable.getSchemaName())) {
      Set<String> tables=getTables(metaNameTable.getSchemaName());
      if (tables != null && tables.contains(metaNameTable.getTableName())) {
        if (isCreateSample) {
          vc.getDbms().cacheTable(metaNameTable);
        }
        result=SingleRelation.from(vc,metaNameTable).select("String_Node_Str").collect();
        for (        List<Object> row : result) {
          String originalSchemaName=row.get(0).toString();
          String originalTabName=row.get(1).toString();
          String sampleSchemaName=row.get(2).toString();
          String sampleTabName=row.get(3).toString();
          String sampleType=row.get(4).toString();
          double samplingRatio=TypeCasting.toDouble(row.get(5));
          String columnNamesString=row.get(6).toString();
          List<String> columnNames=(columnNamesString.length() == 0) ? new ArrayList<String>() : Arrays.asList(columnNamesString.split("String_Node_Str"));
          TableUniqueName originalTable=TableUniqueName.uname(originalSchemaName,originalTabName);
          if (!sampleNameMeta.containsKey(originalTable)) {
            sampleNameMeta.put(originalTable,new HashMap<SampleParam,TableUniqueName>());
          }
          sampleNameMeta.get(originalTable).put(new SampleParam(vc,originalTable,sampleType,samplingRatio,columnNames),TableUniqueName.uname(sampleSchemaName,sampleTabName));
          TableUniqueName sampleTable=TableUniqueName.uname(sampleSchemaName,sampleTabName);
          sampleToOriginalTable.put(sampleTable,originalTable);
          if (tables.contains(sampleTabName)) {
            if (isCreateSample) {
              vc.getDbms().cacheTable(sampleTable);
            }
          }
 else {
            VerdictLogger.error(this,String.format("String_Node_Str",sampleTable));
          }
        }
      }
    }
    if (databases.contains(metaSizeTable.getSchemaName())) {
      Set<String> tables=getTables(metaSizeTable.getSchemaName());
      if (tables != null && tables.contains(metaSizeTable.getTableName())) {
        if (isCreateSample) {
          vc.getDbms().cacheTable(metaSizeTable);
        }
        result=SingleRelation.from(vc,metaSizeTable).select("String_Node_Str").collect();
        for (        List<Object> row : result) {
          String sampleSchemaName=row.get(0).toString();
          String sampleTabName=row.get(1).toString();
          Long sampleSize=TypeCasting.toLong(row.get(2));
          Long originalTableSize=TypeCasting.toLong(row.get(3));
          TableUniqueName sampleTable=TableUniqueName.uname(sampleSchemaName,sampleTabName);
          sampleSizeMeta.put(sampleTable,new SampleSizeInfo(sampleToOriginalTable.get(sampleTable),sampleSize,originalTableSize));
        }
      }
    }
  }
 catch (  VerdictException e) {
    VerdictLogger.error(this,e.getMessage());
  }
  uptodateSchemas.put(schemaName,vc.getCurrentQid());
  VerdictLogger.info(this,"String_Node_Str");
}