Program: 4929
Project: 4929
Buggy source:
@Inject CoreSchedulerService(TransactionSystemClient txClient,final DatasetFramework datasetFramework,final SchedulerService schedulerService,final NotificationSubscriberService notificationSubscriberService,final ConstraintCheckerService constraintCheckerService,final NamespaceQueryAdmin namespaceQueryAdmin,final Store store){
  this.datasetFramework=datasetFramework;
  DynamicDatasetCache datasetCache=new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),txClient,Schedulers.STORE_DATASET_ID.getParent(),Collections.<String,String>emptyMap(),null,null);
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(datasetCache),RetryStrategies.retryOnConflict(10,100L));
  this.scheduler=schedulerService;
  this.internalService=new RetryOnStartFailureService(new Supplier<Service>(){
    @Override public Service get(){
      return new AbstractIdleService(){
        @Override protected void startUp() throws Exception {
          if (!datasetFramework.hasInstance(Schedulers.STORE_DATASET_ID)) {
            datasetFramework.addInstance(Schedulers.STORE_TYPE_NAME,Schedulers.STORE_DATASET_ID,DatasetProperties.EMPTY);
          }
          schedulerService.startAndWait();
          migrateSchedules(namespaceQueryAdmin,store);
          constraintCheckerService.startAndWait();
          notificationSubscriberService.startAndWait();
        }
        @Override protected void shutDown() throws Exception {
          notificationSubscriberService.stopAndWait();
          constraintCheckerService.stopAndWait();
          schedulerService.stopAndWait();
        }
      }
;
    }
  }
,co.cask.cdap.common.service.RetryStrategies.exponentialDelay(200,5000,TimeUnit.MILLISECONDS));
}

Fixed version (ground truth):
@Inject CoreSchedulerService(TransactionSystemClient txClient,final DatasetFramework datasetFramework,final SchedulerService schedulerService,final NotificationSubscriberService notificationSubscriberService,final ConstraintCheckerService constraintCheckerService,final NamespaceQueryAdmin namespaceQueryAdmin,final Store store){
  this.datasetFramework=datasetFramework;
  final DynamicDatasetCache datasetCache=new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),txClient,Schedulers.STORE_DATASET_ID.getParent(),Collections.<String,String>emptyMap(),null,null);
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(datasetCache),RetryStrategies.retryOnConflict(10,100L));
  this.scheduler=schedulerService;
  this.internalService=new RetryOnStartFailureService(new Supplier<Service>(){
    @Override public Service get(){
      return new AbstractIdleService(){
        @Override protected void startUp() throws Exception {
          if (!datasetFramework.hasInstance(Schedulers.STORE_DATASET_ID)) {
            datasetFramework.addInstance(Schedulers.STORE_TYPE_NAME,Schedulers.STORE_DATASET_ID,DatasetProperties.EMPTY);
          }
          schedulerService.startAndWait();
          migrateSchedules(namespaceQueryAdmin,store);
          cleanupJobs();
          constraintCheckerService.startAndWait();
          notificationSubscriberService.startAndWait();
        }
        @Override protected void shutDown() throws Exception {
          notificationSubscriberService.stopAndWait();
          constraintCheckerService.stopAndWait();
          schedulerService.stopAndWait();
        }
      }
;
    }
  }
,co.cask.cdap.common.service.RetryStrategies.exponentialDelay(200,5000,TimeUnit.MILLISECONDS));
}