Program: 54230
Project: 54230
Buggy source:
public void start(){
  ScheduledFuture<?> scheduledFuture=FIXED_EXECUTOR_SERVICE.scheduleWithFixedDelay(new Runnable(){
    @Override public void run(){
      try {
        List<JobPo> jobPos=getJobRepository().getDeadJob(MAX_DEAD_CHECK_TIME);
        if (jobPos != null && jobPos.size() > 0) {
          List<Node> nodes=application.getNodeManager().getNodeList(NodeType.TASK_TRACKER);
          HashSet<String> identities=new HashSet<String>();
          if (CollectionUtils.isNotEmpty(nodes)) {
            for (            Node node : nodes) {
              identities.add(node.getIdentity());
            }
          }
          Map<TaskTrackerNode,List<String>> timeoutMap=new HashMap<TaskTrackerNode,List<String>>();
          for (          JobPo jobPo : jobPos) {
            if (!identities.contains(jobPo.getTaskTracker())) {
              fixedDeadJob(jobPo);
            }
 else {
              if (System.currentTimeMillis() - jobPo.getGmtModify() > MAX_TIME_OUT) {
                TaskTrackerNode taskTrackerNode=new TaskTrackerNode(jobPo.getTaskTracker(),jobPo.getTaskTrackerNodeGroup());
                List<String> jobIds=timeoutMap.get(taskTrackerNode);
                if (jobIds == null) {
                  jobIds=new ArrayList<String>();
                  timeoutMap.put(taskTrackerNode,jobIds);
                }
                jobIds.add(jobPo.getJobId());
              }
            }
          }
          if (CollectionUtils.isNotEmpty(timeoutMap)) {
            RemotingServerDelegate remotingServer=application.getAttribute(Constants.REMOTING_SERVER);
            for (            Map.Entry<TaskTrackerNode,List<String>> entry : timeoutMap.entrySet()) {
              TaskTrackerNode taskTrackerNode=entry.getKey();
              ChannelWrapper channelWrapper=channelManager.getChannel(taskTrackerNode.getNodeGroup(),NodeType.TASK_TRACKER,taskTrackerNode.getIdentity());
              if (channelWrapper != null && channelWrapper.getChannel() != null && channelWrapper.isOpen()) {
                JobAskRequest requestBody=commandWrapper.wrapper(new JobAskRequest());
                requestBody.setJobIds(entry.getValue());
                RemotingCommand request=RemotingCommand.createRequestCommand(JobProtos.RequestCode.JOB_ASK.code(),requestBody);
                RemotingCommand response=remotingServer.invokeSync(channelWrapper.getChannel(),request);
                if (response != null && RemotingProtos.ResponseCode.SUCCESS.code() == response.getCode()) {
                  JobAskResponse responseBody=response.getBody();
                  List<String> deadJobIds=responseBody.getJobIds();
                  if (deadJobIds != null) {
                    Thread.sleep(1000L);
                    for (                    String deadJobId : deadJobIds) {
                      JobPo jobPo=new JobPo();
                      jobPo.setJobId(deadJobId);
                      fixedDeadJob(jobPo);
                    }
                  }
                }
              }
            }
          }
        }
      }
 catch (      Throwable t) {
        LOGGER.error(t.getMessage(),t);
      }
    }
  }
,2 * 60,3 * 60,TimeUnit.SECONDS);
}

Fixed version (ground truth):
public void start(){
  if (start) {
    return;
  }
  start=true;
  scheduledFuture=FIXED_EXECUTOR_SERVICE.scheduleWithFixedDelay(new Runnable(){
    @Override public void run(){
      try {
        List<JobPo> jobPos=getJobRepository().getDeadJob(MAX_DEAD_CHECK_TIME);
        if (jobPos != null && jobPos.size() > 0) {
          List<Node> nodes=application.getNodeManager().getNodeList(NodeType.TASK_TRACKER);
          HashSet<String> identities=new HashSet<String>();
          if (CollectionUtils.isNotEmpty(nodes)) {
            for (            Node node : nodes) {
              identities.add(node.getIdentity());
            }
          }
          Map<TaskTrackerNode,List<String>> timeoutMap=new HashMap<TaskTrackerNode,List<String>>();
          for (          JobPo jobPo : jobPos) {
            if (!identities.contains(jobPo.getTaskTracker())) {
              fixedDeadJob(jobPo);
            }
 else {
              if (System.currentTimeMillis() - jobPo.getGmtModify() > MAX_TIME_OUT) {
                TaskTrackerNode taskTrackerNode=new TaskTrackerNode(jobPo.getTaskTracker(),jobPo.getTaskTrackerNodeGroup());
                List<String> jobIds=timeoutMap.get(taskTrackerNode);
                if (jobIds == null) {
                  jobIds=new ArrayList<String>();
                  timeoutMap.put(taskTrackerNode,jobIds);
                }
                jobIds.add(jobPo.getJobId());
              }
            }
          }
          if (CollectionUtils.isNotEmpty(timeoutMap)) {
            RemotingServerDelegate remotingServer=application.getAttribute(Constants.REMOTING_SERVER);
            for (            Map.Entry<TaskTrackerNode,List<String>> entry : timeoutMap.entrySet()) {
              TaskTrackerNode taskTrackerNode=entry.getKey();
              ChannelWrapper channelWrapper=channelManager.getChannel(taskTrackerNode.getNodeGroup(),NodeType.TASK_TRACKER,taskTrackerNode.getIdentity());
              if (channelWrapper != null && channelWrapper.getChannel() != null && channelWrapper.isOpen()) {
                JobAskRequest requestBody=commandWrapper.wrapper(new JobAskRequest());
                requestBody.setJobIds(entry.getValue());
                RemotingCommand request=RemotingCommand.createRequestCommand(JobProtos.RequestCode.JOB_ASK.code(),requestBody);
                RemotingCommand response=remotingServer.invokeSync(channelWrapper.getChannel(),request);
                if (response != null && RemotingProtos.ResponseCode.SUCCESS.code() == response.getCode()) {
                  JobAskResponse responseBody=response.getBody();
                  List<String> deadJobIds=responseBody.getJobIds();
                  if (deadJobIds != null) {
                    Thread.sleep(1000L);
                    for (                    String deadJobId : deadJobIds) {
                      JobPo jobPo=new JobPo();
                      jobPo.setJobId(deadJobId);
                      fixedDeadJob(jobPo);
                    }
                  }
                }
              }
            }
          }
        }
      }
 catch (      Throwable t) {
        LOGGER.error(t.getMessage(),t);
      }
    }
  }
,2 * 60,3 * 60,TimeUnit.SECONDS);
}