Program: 63178
Project: 63178
Buggy source:
@Override public synchronized void init(JobEngineConfig jobEngineConfig) throws SchedulerException {
  if (!initialized) {
    initialized=true;
  }
 else {
    return;
  }
  this.jobEngineConfig=jobEngineConfig;
  RetryPolicy retryPolicy=new ExponentialBackoffRetry(1000,3);
  this.zkClient=CuratorFrameworkFactory.newClient(jobEngineConfig.getZookeeperString(),retryPolicy);
  this.zkClient.start();
  this.sharedLock=new InterProcessMutex(zkClient,schedulerId());
  boolean hasLock=false;
  try {
    hasLock=sharedLock.acquire(3,TimeUnit.SECONDS);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
  if (!hasLock) {
    logger.warn("String_Node_Str");
    zkClient.close();
    return;
  }
  executableManager=ExecutableManager.getInstance(jobEngineConfig.getConfig());
  fetcherPool=Executors.newScheduledThreadPool(1);
  int corePoolSize=jobEngineConfig.getMaxConcurrentJobLimit();
  jobPool=new ThreadPoolExecutor(corePoolSize,corePoolSize,Long.MAX_VALUE,TimeUnit.DAYS,new SynchronousQueue<Runnable>());
  context=new DefaultContext(Maps.<String,Executable>newConcurrentMap(),jobEngineConfig.getConfig());
  for (  AbstractExecutable executable : executableManager.getAllExecutables()) {
    final ExecutableState status=executable.getStatus();
    if (status == ExecutableState.READY) {
      executableManager.updateJobOutput(executable.getId(),ExecutableState.ERROR,null,"String_Node_Str");
    }
  }
  executableManager.updateAllRunningJobsToError();
  Runtime.getRuntime().addShutdownHook(new Thread(){
    public void run(){
      logger.debug("String_Node_Str");
      try {
        shutdown();
      }
 catch (      SchedulerException e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
);
  fetcherPool.scheduleAtFixedRate(new FetcherRunner(),10,ExecutableConstants.DEFAULT_SCHEDULER_INTERVAL_SECONDS,TimeUnit.SECONDS);
  hasStarted=true;
}

Fixed version (ground truth):
@Override public synchronized void init(JobEngineConfig jobEngineConfig) throws SchedulerException {
  if (!initialized) {
    initialized=true;
  }
 else {
    return;
  }
  this.jobEngineConfig=jobEngineConfig;
  RetryPolicy retryPolicy=new ExponentialBackoffRetry(1000,3);
  this.zkClient=CuratorFrameworkFactory.newClient(jobEngineConfig.getZookeeperString(),retryPolicy);
  this.zkClient.start();
  this.sharedLock=new InterProcessMutex(zkClient,schedulerId());
  boolean hasLock=false;
  try {
    hasLock=sharedLock.acquire(3,TimeUnit.SECONDS);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
  if (!hasLock) {
    logger.warn("String_Node_Str");
    zkClient.close();
    return;
  }
  executableManager=ExecutableManager.getInstance(jobEngineConfig.getConfig());
  fetcherPool=Executors.newScheduledThreadPool(1);
  int corePoolSize=jobEngineConfig.getMaxConcurrentJobLimit();
  jobPool=new ThreadPoolExecutor(corePoolSize,corePoolSize,Long.MAX_VALUE,TimeUnit.DAYS,new SynchronousQueue<Runnable>());
  context=new DefaultContext(Maps.<String,Executable>newConcurrentMap(),jobEngineConfig.getConfig());
  for (  AbstractExecutable executable : executableManager.getAllExecutables()) {
    if (executable.getStatus() == ExecutableState.READY) {
      executableManager.updateJobOutput(executable.getId(),ExecutableState.ERROR,null,"String_Node_Str");
    }
  }
  executableManager.updateAllRunningJobsToError();
  Runtime.getRuntime().addShutdownHook(new Thread(){
    public void run(){
      logger.debug("String_Node_Str");
      try {
        shutdown();
      }
 catch (      SchedulerException e) {
        logger.error("String_Node_Str",e);
      }
    }
  }
);
  fetcherPool.scheduleAtFixedRate(new FetcherRunner(),10,ExecutableConstants.DEFAULT_SCHEDULER_INTERVAL_SECONDS,TimeUnit.SECONDS);
  hasStarted=true;
}