nus-yam/ex-repair huggingface dataset:
Program: 5579
Project: 5579
Buggy source:
private DataStreamsPipelineSpec(Set<StageSpec> stages,Set<Connection> connections,Resources resources,Resources driverResources,Resources clientResources,boolean stageLoggingEnabled,long batchIntervalMillis,String extraJavaOpts,int numOfRecordsPreview){
  super(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
  this.batchIntervalMillis=batchIntervalMillis;
  this.extraJavaOpts=extraJavaOpts;
}

Fixed version (ground truth):
private DataStreamsPipelineSpec(Set<StageSpec> stages,Set<Connection> connections,Resources resources,Resources driverResources,Resources clientResources,boolean stageLoggingEnabled,long batchIntervalMillis,String extraJavaOpts,int numOfRecordsPreview,boolean stopGracefully){
  super(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
  this.batchIntervalMillis=batchIntervalMillis;
  this.extraJavaOpts=extraJavaOpts;
  this.stopGracefully=stopGracefully;
}
Program: 5580
Project: 5580
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str"+ extraJavaOpts+ '\''+ "String_Node_Str"+ super.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str"+ extraJavaOpts+ '\''+ "String_Node_Str"+ stopGracefully+ "String_Node_Str"+ super.toString();
}
Program: 5581
Project: 5581
Buggy source:
@Override public DataStreamsPipelineSpec generateSpec(DataStreamsConfig config){
  long batchIntervalMillis;
  try {
    batchIntervalMillis=TimeParser.parseDuration(config.getBatchInterval());
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(String.format("String_Node_Str",config.getBatchInterval()));
  }
  DataStreamsPipelineSpec.Builder specBuilder=DataStreamsPipelineSpec.builder(batchIntervalMillis).setExtraJavaOpts(config.getExtraJavaOpts());
  configureStages(config,specBuilder);
  return specBuilder.build();
}

Fixed version (ground truth):
@Override public DataStreamsPipelineSpec generateSpec(DataStreamsConfig config){
  long batchIntervalMillis;
  try {
    batchIntervalMillis=TimeParser.parseDuration(config.getBatchInterval());
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(String.format("String_Node_Str",config.getBatchInterval()));
  }
  DataStreamsPipelineSpec.Builder specBuilder=DataStreamsPipelineSpec.builder(batchIntervalMillis).setExtraJavaOpts(config.getExtraJavaOpts()).setStopGracefully(config.getStopGracefully());
  configureStages(config,specBuilder);
  return specBuilder.build();
}
Program: 5582
Project: 5582
Buggy source:
public Builder(){
  this.isUnitTest=true;
  this.batchInterval="String_Node_Str";
  this.driverResources=new Resources();
}

Fixed version (ground truth):
public Builder(){
  this.isUnitTest=true;
  this.batchInterval="String_Node_Str";
  this.stopGraceFully=false;
}
Program: 5583
Project: 5583
Buggy source:
private DataStreamsConfig(Set<ETLStage> stages,Set<Connection> connections,Resources resources,Resources driverResources,Resources clientResources,boolean stageLoggingEnabled,String batchInterval,boolean isUnitTest,boolean disableCheckpoints,@Nullable String checkpointDir,int numOfRecordsPreview){
  super(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
  this.batchInterval=batchInterval;
  this.isUnitTest=isUnitTest;
  this.extraJavaOpts="String_Node_Str";
  this.disableCheckpoints=disableCheckpoints;
  this.checkpointDir=checkpointDir;
}

Fixed version (ground truth):
private DataStreamsConfig(Set<ETLStage> stages,Set<Connection> connections,Resources resources,Resources driverResources,Resources clientResources,boolean stageLoggingEnabled,String batchInterval,boolean isUnitTest,boolean disableCheckpoints,@Nullable String checkpointDir,int numOfRecordsPreview,boolean stopGracefully){
  super(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
  this.batchInterval=batchInterval;
  this.isUnitTest=isUnitTest;
  this.extraJavaOpts="String_Node_Str";
  this.disableCheckpoints=disableCheckpoints;
  this.checkpointDir=checkpointDir;
  this.stopGracefully=stopGracefully;
}
Program: 5584
Project: 5584
Buggy source:
public DataStreamsConfig build(){
  return new DataStreamsConfig(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,batchInterval,isUnitTest,false,checkpointDir,numOfRecordsPreview);
}

Fixed version (ground truth):
public DataStreamsConfig build(){
  return new DataStreamsConfig(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,batchInterval,isUnitTest,false,checkpointDir,numOfRecordsPreview,stopGraceFully);
}
Program: 5585
Project: 5585
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  DataStreamsConfig that=(DataStreamsConfig)o;
  return Objects.equals(batchInterval,that.batchInterval) && Objects.equals(extraJavaOpts,that.extraJavaOpts) && Objects.equals(disableCheckpoints,that.disableCheckpoints)&& Objects.equals(checkpointDir,that.checkpointDir);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  DataStreamsConfig that=(DataStreamsConfig)o;
  return Objects.equals(batchInterval,that.batchInterval) && Objects.equals(extraJavaOpts,that.extraJavaOpts) && Objects.equals(disableCheckpoints,that.disableCheckpoints)&& Objects.equals(checkpointDir,that.checkpointDir)&& Objects.equals(stopGracefully,that.stopGracefully);
}
Program: 5586
Project: 5586
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + batchInterval + '\''+ "String_Node_Str"+ extraJavaOpts+ '\''+ "String_Node_Str"+ disableCheckpoints+ "String_Node_Str"+ checkpointDir+ '\''+ "String_Node_Str"+ isUnitTest+ "String_Node_Str"+ super.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + batchInterval + '\''+ "String_Node_Str"+ extraJavaOpts+ '\''+ "String_Node_Str"+ disableCheckpoints+ "String_Node_Str"+ checkpointDir+ '\''+ "String_Node_Str"+ stopGracefully+ "String_Node_Str"+ isUnitTest+ "String_Node_Str"+ super.toString();
}
Program: 5589
Project: 5589
Buggy source:
private SearchResults searchByDefaultIndex(String namespaceId,String searchQuery,Set<MetadataSearchTargetType> types){
  List<MetadataEntry> results=new ArrayList<>();
  for (  String searchTerm : getSearchTerms(namespaceId,searchQuery)) {
    Scanner scanner;
    if (searchTerm.endsWith("String_Node_Str")) {
      byte[] startKey=Bytes.toBytes(searchTerm.substring(0,searchTerm.lastIndexOf("String_Node_Str")));
      byte[] stopKey=Bytes.stopKeyForPrefix(startKey);
      scanner=indexedTable.scanByIndex(Bytes.toBytes(DEFAULT_INDEX_COLUMN),startKey,stopKey);
    }
 else {
      byte[] value=Bytes.toBytes(searchTerm);
      scanner=indexedTable.readByIndex(Bytes.toBytes(DEFAULT_INDEX_COLUMN),value);
    }
    try {
      Row next;
      while ((next=scanner.next()) != null) {
        processRow(results,next,DEFAULT_INDEX_COLUMN,types);
      }
    }
  finally {
      scanner.close();
    }
  }
  return new SearchResults(results,Collections.<String>emptyList());
}

Fixed version (ground truth):
private SearchResults searchByDefaultIndex(String namespaceId,String searchQuery,Set<MetadataSearchTargetType> types){
  List<MetadataEntry> results=new ArrayList<>();
  for (  String searchTerm : getSearchTerms(namespaceId,searchQuery)) {
    Scanner scanner;
    if (searchTerm.endsWith("String_Node_Str")) {
      byte[] startKey=Bytes.toBytes(searchTerm.substring(0,searchTerm.lastIndexOf("String_Node_Str")));
      byte[] stopKey=Bytes.stopKeyForPrefix(startKey);
      scanner=indexedTable.scanByIndex(Bytes.toBytes(DEFAULT_INDEX_COLUMN),startKey,stopKey);
    }
 else {
      byte[] value=Bytes.toBytes(searchTerm);
      scanner=indexedTable.readByIndex(Bytes.toBytes(DEFAULT_INDEX_COLUMN),value);
    }
    try {
      Row next;
      while ((next=scanner.next()) != null) {
        Optional<MetadataEntry> metadataEntry=parseRow(next,DEFAULT_INDEX_COLUMN,types);
        if (metadataEntry.isPresent()) {
          results.add(metadataEntry.get());
        }
      }
    }
  finally {
      scanner.close();
    }
  }
  return new SearchResults(results,Collections.<String>emptyList());
}
Program: 5590
Project: 5590
Buggy source:
/** 
 * Drop an existing file set.
 * @param set the name of the file set to drop
 */
@POST @Path("String_Node_Str") public void drop(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  try {
    getContext().getAdmin().dropDataset(set);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}

Fixed version (ground truth):
/** 
 * Drop an existing file set.
 * @param set the name of the file set to drop
 */
@POST @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void drop(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  try {
    getContext().getAdmin().dropDataset(set);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}
Program: 5591
Project: 5591
Buggy source:
/** 
 * Responds with the content of the file specified by the request.
 * @param set the name of the file set
 * @param filePath the relative path within the file set
 */
@GET @Path("String_Node_Str") public void read(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") String set,@QueryParam("String_Node_Str") String filePath){
  FileSet fileSet;
  try {
    fileSet=getContext().getDataset(set);
  }
 catch (  DatasetInstantiationException e) {
    LOG.warn("String_Node_Str",set,e);
    responder.sendError(400,String.format("String_Node_Str",set));
    return;
  }
  Location location=fileSet.getLocation(filePath);
  getContext().discardDataset(fileSet);
  try {
    responder.send(200,location,"String_Node_Str");
  }
 catch (  IOException e) {
    responder.sendError(400,String.format("String_Node_Str",filePath,set));
  }
}

Fixed version (ground truth):
/** 
 * Responds with the content of the file specified by the request.
 * @param set the name of the file set
 * @param filePath the relative path within the file set
 */
@GET @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void read(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") String set,@QueryParam("String_Node_Str") String filePath){
  FileSet fileSet;
  try {
    fileSet=getContext().getDataset(set);
  }
 catch (  DatasetInstantiationException e) {
    LOG.warn("String_Node_Str",set,e);
    responder.sendError(400,String.format("String_Node_Str",set));
    return;
  }
  Location location=fileSet.getLocation(filePath);
  getContext().discardDataset(fileSet);
  try {
    responder.send(200,location,"String_Node_Str");
  }
 catch (  IOException e) {
    responder.sendError(400,String.format("String_Node_Str",filePath,set));
  }
}
Program: 5592
Project: 5592
Buggy source:
/** 
 * Truncate an existing file set. This will delete all files under the file set's base path.
 * @param set the name of the file set to truncate
 */
@POST @Path("String_Node_Str") public void truncate(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  try {
    getContext().getAdmin().truncateDataset(set);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}

Fixed version (ground truth):
/** 
 * Truncate an existing file set. This will delete all files under the file set's base path.
 * @param set the name of the file set to truncate
 */
@POST @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void truncate(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  try {
    getContext().getAdmin().truncateDataset(set);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}
Program: 5594
Project: 5594
Buggy source:
/** 
 * Update the properties of a file set. The new properties must be be given as JSON in the body of the request. If no properties are given, the dataset is updated with empty properties.
 * @param set the name of the file set
 */
@POST @Path("String_Node_Str") public void update(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  DatasetProperties properties=DatasetProperties.EMPTY;
  ByteBuffer content=request.getContent();
  if (content != null && content.hasRemaining()) {
    try {
      properties=GSON.fromJson(Bytes.toString(content),DatasetProperties.class);
    }
 catch (    Exception e) {
      responder.sendError(400,"String_Node_Str" + e.getMessage());
      return;
    }
  }
  try {
    getContext().getAdmin().updateDataset(set,properties);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}

Fixed version (ground truth):
/** 
 * Update the properties of a file set. The new properties must be be given as JSON in the body of the request. If no properties are given, the dataset is updated with empty properties.
 * @param set the name of the file set
 */
@POST @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void update(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  DatasetProperties properties=DatasetProperties.EMPTY;
  ByteBuffer content=request.getContent();
  if (content != null && content.hasRemaining()) {
    try {
      properties=GSON.fromJson(Bytes.toString(content),DatasetProperties.class);
    }
 catch (    Exception e) {
      responder.sendError(400,"String_Node_Str" + e.getMessage());
      return;
    }
  }
  try {
    getContext().getAdmin().updateDataset(set,properties);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
    return;
  }
  responder.sendStatus(200);
}
Program: 5596
Project: 5596
Buggy source:
/** 
 * Responds with the properties of an existing file set. The properties are returned in JSON format.
 * @param set the name of the file set
 */
@POST @Path("String_Node_Str") public void properties(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  try {
    DatasetProperties props=getContext().getAdmin().getDatasetProperties(set);
    responder.sendJson(200,props);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Responds with the properties of an existing file set. The properties are returned in JSON format.
 * @param set the name of the file set
 */
@POST @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void properties(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String set) throws DatasetManagementException {
  try {
    DatasetProperties props=getContext().getAdmin().getDatasetProperties(set);
    responder.sendJson(200,props);
  }
 catch (  InstanceNotFoundException e) {
    responder.sendError(404,"String_Node_Str" + set + "String_Node_Str");
  }
}
Program: 5597
Project: 5597
Buggy source:
@GET @Path("String_Node_Str") public void read(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") String league,@PathParam("String_Node_Str") int season){
  PartitionDetail partitionDetail=results.getPartition(PartitionKey.builder().addStringField("String_Node_Str",league).addIntField("String_Node_Str",season).build());
  if (partitionDetail == null) {
    responder.sendString(404,"String_Node_Str",Charsets.UTF_8);
    return;
  }
  try {
    responder.send(200,partitionDetail.getLocation().append("String_Node_Str"),"String_Node_Str");
  }
 catch (  IOException e) {
    responder.sendError(400,String.format("String_Node_Str",partitionDetail.getRelativePath()));
  }
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @TransactionPolicy(TransactionControl.EXPLICIT) public void read(HttpServiceRequest request,HttpServiceResponder responder,@PathParam("String_Node_Str") final String league,@PathParam("String_Node_Str") final int season) throws TransactionFailureException {
  final PartitionKey key=PartitionKey.builder().addStringField("String_Node_Str",league).addIntField("String_Node_Str",season).build();
  final AtomicReference<PartitionDetail> partitionDetail=new AtomicReference<>();
  getContext().execute(new TxRunnable(){
    @Override public void run(    DatasetContext context) throws Exception {
      partitionDetail.set(results.getPartition(key));
    }
  }
);
  if (partitionDetail.get() == null) {
    responder.sendString(404,"String_Node_Str",Charsets.UTF_8);
    return;
  }
  try {
    responder.send(200,partitionDetail.get().getLocation().append("String_Node_Str"),"String_Node_Str");
  }
 catch (  IOException e) {
    responder.sendError(400,String.format("String_Node_Str",partitionDetail.get().getRelativePath()));
  }
}
Program: 5600
Project: 5600
Buggy source:
private void performUpgrade() throws Exception {
  performCoprocessorUpgrade();
  LOG.info("String_Node_Str");
  store.upgradeAppVersion();
  LOG.info("String_Node_Str");
  dsSpecUpgrader.upgrade();
  LOG.info("String_Node_Str");
  streamStateStoreUpgrader.upgrade();
  upgradeDatasetServiceManager.startUp();
  LOG.info("String_Node_Str");
  datasetBasedStreamSizeScheduleStore.upgrade();
  LOG.info("String_Node_Str");
  datasetBasedTimeScheduleStore.upgrade();
  LOG.info("String_Node_Str");
  try {
    existingEntitySystemMetadataWriter.write(upgradeDatasetServiceManager.getDSFramework());
    LOG.info("String_Node_Str");
    DeletedDatasetMetadataRemover datasetMetadataRemover=new DeletedDatasetMetadataRemover(nsStore,metadataStore,upgradeDatasetServiceManager.getDSFramework());
    datasetMetadataRemover.remove();
    LOG.info("String_Node_Str");
    metadataStore.deleteAllIndexes();
    LOG.info("String_Node_Str");
    metadataStore.rebuildIndexes();
  }
  finally {
    upgradeDatasetServiceManager.shutDown();
  }
}

Fixed version (ground truth):
private void performUpgrade() throws Exception {
  performCoprocessorUpgrade();
  LOG.info("String_Node_Str");
  store.upgradeAppVersion();
  LOG.info("String_Node_Str");
  dsSpecUpgrader.upgrade();
  LOG.info("String_Node_Str");
  streamStateStoreUpgrader.upgrade();
  LOG.info("String_Node_Str");
  upgradeMetadataDatasetSpecs();
  upgradeDatasetServiceManager.startUp();
  LOG.info("String_Node_Str");
  datasetBasedStreamSizeScheduleStore.upgrade();
  LOG.info("String_Node_Str");
  datasetBasedTimeScheduleStore.upgrade();
  LOG.info("String_Node_Str");
  try {
    existingEntitySystemMetadataWriter.write(upgradeDatasetServiceManager.getDSFramework());
    LOG.info("String_Node_Str");
    DeletedDatasetMetadataRemover datasetMetadataRemover=new DeletedDatasetMetadataRemover(nsStore,metadataStore,upgradeDatasetServiceManager.getDSFramework());
    datasetMetadataRemover.remove();
    LOG.info("String_Node_Str");
    metadataStore.deleteAllIndexes();
    LOG.info("String_Node_Str");
    metadataStore.rebuildIndexes();
  }
  finally {
    upgradeDatasetServiceManager.shutDown();
  }
}
Program: 5601
Project: 5601
Buggy source:
/** 
 * Create a quartz scheduler. Quartz factory method is not used, because inflexible in allowing custom jobstore and turning off check for new versions.
 * @param store JobStore.
 * @param cConf CConfiguration.
 * @return an instance of {@link org.quartz.Scheduler}
 */
private org.quartz.Scheduler getScheduler(JobStore store,CConfiguration cConf) throws SchedulerException {
  int threadPoolSize=cConf.getInt(Constants.Scheduler.CFG_SCHEDULER_MAX_THREAD_POOL_SIZE);
  ExecutorThreadPool threadPool=new ExecutorThreadPool(threadPoolSize);
  threadPool.initialize();
  String schedulerName=DirectSchedulerFactory.DEFAULT_SCHEDULER_NAME;
  String schedulerInstanceId=DirectSchedulerFactory.DEFAULT_INSTANCE_ID;
  QuartzSchedulerResources qrs=new QuartzSchedulerResources();
  JobRunShellFactory jrsf=new StdJobRunShellFactory();
  qrs.setName(schedulerName);
  qrs.setInstanceId(schedulerInstanceId);
  qrs.setJobRunShellFactory(jrsf);
  qrs.setThreadPool(threadPool);
  qrs.setThreadExecutor(new DefaultThreadExecutor());
  qrs.setJobStore(store);
  qrs.setRunUpdateCheck(false);
  QuartzScheduler qs=new QuartzScheduler(qrs,-1,-1);
  ClassLoadHelper cch=new CascadingClassLoadHelper();
  cch.initialize();
  store.initialize(cch,qs.getSchedulerSignaler());
  org.quartz.Scheduler scheduler=new StdScheduler(qs);
  jrsf.initialize(scheduler);
  qs.initialize();
  return scheduler;
}

Fixed version (ground truth):
/** 
 * Create a quartz scheduler. Quartz factory method is not used, because inflexible in allowing custom jobstore and turning off check for new versions.
 * @param store JobStore.
 * @param cConf CConfiguration.
 * @return an instance of {@link org.quartz.Scheduler}
 */
private org.quartz.Scheduler getScheduler(JobStore store,CConfiguration cConf) throws SchedulerException {
  int threadPoolSize=cConf.getInt(Constants.Scheduler.CFG_SCHEDULER_MAX_THREAD_POOL_SIZE);
  ExecutorThreadPool threadPool=new ExecutorThreadPool(threadPoolSize);
  threadPool.initialize();
  String schedulerName=DirectSchedulerFactory.DEFAULT_SCHEDULER_NAME;
  String schedulerInstanceId=DirectSchedulerFactory.DEFAULT_INSTANCE_ID;
  QuartzSchedulerResources qrs=new QuartzSchedulerResources();
  JobRunShellFactory jrsf=new StdJobRunShellFactory();
  qrs.setName(schedulerName);
  qrs.setInstanceId(schedulerInstanceId);
  qrs.setJobRunShellFactory(jrsf);
  qrs.setThreadPool(threadPool);
  qrs.setThreadExecutor(new DefaultThreadExecutor());
  qrs.setJobStore(store);
  qrs.setRunUpdateCheck(false);
  QuartzScheduler qs=new QuartzScheduler(qrs,-1,-1);
  ClassLoadHelper cch=new CascadingClassLoadHelper();
  cch.initialize();
  store.initialize(cch,qs.getSchedulerSignaler());
  org.quartz.Scheduler scheduler=new StdScheduler(qs);
  jrsf.initialize(scheduler);
  qs.initialize();
  scheduler.getListenerManager().addTriggerListener(new TriggerMisfireLogger());
  return scheduler;
}
Program: 5603
Project: 5603
Buggy source:
@Inject public DatasetBasedTimeScheduleStore(TransactionExecutorFactory factory,ScheduleStoreTableUtil tableUtil){
  this.tableUtil=tableUtil;
  this.factory=factory;
}

Fixed version (ground truth):
@Inject DatasetBasedTimeScheduleStore(TransactionExecutorFactory factory,ScheduleStoreTableUtil tableUtil,CConfiguration cConf){
  this.tableUtil=tableUtil;
  this.factory=factory;
  this.cConf=cConf;
}
Program: 5604
Project: 5604
Buggy source:
@Override public void initialize(ClassLoadHelper loadHelper,SchedulerSignaler schedSignaler){
  super.initialize(loadHelper,schedSignaler);
  try {
    initializeScheduleTable();
    readSchedulesFromPersistentStore();
  }
 catch (  Throwable th) {
    throw Throwables.propagate(th);
  }
}

Fixed version (ground truth):
@Override public void initialize(ClassLoadHelper loadHelper,SchedulerSignaler schedSignaler){
  super.initialize(loadHelper,schedSignaler);
  try {
    setMisfireThreshold(cConf.getLong(Constants.Scheduler.CFG_SCHEDULER_MISFIRE_THRESHOLD_MS));
    initializeScheduleTable();
    readSchedulesFromPersistentStore();
  }
 catch (  Throwable th) {
    throw Throwables.propagate(th);
  }
}
Program: 5605
Project: 5605
Buggy source:
private static void schedulerSetup(boolean enablePersistence) throws SchedulerException {
  JobStore js;
  if (enablePersistence) {
    CConfiguration conf=injector.getInstance(CConfiguration.class);
    js=new DatasetBasedTimeScheduleStore(factory,new ScheduleStoreTableUtil(dsFramework,conf));
  }
 else {
    js=new RAMJobStore();
  }
  SimpleThreadPool threadPool=new SimpleThreadPool(10,Thread.NORM_PRIORITY);
  threadPool.initialize();
  DirectSchedulerFactory.getInstance().createScheduler(DUMMY_SCHEDULER_NAME,"String_Node_Str",threadPool,js);
  scheduler=DirectSchedulerFactory.getInstance().getScheduler(DUMMY_SCHEDULER_NAME);
  scheduler.start();
}

Fixed version (ground truth):
private static void schedulerSetup(boolean enablePersistence) throws SchedulerException {
  JobStore js;
  if (enablePersistence) {
    CConfiguration conf=injector.getInstance(CConfiguration.class);
    js=new DatasetBasedTimeScheduleStore(factory,new ScheduleStoreTableUtil(dsFramework,conf),conf);
  }
 else {
    js=new RAMJobStore();
  }
  SimpleThreadPool threadPool=new SimpleThreadPool(10,Thread.NORM_PRIORITY);
  threadPool.initialize();
  DirectSchedulerFactory.getInstance().createScheduler(DUMMY_SCHEDULER_NAME,"String_Node_Str",threadPool,js);
  scheduler=DirectSchedulerFactory.getInstance().getScheduler(DUMMY_SCHEDULER_NAME);
  scheduler.start();
}
Program: 5606
Project: 5606
Buggy source:
@Override @Nullable public Schema getInputSchema(){
  return inputSchemas.entrySet().iterator().next().getValue();
}

Fixed version (ground truth):
@Override @Nullable public Schema getInputSchema(){
  return inputSchemas.isEmpty() ? null : inputSchemas.entrySet().iterator().next().getValue();
}
Program: 5607
Project: 5607
Buggy source:
public void addInputSchema(String stageType,String inputStageName,@Nullable Schema inputSchema){
  if (stageType.equalsIgnoreCase(BatchJoiner.PLUGIN_TYPE) && inputSchema == null) {
    throw new IllegalArgumentException(String.format("String_Node_Str" + "String_Node_Str",inputStageName));
  }
  if (!stageType.equalsIgnoreCase(BatchJoiner.PLUGIN_TYPE) && !hasSameSchema(inputSchema)) {
    throw new IllegalArgumentException("String_Node_Str" + this.stageName);
  }
  inputSchemas.put(inputStageName,inputSchema);
}

Fixed version (ground truth):
public void addInputSchema(String inputStageName,@Nullable Schema inputSchema){
  inputSchemas.put(inputStageName,inputSchema);
}
Program: 5610
Project: 5610
Buggy source:
@BeforeClass public static void setupTests(){
  MockPluginConfigurer pluginConfigurer=new MockPluginConfigurer();
  Set<ArtifactId> artifactIds=ImmutableSet.of(ARTIFACT_ID);
  pluginConfigurer.addMockPlugin(BatchSource.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(SCHEMA_A),artifactIds);
  pluginConfigurer.addMockPlugin(Transform.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(SCHEMA_A),artifactIds);
  pluginConfigurer.addMockPlugin(Transform.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(SCHEMA_B),artifactIds);
  pluginConfigurer.addMockPlugin(BatchSink.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(),artifactIds);
  specGenerator=new BatchPipelineSpecGenerator(pluginConfigurer,ImmutableSet.of(BatchSource.PLUGIN_TYPE),ImmutableSet.of(BatchSink.PLUGIN_TYPE),FileSet.class,DatasetProperties.EMPTY);
}

Fixed version (ground truth):
@BeforeClass public static void setupTests(){
  MockPluginConfigurer pluginConfigurer=new MockPluginConfigurer();
  Set<ArtifactId> artifactIds=ImmutableSet.of(ARTIFACT_ID);
  pluginConfigurer.addMockPlugin(BatchSource.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(SCHEMA_A),artifactIds);
  pluginConfigurer.addMockPlugin(Transform.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(SCHEMA_A),artifactIds);
  pluginConfigurer.addMockPlugin(Transform.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(SCHEMA_B),artifactIds);
  pluginConfigurer.addMockPlugin(BatchSink.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(),artifactIds);
  pluginConfigurer.addMockPlugin(Action.PLUGIN_TYPE,"String_Node_Str",new MockPlugin(),artifactIds);
  specGenerator=new BatchPipelineSpecGenerator(pluginConfigurer,ImmutableSet.of(BatchSource.PLUGIN_TYPE),ImmutableSet.of(BatchSink.PLUGIN_TYPE),FileSet.class,DatasetProperties.EMPTY);
}
Program: 5611
Project: 5611
Buggy source:
public StreamViewId getId(){
  return id;
}

Fixed version (ground truth):
public StreamViewId getId(){
  return id.toEntityId();
}
Program: 5612
Project: 5612
Buggy source:
private StreamViewEntry(StreamViewId id,ViewSpecification spec){
  this.id=id;
  this.spec=spec;
}

Fixed version (ground truth):
private StreamViewEntry(StreamViewId id,ViewSpecification spec){
  this.id=id.toId();
  this.spec=spec;
}
Program: 5613
Project: 5613
Buggy source:
/** 
 * Create a quartz scheduler. Quartz factory method is not used, because inflexible in allowing custom jobstore and turning off check for new versions.
 * @param store JobStore.
 * @param cConf CConfiguration.
 * @return an instance of {@link org.quartz.Scheduler}
 */
private org.quartz.Scheduler getScheduler(JobStore store,CConfiguration cConf) throws SchedulerException {
  int threadPoolSize=cConf.getInt(Constants.Scheduler.CFG_SCHEDULER_MAX_THREAD_POOL_SIZE);
  ExecutorThreadPool threadPool=new ExecutorThreadPool(threadPoolSize);
  threadPool.initialize();
  String schedulerName=DirectSchedulerFactory.DEFAULT_SCHEDULER_NAME;
  String schedulerInstanceId=DirectSchedulerFactory.DEFAULT_INSTANCE_ID;
  QuartzSchedulerResources qrs=new QuartzSchedulerResources();
  JobRunShellFactory jrsf=new StdJobRunShellFactory();
  qrs.setName(schedulerName);
  qrs.setInstanceId(schedulerInstanceId);
  qrs.setJobRunShellFactory(jrsf);
  qrs.setThreadPool(threadPool);
  qrs.setThreadExecutor(new DefaultThreadExecutor());
  qrs.setJobStore(store);
  qrs.setRunUpdateCheck(false);
  QuartzScheduler qs=new QuartzScheduler(qrs,-1,-1);
  ClassLoadHelper cch=new CascadingClassLoadHelper();
  cch.initialize();
  store.initialize(cch,qs.getSchedulerSignaler());
  org.quartz.Scheduler scheduler=new StdScheduler(qs);
  jrsf.initialize(scheduler);
  qs.initialize();
  return scheduler;
}

Fixed version (ground truth):
/** 
 * Create a quartz scheduler. Quartz factory method is not used, because inflexible in allowing custom jobstore and turning off check for new versions.
 * @param store JobStore.
 * @param cConf CConfiguration.
 * @return an instance of {@link org.quartz.Scheduler}
 */
private org.quartz.Scheduler getScheduler(JobStore store,CConfiguration cConf) throws SchedulerException {
  int threadPoolSize=cConf.getInt(Constants.Scheduler.CFG_SCHEDULER_MAX_THREAD_POOL_SIZE);
  ExecutorThreadPool threadPool=new ExecutorThreadPool(threadPoolSize);
  threadPool.initialize();
  String schedulerName=DirectSchedulerFactory.DEFAULT_SCHEDULER_NAME;
  String schedulerInstanceId=DirectSchedulerFactory.DEFAULT_INSTANCE_ID;
  QuartzSchedulerResources qrs=new QuartzSchedulerResources();
  JobRunShellFactory jrsf=new StdJobRunShellFactory();
  qrs.setName(schedulerName);
  qrs.setInstanceId(schedulerInstanceId);
  qrs.setJobRunShellFactory(jrsf);
  qrs.setThreadPool(threadPool);
  qrs.setThreadExecutor(new DefaultThreadExecutor());
  qrs.setJobStore(store);
  qrs.setRunUpdateCheck(false);
  QuartzScheduler qs=new QuartzScheduler(qrs,-1,-1);
  ClassLoadHelper cch=new CascadingClassLoadHelper();
  cch.initialize();
  store.initialize(cch,qs.getSchedulerSignaler());
  org.quartz.Scheduler scheduler=new StdScheduler(qs);
  jrsf.initialize(scheduler);
  qs.initialize();
  scheduler.getListenerManager().addTriggerListener(new TriggerMisfireLogger());
  return scheduler;
}
Program: 5615
Project: 5615
Buggy source:
@Inject public DatasetBasedTimeScheduleStore(TransactionExecutorFactory factory,ScheduleStoreTableUtil tableUtil){
  this.tableUtil=tableUtil;
  this.factory=factory;
}

Fixed version (ground truth):
@Inject DatasetBasedTimeScheduleStore(TransactionExecutorFactory factory,ScheduleStoreTableUtil tableUtil,CConfiguration cConf){
  this.tableUtil=tableUtil;
  this.factory=factory;
  this.cConf=cConf;
}
Program: 5616
Project: 5616
Buggy source:
@Override public void initialize(ClassLoadHelper loadHelper,SchedulerSignaler schedSignaler){
  super.initialize(loadHelper,schedSignaler);
  try {
    initializeScheduleTable();
    readSchedulesFromPersistentStore();
  }
 catch (  Throwable th) {
    throw Throwables.propagate(th);
  }
}

Fixed version (ground truth):
@Override public void initialize(ClassLoadHelper loadHelper,SchedulerSignaler schedSignaler){
  super.initialize(loadHelper,schedSignaler);
  try {
    setMisfireThreshold(cConf.getLong(Constants.Scheduler.CFG_SCHEDULER_MISFIRE_THRESHOLD_MS));
    initializeScheduleTable();
    readSchedulesFromPersistentStore();
  }
 catch (  Throwable th) {
    throw Throwables.propagate(th);
  }
}
Program: 5617
Project: 5617
Buggy source:
private static void schedulerSetup(boolean enablePersistence) throws SchedulerException {
  JobStore js;
  if (enablePersistence) {
    CConfiguration conf=injector.getInstance(CConfiguration.class);
    js=new DatasetBasedTimeScheduleStore(factory,new ScheduleStoreTableUtil(dsFramework,conf));
  }
 else {
    js=new RAMJobStore();
  }
  SimpleThreadPool threadPool=new SimpleThreadPool(10,Thread.NORM_PRIORITY);
  threadPool.initialize();
  DirectSchedulerFactory.getInstance().createScheduler(DUMMY_SCHEDULER_NAME,"String_Node_Str",threadPool,js);
  scheduler=DirectSchedulerFactory.getInstance().getScheduler(DUMMY_SCHEDULER_NAME);
  scheduler.start();
}

Fixed version (ground truth):
private static void schedulerSetup(boolean enablePersistence) throws SchedulerException {
  JobStore js;
  if (enablePersistence) {
    CConfiguration conf=injector.getInstance(CConfiguration.class);
    js=new DatasetBasedTimeScheduleStore(factory,new ScheduleStoreTableUtil(dsFramework,conf),conf);
  }
 else {
    js=new RAMJobStore();
  }
  SimpleThreadPool threadPool=new SimpleThreadPool(10,Thread.NORM_PRIORITY);
  threadPool.initialize();
  DirectSchedulerFactory.getInstance().createScheduler(DUMMY_SCHEDULER_NAME,"String_Node_Str",threadPool,js);
  scheduler=DirectSchedulerFactory.getInstance().getScheduler(DUMMY_SCHEDULER_NAME);
  scheduler.start();
}
Program: 5619
Project: 5619
Buggy source:
public DataStreamsPipelineSpec build(){
  return new DataStreamsPipelineSpec(stages,connections,resources,driverResources == null ? resources : driverResources,stageLoggingEnabled,batchIntervalMillis,extraJavaOpts,numOfRecordsPreview);
}

Fixed version (ground truth):
public DataStreamsPipelineSpec build(){
  return new DataStreamsPipelineSpec(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,batchIntervalMillis,extraJavaOpts,numOfRecordsPreview);
}
Program: 5620
Project: 5620
Buggy source:
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),driverResources,batchIntervalMillis,extraJavaOpts);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),batchIntervalMillis,extraJavaOpts);
}
Program: 5621
Project: 5621
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  DataStreamsPipelineSpec that=(DataStreamsPipelineSpec)o;
  return batchIntervalMillis == that.batchIntervalMillis && Objects.equals(driverResources,that.driverResources) && Objects.equals(extraJavaOpts,that.extraJavaOpts);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  DataStreamsPipelineSpec that=(DataStreamsPipelineSpec)o;
  return batchIntervalMillis == that.batchIntervalMillis && Objects.equals(extraJavaOpts,that.extraJavaOpts);
}
Program: 5622
Project: 5622
Buggy source:
private DataStreamsPipelineSpec(Set<StageSpec> stages,Set<Connection> connections,Resources resources,Resources driverResources,boolean stageLoggingEnabled,long batchIntervalMillis,String extraJavaOpts,int numOfRecordsPreview){
  super(stages,connections,resources,stageLoggingEnabled,numOfRecordsPreview);
  this.driverResources=driverResources;
  this.batchIntervalMillis=batchIntervalMillis;
  this.extraJavaOpts=extraJavaOpts;
}

Fixed version (ground truth):
private DataStreamsPipelineSpec(Set<StageSpec> stages,Set<Connection> connections,Resources resources,Resources driverResources,Resources clientResources,boolean stageLoggingEnabled,long batchIntervalMillis,String extraJavaOpts,int numOfRecordsPreview){
  super(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
  this.batchIntervalMillis=batchIntervalMillis;
  this.extraJavaOpts=extraJavaOpts;
}
Program: 5623
Project: 5623
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str"+ driverResources+ "String_Node_Str"+ extraJavaOpts+ '\''+ "String_Node_Str"+ super.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + batchIntervalMillis + "String_Node_Str"+ extraJavaOpts+ '\''+ "String_Node_Str"+ super.toString();
}
Program: 5624
Project: 5624
Buggy source:
@Override public DataStreamsPipelineSpec generateSpec(DataStreamsConfig config){
  long batchIntervalMillis;
  try {
    batchIntervalMillis=TimeParser.parseDuration(config.getBatchInterval());
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(String.format("String_Node_Str",config.getBatchInterval()));
  }
  DataStreamsPipelineSpec.Builder specBuilder=DataStreamsPipelineSpec.builder(batchIntervalMillis).setDriverResources(config.getDriverResources()).setExtraJavaOpts(config.getExtraJavaOpts());
  configureStages(config,specBuilder);
  return specBuilder.build();
}

Fixed version (ground truth):
@Override public DataStreamsPipelineSpec generateSpec(DataStreamsConfig config){
  long batchIntervalMillis;
  try {
    batchIntervalMillis=TimeParser.parseDuration(config.getBatchInterval());
  }
 catch (  Exception e) {
    throw new IllegalArgumentException(String.format("String_Node_Str",config.getBatchInterval()));
  }
  DataStreamsPipelineSpec.Builder specBuilder=DataStreamsPipelineSpec.builder(batchIntervalMillis).setExtraJavaOpts(config.getExtraJavaOpts());
  configureStages(config,specBuilder);
  return specBuilder.build();
}
Program: 5625
Project: 5625
Buggy source:
@Override protected void configure(){
  setName(NAME);
  setMainClass(SparkStreamingPipelineDriver.class);
  setExecutorResources(pipelineSpec.getResources());
  setDriverResources(pipelineSpec.getDriverResources());
  int numSources=0;
  for (  StageSpec stageSpec : pipelineSpec.getStages()) {
    if (StreamingSource.PLUGIN_TYPE.equals(stageSpec.getPlugin().getType())) {
      numSources++;
    }
  }
  Map<String,String> properties=new HashMap<>();
  properties.put(Constants.PIPELINEID,GSON.toJson(pipelineSpec));
  properties.put(IS_UNIT_TEST,String.valueOf(config.isUnitTest()));
  properties.put(NUM_SOURCES,String.valueOf(numSources));
  properties.put(EXTRA_OPTS,pipelineSpec.getExtraJavaOpts());
  properties.put(CHECKPOINT_DIR,config.getCheckpointDir() == null ? UUID.randomUUID().toString() : config.getCheckpointDir());
  properties.put(CHECKPOINTS_DISABLED,String.valueOf(config.checkpointsDisabled()));
  setProperties(properties);
}

Fixed version (ground truth):
@Override protected void configure(){
  setName(NAME);
  setMainClass(SparkStreamingPipelineDriver.class);
  setExecutorResources(pipelineSpec.getResources());
  setDriverResources(pipelineSpec.getDriverResources());
  setClientResources(pipelineSpec.getClientResources());
  int numSources=0;
  for (  StageSpec stageSpec : pipelineSpec.getStages()) {
    if (StreamingSource.PLUGIN_TYPE.equals(stageSpec.getPlugin().getType())) {
      numSources++;
    }
  }
  Map<String,String> properties=new HashMap<>();
  properties.put(Constants.PIPELINEID,GSON.toJson(pipelineSpec));
  properties.put(IS_UNIT_TEST,String.valueOf(config.isUnitTest()));
  properties.put(NUM_SOURCES,String.valueOf(numSources));
  properties.put(EXTRA_OPTS,pipelineSpec.getExtraJavaOpts());
  properties.put(CHECKPOINT_DIR,config.getCheckpointDir() == null ? UUID.randomUUID().toString() : config.getCheckpointDir());
  properties.put(CHECKPOINTS_DISABLED,String.valueOf(config.checkpointsDisabled()));
  setProperties(properties);
}
Program: 5627
Project: 5627
Buggy source:
@Test public void testDescription() throws Exception {
  PipelinePhase.Builder builder=PipelinePhase.builder(ImmutableSet.of(BatchSource.PLUGIN_TYPE,Constants.CONNECTOR_TYPE)).addStage(StageInfo.builder("String_Node_Str",BatchSource.PLUGIN_TYPE).build()).addStage(StageInfo.builder("String_Node_Str",BatchSource.PLUGIN_TYPE).addInputSchema("String_Node_Str",Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.INT)))).build()).addStage(StageInfo.builder("String_Node_Str",Constants.CONNECTOR_TYPE).build()).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str");
  BatchPhaseSpec phaseSpec=new BatchPhaseSpec("String_Node_Str",builder.build(),new Resources(),new Resources(),false,Collections.<String,String>emptyMap(),0);
  String phaseSpecStr=GSON.toJson(phaseSpec);
  Assert.assertEquals("String_Node_Str",phaseSpec.getDescription());
}

