Program: 89992
Project: 89992
Buggy source:
/** 
 * Setup for the tests.
 */
@Before public void setup(){
  this.jobPersistenceService=Mockito.mock(JobPersistenceService.class);
  this.jobKillService=Mockito.mock(JobKillService.class);
  this.jobStateService=Mockito.mock(JobStateService.class);
  this.jobSearchService=Mockito.mock(JobSearchService.class);
  this.jobsProperties=new JobsProperties();
  this.jobsProperties.getLocations().setArchives(BASE_ARCHIVE_LOCATION);
  this.jobsProperties.getMemory().setDefaultJobMemory(MEMORY);
  this.jobsProperties.getUsers().getActiveLimit().setEnabled(ACTIVE_JOBS_LIMIT_ENABLED);
  this.applicationService=Mockito.mock(ApplicationService.class);
  this.clusterService=Mockito.mock(ClusterService.class);
  this.commandService=Mockito.mock(CommandService.class);
  this.clusterLoadBalancer1=Mockito.mock(ClusterLoadBalancer.class);
  this.clusterLoadBalancer2=Mockito.mock(ClusterLoadBalancer.class);
  this.clusterLoadBalancer3=Mockito.mock(ClusterLoadBalancer.class);
  this.clusterLoadBalancer4=Mockito.mock(ClusterLoadBalancer.class);
  this.registry=Mockito.mock(Registry.class);
  this.tagsCaptor=ArgumentCaptor.forClass(Map.class);
  this.coordinationTimerId=Mockito.mock(Id.class);
  this.coordinationTimer=Mockito.mock(Timer.class);
  Mockito.when(this.registry.createId("String_Node_Str")).thenReturn(coordinationTimerId);
  Mockito.when(coordinationTimerId.withTags(Mockito.any(Map.class))).thenReturn(coordinationTimerId);
  Mockito.when(this.registry.timer(Mockito.eq(coordinationTimerId))).thenReturn(coordinationTimer);
  this.selectClusterTimerId=Mockito.mock(Id.class);
  this.selectClusterTimer=Mockito.mock(Timer.class);
  Mockito.when(this.registry.createId("String_Node_Str")).thenReturn(selectClusterTimerId);
  Mockito.when(selectClusterTimerId.withTags(Mockito.any(Map.class))).thenReturn(selectClusterTimerId);
  Mockito.when(this.registry.timer(Mockito.eq(selectClusterTimerId))).thenReturn(selectClusterTimer);
  this.selectCommandTimerId=Mockito.mock(Id.class);
  this.selectCommandTimer=Mockito.mock(Timer.class);
  Mockito.when(this.registry.createId("String_Node_Str")).thenReturn(selectCommandTimerId);
  Mockito.when(selectCommandTimerId.withTags(Mockito.any(Map.class))).thenReturn(selectCommandTimerId);
  Mockito.when(this.registry.timer(Mockito.eq(selectCommandTimerId))).thenReturn(selectCommandTimer);
  this.selectApplicationTimerId=Mockito.mock(Id.class);
  this.selectApplicationTimer=Mockito.mock(Timer.class);
  Mockito.when(this.registry.createId("String_Node_Str")).thenReturn(selectApplicationTimerId);
  Mockito.when(selectApplicationTimerId.withTags(Mockito.any(Map.class))).thenReturn(selectApplicationTimerId);
  Mockito.when(this.registry.timer(Mockito.eq(selectApplicationTimerId))).thenReturn(selectApplicationTimer);
  this.setJobEnvironmentTimerId=Mockito.mock(Id.class);
  this.setJobEnvironmentTimer=Mockito.mock(Timer.class);
  Mockito.when(this.registry.createId("String_Node_Str")).thenReturn(setJobEnvironmentTimerId);
  Mockito.when(setJobEnvironmentTimerId.withTags(Mockito.any(Map.class))).thenReturn(setJobEnvironmentTimerId);
  Mockito.when(this.registry.timer(Mockito.eq(setJobEnvironmentTimerId))).thenReturn(setJobEnvironmentTimer);
  this.noClusterSelectedCounter=Mockito.mock(Counter.class);
  Mockito.when(this.registry.counter("String_Node_Str")).thenReturn(noClusterSelectedCounter);
  this.noMatchingClusterCounter=Mockito.mock(Counter.class);
  Mockito.when(registry.counter("String_Node_Str")).thenReturn(noMatchingClusterCounter);
  this.loadBalancerCounterId=Mockito.mock(Id.class);
  this.loadBalancerCounter=Mockito.mock(Counter.class);
  Mockito.when(this.registry.createId("String_Node_Str")).thenReturn(loadBalancerCounterId);
  Mockito.when(loadBalancerCounterId.withTags(Mockito.any(Map.class))).thenReturn(loadBalancerCounterId);
  Mockito.when(this.registry.counter(Mockito.eq(loadBalancerCounterId))).thenReturn(loadBalancerCounter);
  this.jobCoordinatorService=new JobCoordinatorServiceImpl(this.jobPersistenceService,this.jobKillService,this.jobStateService,jobsProperties,this.applicationService,this.jobSearchService,this.clusterService,this.commandService,Lists.newArrayList(this.clusterLoadBalancer1,this.clusterLoadBalancer2,this.clusterLoadBalancer3,this.clusterLoadBalancer4),this.registry,HOST_NAME);
}

Fixed version (ground truth):
/** 
 * Setup for the tests.
 */
