Program: 7242
Project: 7242
Buggy source:
/** 
 * Disable exploration on the given dataset by dropping the Hive table for the dataset.
 * @param datasetID the ID of the dataset to disable
 * @param spec the specification for the dataset to disable
 * @return the query handle for disabling the dataset
 * @throws ExploreException if there was an exception dropping the table
 * @throws SQLException if there was a problem with the drop table statement
 */
public QueryHandle disableDataset(Id.DatasetInstance datasetID,DatasetSpecification spec) throws ExploreException, SQLException {
  LOG.debug("String_Node_Str",datasetID);
  String tableName=getDatasetTableName(datasetID);
  try {
    exploreService.getTableInfo(datasetID.getNamespaceId(),tableName);
  }
 catch (  TableNotFoundException e) {
    return QueryHandle.NO_OP;
  }
  String deleteStatement=null;
  String datasetType=spec.getType();
  if (ObjectMappedTableModule.FULL_NAME.equals(datasetType) || ObjectMappedTableModule.SHORT_NAME.equals(datasetType)) {
    deleteStatement=generateDeleteStatement(tableName);
    LOG.debug("String_Node_Str",datasetID,deleteStatement);
    return exploreService.execute(datasetID.getNamespace(),deleteStatement);
  }
  Dataset dataset;
  try {
    dataset=instantiateDataset(datasetID);
    if (dataset == null) {
      return QueryHandle.NO_OP;
    }
  }
 catch (  Exception e) {
    throw new ExploreException("String_Node_Str" + datasetID,e);
  }
  if (dataset instanceof RecordScannable || dataset instanceof RecordWritable) {
    deleteStatement=generateDeleteStatement(tableName);
  }
 else   if (dataset instanceof FileSet || dataset instanceof PartitionedFileSet) {
    Map<String,String> properties=spec.getProperties();
    if (FileSetProperties.isExploreEnabled(properties)) {
      deleteStatement=generateDeleteStatement(tableName);
    }
  }
  if (deleteStatement != null) {
    LOG.debug("String_Node_Str",datasetID,deleteStatement);
    return exploreService.execute(datasetID.getNamespace(),deleteStatement);
  }
 else {
    return QueryHandle.NO_OP;
  }
}

Fixed version (ground truth):
/** 
 * Disable exploration on the given dataset by dropping the Hive table for the dataset.
 * @param datasetID the ID of the dataset to disable
 * @param spec the specification for the dataset to disable
 * @return the query handle for disabling the dataset
 * @throws ExploreException if there was an exception dropping the table
 * @throws SQLException if there was a problem with the drop table statement
 * @throws DatasetNotFoundException if the dataset had to be instantiated, but could not be found
 */
public QueryHandle disableDataset(Id.DatasetInstance datasetID,DatasetSpecification spec) throws ExploreException, SQLException, DatasetNotFoundException {
  LOG.debug("String_Node_Str",datasetID);
  String tableName=getDatasetTableName(datasetID);
  try {
    exploreService.getTableInfo(datasetID.getNamespaceId(),tableName);
  }
 catch (  TableNotFoundException e) {
    return QueryHandle.NO_OP;
  }
  String deleteStatement=null;
  String datasetType=spec.getType();
  if (ObjectMappedTableModule.FULL_NAME.equals(datasetType) || ObjectMappedTableModule.SHORT_NAME.equals(datasetType)) {
    deleteStatement=generateDeleteStatement(tableName);
    LOG.debug("String_Node_Str",datasetID,deleteStatement);
    return exploreService.execute(datasetID.getNamespace(),deleteStatement);
  }
  Dataset dataset=ExploreServiceUtils.instantiateDataset(datasetFramework,datasetID);
  if (dataset instanceof RecordScannable || dataset instanceof RecordWritable) {
    deleteStatement=generateDeleteStatement(tableName);
  }
 else   if (dataset instanceof FileSet || dataset instanceof PartitionedFileSet) {
    Map<String,String> properties=spec.getProperties();
    if (FileSetProperties.isExploreEnabled(properties)) {
      deleteStatement=generateDeleteStatement(tableName);
    }
  }
  if (deleteStatement != null) {
    LOG.debug("String_Node_Str",datasetID,deleteStatement);
    return exploreService.execute(datasetID.getNamespace(),deleteStatement);
  }
 else {
    return QueryHandle.NO_OP;
  }
}