Fixed version (ground truth):
@Test public void testDescription() throws Exception {
  PipelinePhase.Builder builder=PipelinePhase.builder(ImmutableSet.of(BatchSource.PLUGIN_TYPE,Constants.CONNECTOR_TYPE)).addStage(StageInfo.builder("String_Node_Str",BatchSource.PLUGIN_TYPE).build()).addStage(StageInfo.builder("String_Node_Str",BatchSource.PLUGIN_TYPE).addInputSchema("String_Node_Str",Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.INT)))).build()).addStage(StageInfo.builder("String_Node_Str",Constants.CONNECTOR_TYPE).build()).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str");
  BatchPhaseSpec phaseSpec=new BatchPhaseSpec("String_Node_Str",builder.build(),new Resources(),new Resources(),new Resources(),false,Collections.<String,String>emptyMap(),0);
  String phaseSpecStr=GSON.toJson(phaseSpec);
  Assert.assertEquals("String_Node_Str",phaseSpec.getDescription());
}
Program: 5628
Project: 5628
Buggy source:
public BatchPhaseSpec(String phaseName,PipelinePhase phase,Resources resources,Resources driverResources,boolean isStageLoggingEnabled,Map<String,String> connectorDatasets,int numOfRecordsPreview){
  this.phaseName=phaseName;
  this.phase=phase;
  this.resources=resources;
  this.driverResources=driverResources;
  this.isStageLoggingEnabled=isStageLoggingEnabled;
  this.connectorDatasets=connectorDatasets;
  this.description=createDescription();
  this.numOfRecordsPreview=numOfRecordsPreview;
}