@Before public void setup(){
  MockitoAnnotations.initMocks(this);
  this.jobPersistenceService=Mockito.mock(JobPersistenceService.class);
  this.jobKillService=Mockito.mock(JobKillService.class);
  this.jobStateService=Mockito.mock(JobStateService.class);
  this.jobSearchService=Mockito.mock(JobSearchService.class);
  this.jobsProperties=new JobsProperties();
  this.jobsProperties.getLocations().setArchives(BASE_ARCHIVE_LOCATION);
  this.jobsProperties.getMemory().setDefaultJobMemory(MEMORY);
  this.jobsProperties.getUsers().getActiveLimit().setEnabled(ACTIVE_JOBS_LIMIT_ENABLED);
  this.applicationService=Mockito.mock(ApplicationService.class);
  this.clusterService=Mockito.mock(ClusterService.class);
  this.commandService=Mockito.mock(CommandService.class);
  this.clusterLoadBalancer1=Mockito.mock(ClusterLoadBalancer.class);
  this.clusterLoadBalancer2=Mockito.mock(ClusterLoadBalancer.class);
  this.clusterLoadBalancer3=Mockito.mock(ClusterLoadBalancer.class);
  this.clusterLoadBalancer4=Mockito.mock(ClusterLoadBalancer.class);
  final Registry registry=Mockito.mock(Registry.class);
  this.coordinationTimerId=Mockito.mock(Id.class);
  this.coordinationTimer=Mockito.mock(Timer.class);
  Mockito.when(registry.createId("String_Node_Str")).thenReturn(this.coordinationTimerId);
  Mockito.when(this.coordinationTimerId.withTags(Mockito.anyMapOf(String.class,String.class))).thenReturn(this.coordinationTimerId);
  Mockito.when(registry.timer(Mockito.eq(this.coordinationTimerId))).thenReturn(this.coordinationTimer);
  this.selectClusterTimerId=Mockito.mock(Id.class);
  this.selectClusterTimer=Mockito.mock(Timer.class);
  Mockito.when(registry.createId("String_Node_Str")).thenReturn(this.selectClusterTimerId);
  Mockito.when(this.selectClusterTimerId.withTags(Mockito.anyMapOf(String.class,String.class))).thenReturn(this.selectClusterTimerId);
  Mockito.when(registry.timer(Mockito.eq(this.selectClusterTimerId))).thenReturn(this.selectClusterTimer);
  this.selectCommandTimerId=Mockito.mock(Id.class);
  this.selectCommandTimer=Mockito.mock(Timer.class);
  Mockito.when(registry.createId("String_Node_Str")).thenReturn(this.selectCommandTimerId);
  Mockito.when(this.selectCommandTimerId.withTags(Mockito.anyMapOf(String.class,String.class))).thenReturn(this.selectCommandTimerId);
  Mockito.when(registry.timer(Mockito.eq(this.selectCommandTimerId))).thenReturn(this.selectCommandTimer);
  this.selectApplicationTimerId=Mockito.mock(Id.class);
  this.selectApplicationTimer=Mockito.mock(Timer.class);
  Mockito.when(registry.createId("String_Node_Str")).thenReturn(this.selectApplicationTimerId);
  Mockito.when(this.selectApplicationTimerId.withTags(Mockito.anyMapOf(String.class,String.class))).thenReturn(this.selectApplicationTimerId);
  Mockito.when(registry.timer(Mockito.eq(selectApplicationTimerId))).thenReturn(selectApplicationTimer);
  this.setJobEnvironmentTimerId=Mockito.mock(Id.class);
  this.setJobEnvironmentTimer=Mockito.mock(Timer.class);
  Mockito.when(registry.createId("String_Node_Str")).thenReturn(this.setJobEnvironmentTimerId);
  Mockito.when(this.setJobEnvironmentTimerId.withTags(Mockito.anyMapOf(String.class,String.class))).thenReturn(this.setJobEnvironmentTimerId);
  Mockito.when(registry.timer(Mockito.eq(this.setJobEnvironmentTimerId))).thenReturn(this.setJobEnvironmentTimer);
  this.noClusterSelectedCounter=Mockito.mock(Counter.class);
  Mockito.when(registry.counter("String_Node_Str")).thenReturn(this.noClusterSelectedCounter);
  this.noMatchingClusterCounter=Mockito.mock(Counter.class);
  Mockito.when(registry.counter("String_Node_Str")).thenReturn(this.noMatchingClusterCounter);
  this.loadBalancerCounterId=Mockito.mock(Id.class);
  this.loadBalancerCounter=Mockito.mock(Counter.class);
  Mockito.when(registry.createId("String_Node_Str")).thenReturn(this.loadBalancerCounterId);
  Mockito.when(this.loadBalancerCounterId.withTags(Mockito.anyMapOf(String.class,String.class))).thenReturn(this.loadBalancerCounterId);
  Mockito.when(registry.counter(Mockito.eq(this.loadBalancerCounterId))).thenReturn(this.loadBalancerCounter);
  this.jobCoordinatorService=new JobCoordinatorServiceImpl(this.jobPersistenceService,this.jobKillService,this.jobStateService,jobsProperties,this.applicationService,this.jobSearchService,this.clusterService,this.commandService,Lists.newArrayList(this.clusterLoadBalancer1,this.clusterLoadBalancer2,this.clusterLoadBalancer3,this.clusterLoadBalancer4),registry,HOST_NAME);
}