Fixed version (ground truth):
public BatchPhaseSpec(String phaseName,PipelinePhase phase,Resources resources,Resources driverResources,Resources clientResources,boolean isStageLoggingEnabled,Map<String,String> connectorDatasets,int numOfRecordsPreview){
  this.phaseName=phaseName;
  this.phase=phase;
  this.resources=resources;
  this.driverResources=driverResources;
  this.clientResources=clientResources;
  this.isStageLoggingEnabled=isStageLoggingEnabled;
  this.connectorDatasets=connectorDatasets;
  this.description=createDescription();
  this.numOfRecordsPreview=numOfRecordsPreview;
}
Program: 5629
Project: 5629
Buggy source:
private BatchPipelineSpec(Set<StageSpec> stages,Set<Connection> connections,Resources resources,Resources driverResources,boolean stageLoggingEnabled,List<ActionSpec> endingActions,int numOfRecordsPreview){
  super(stages,connections,resources,stageLoggingEnabled,numOfRecordsPreview);
  this.endingActions=ImmutableList.copyOf(endingActions);
  this.driverResources=driverResources;
}

Fixed version (ground truth):
private BatchPipelineSpec(Set<StageSpec> stages,Set<Connection> connections,Resources resources,Resources driverResources,Resources clientResources,boolean stageLoggingEnabled,List<ActionSpec> endingActions,int numOfRecordsPreview){
  super(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
  this.endingActions=ImmutableList.copyOf(endingActions);
}
Program: 5630
Project: 5630
Buggy source:
public BatchPipelineSpec build(){
  return new BatchPipelineSpec(stages,connections,resources,driverResources == null ? resources : driverResources,stageLoggingEnabled,endingActions,numOfRecordsPreview);
}

Fixed version (ground truth):
public BatchPipelineSpec build(){
  return new BatchPipelineSpec(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,endingActions,numOfRecordsPreview);
}
Program: 5631
Project: 5631
Buggy source:
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),endingActions,driverResources);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(super.hashCode(),endingActions);
}
Program: 5632
Project: 5632
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  BatchPipelineSpec that=(BatchPipelineSpec)o;
  return Objects.equals(endingActions,that.endingActions) && Objects.equals(driverResources,that.driverResources);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  if (!super.equals(o)) {
    return false;
  }
  BatchPipelineSpec that=(BatchPipelineSpec)o;
  return Objects.equals(endingActions,that.endingActions);
}
Program: 5633
Project: 5633
Buggy source:
@Override public BatchPipelineSpec generateSpec(ETLBatchConfig config){
  BatchPipelineSpec.Builder specBuilder=BatchPipelineSpec.builder().setDriverResources(config.getDriverResources());
  for (  ETLStage endingAction : config.getPostActions()) {
    String name=endingAction.getName();
    DefaultPipelineConfigurer pipelineConfigurer=new DefaultPipelineConfigurer(configurer,name);
    PluginSpec pluginSpec=configurePlugin(endingAction.getName(),endingAction.getPlugin(),pipelineConfigurer);
    specBuilder.addAction(new ActionSpec(name,pluginSpec));
  }
  configureStages(config,specBuilder);
  return specBuilder.build();
}

Fixed version (ground truth):
@Override public BatchPipelineSpec generateSpec(ETLBatchConfig config){
  BatchPipelineSpec.Builder specBuilder=BatchPipelineSpec.builder();
  for (  ETLStage endingAction : config.getPostActions()) {
    String name=endingAction.getName();
    DefaultPipelineConfigurer pipelineConfigurer=new DefaultPipelineConfigurer(configurer,name);
    PluginSpec pluginSpec=configurePlugin(endingAction.getName(),endingAction.getPlugin(),pipelineConfigurer);
    specBuilder.addAction(new ActionSpec(name,pluginSpec));
  }
  configureStages(config,specBuilder);
  return specBuilder.build();
}
Program: 5634
Project: 5634
Buggy source:
public PipelineSpec build(){
  return new PipelineSpec(stages,connections,resources,stageLoggingEnabled,numOfRecordsPreview);
}

Fixed version (ground truth):
public PipelineSpec build(){
  return new PipelineSpec(stages,connections,resources,driverResources,clientResources,stageLoggingEnabled,numOfRecordsPreview);
}