nus-yam/ex-repair huggingface dataset:
Program: 61770
Project: 61770
Buggy source:
@Test public void testLastFile(){
  DateTime time=new DateTime(2014,12,31,23,30,1,2,DateTimeZone.UTC);
  for (int i=0; i < 30; i++) {
    time=time.plusMinutes(2);
    spokeStore.write("String_Node_Str" + new ContentKey(time,"String_Node_Str").toUrl(),BYTES);
    time=time.plusSeconds(1);
    spokeStore.write("String_Node_Str" + new ContentKey(time,"String_Node_Str").toUrl(),BYTES);
    time=time.plusMillis(1);
    spokeStore.write("String_Node_Str" + new ContentKey(time,"String_Node_Str").toUrl(),BYTES);
  }
  ContentKey limitKey=new ContentKey(time.minusMinutes(1),"String_Node_Str");
  String found=spokeStore.getLatest("String_Node_Str",limitKey.toUrl());
  assertEquals("String_Node_Str",found);
  limitKey=new ContentKey(time.plusMinutes(1),"String_Node_Str");
  found=spokeStore.getLatest("String_Node_Str",limitKey.toUrl());
  assertEquals("String_Node_Str",found);
  limitKey=new ContentKey(time.plusMinutes(1),"String_Node_Str");
  found=spokeStore.getLatest("String_Node_Str",limitKey.toUrl());
  assertEquals("String_Node_Str",found);
}

Fixed version (ground truth):
@Test public void testLastFile(){
  DateTime time=new DateTime(2014,12,31,23,30,1,2,DateTimeZone.UTC);
  for (int i=0; i < 30; i++) {
    time=time.plusMinutes(2);
    spokeStore.write("String_Node_Str" + new ContentKey(time,"String_Node_Str").toUrl(),BYTES);
    time=time.plusSeconds(1);
    spokeStore.write("String_Node_Str" + new ContentKey(time,"String_Node_Str").toUrl(),BYTES);
    time=time.plusMillis(1);
    spokeStore.write("String_Node_Str" + new ContentKey(time,"String_Node_Str").toUrl(),BYTES);
  }
  ContentKey limitKey=new ContentKey(time.minusMinutes(1),"String_Node_Str");
  String found=spokeStore.getLatest("String_Node_Str",limitKey.toUrl());
  assertEquals("String_Node_Str",found);
  limitKey=new ContentKey(time,"String_Node_Str");
  found=spokeStore.getLatest("String_Node_Str",limitKey.toUrl());
  assertEquals("String_Node_Str",found);
  limitKey=new ContentKey(time.plusMinutes(1),"String_Node_Str");
  found=spokeStore.getLatest("String_Node_Str",limitKey.toUrl());
  assertEquals("String_Node_Str",found);
}
Program: 61771
Project: 61771
Buggy source:
public Optional<ContentKey> next(){
  try {
    return Optional.fromNullable(queue.poll(10,TimeUnit.SECONDS));
  }
 catch (  InterruptedException e) {
    throw new RuntimeInterruptedException(e);
  }
}

Fixed version (ground truth):
public Optional<ContentKey> next(){
  if (error.get()) {
    throw new RuntimeException("String_Node_Str");
  }
  try {
    return Optional.fromNullable(queue.poll(10,TimeUnit.SECONDS));
  }
 catch (  InterruptedException e) {
    throw new RuntimeInterruptedException(e);
  }
}
Program: 61773
Project: 61773
Buggy source:
@Override public void run(){
  try {
    doWork();
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str" + channel,e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    doWork();
  }
 catch (  Exception e) {
    error.set(true);
    logger.warn("String_Node_Str" + channel,e);
  }
}
Program: 61774
Project: 61774
Buggy source:
public static ChannelConfiguration fromJson(String json,String name){
  return gson.fromJson(json,ChannelConfiguration.Builder.class).withName(name).build();
}

Fixed version (ground truth):
public static ChannelConfiguration fromJson(String json,String name){
  if (StringUtils.isEmpty(json)) {
    return builder().withName(name).build();
  }
  return gson.fromJson(json,ChannelConfiguration.Builder.class).withName(name).build();
}
Program: 61775
Project: 61775
Buggy source:
private void addKeys(Collection<ContentKey> keys){
  logger.trace("String_Node_Str",channel,keys);
  try {
    for (    ContentKey key : keys) {
      if (key.compareTo(startingKey) > 0) {
        queue.put(key);
      }
    }
  }
 catch (  InterruptedException e) {
    logger.info("String_Node_Str" + e.getMessage());
    throw new RuntimeInterruptedException(e);
  }
}

Fixed version (ground truth):
private void addKeys(Collection<ContentKey> keys){
  logger.trace("String_Node_Str",channel,keys);
  try {
    for (    ContentKey key : keys) {
      if (key.compareTo(lastAdded) > 0) {
        queue.put(key);
        lastAdded=key;
      }
    }
  }
 catch (  InterruptedException e) {
    logger.info("String_Node_Str" + e.getMessage());
    throw new RuntimeInterruptedException(e);
  }
}
Program: 61776
Project: 61776
Buggy source:
private void doWork(){
  while (!shouldExit.get()) {
    DateTime latestStableInChannel=getLatestStable();
    logger.trace("String_Node_Str",channel,lastQueryTime,latestStableInChannel);
    if (lastQueryTime.isBefore(latestStableInChannel)) {
      TimeUtil.Unit unit=getStepUnit(latestStableInChannel);
      logger.trace("String_Node_Str",channel,unit,lastQueryTime);
      TimeQuery query=TimeQuery.builder().channelName(channel).startTime(lastQueryTime).unit(unit).build();
      query.trace(false);
      addKeys(channelService.queryByTime(query));
      lastQueryTime=lastQueryTime.plus(unit.getDuration());
    }
 else {
      Sleeper.sleep(1000);
    }
  }
}

Fixed version (ground truth):
private void doWork(){
  while (!shouldExit.get()) {
    DateTime latestStableInChannel=getLatestStable();
    logger.trace("String_Node_Str",channel,lastQueryTime,latestStableInChannel);
    if (lastQueryTime.isBefore(latestStableInChannel)) {
      TimeUtil.Unit unit=getStepUnit(latestStableInChannel);
      logger.trace("String_Node_Str",channel,unit,lastQueryTime);
      Location location=Location.ALL;
      if (unit.equals(TimeUtil.Unit.SECONDS)) {
        location=Location.CACHE;
      }
      TimeQuery query=TimeQuery.builder().channelName(channel).startTime(lastQueryTime).unit(unit).location(location).build();
      query.trace(false);
      addKeys(channelService.queryByTime(query));
      lastQueryTime=lastQueryTime.plus(unit.getDuration());
    }
 else {
      Sleeper.sleep(1000);
    }
  }
}
Program: 61778
Project: 61778
Buggy source:
private synchronized void replicateChannels(){
  if (stopped.get()) {
    logger.info("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str");
  Set<String> replicators=new HashSet<>();
  Iterable<ChannelConfiguration> replicatedChannels=channelService.getChannels(REPLICATED);
  for (  ChannelConfiguration channel : replicatedChannels) {
    if (replicatorMap.containsKey(channel.getName())) {
      ChannelReplicator replicator=replicatorMap.get(channel.getName());
      if (!replicator.getChannel().getReplicationSource().equals(channel.getReplicationSource())) {
        logger.info("String_Node_Str",replicator.getChannel().getReplicationSource(),channel.getReplicationSource());
        replicator.exit();
        startReplication(channel);
      }
    }
 else {
      startReplication(channel);
    }
    replicators.add(channel.getName());
  }
  Set<String> toStop=new HashSet<>(replicatorMap.keySet());
  toStop.removeAll(replicators);
  logger.info("String_Node_Str",toStop);
  for (  String nameToStop : toStop) {
    logger.info("String_Node_Str",nameToStop);
    ChannelReplicator replicator=replicatorMap.remove(nameToStop);
    replicator.exit();
  }
}

Fixed version (ground truth):
private synchronized void replicateChannels(){
  if (stopped.get()) {
    logger.info("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str");
  Set<String> replicators=new HashSet<>();
  Iterable<ChannelConfiguration> replicatedChannels=channelService.getChannels(REPLICATED);
  for (  ChannelConfiguration channel : replicatedChannels) {
    if (replicatorMap.containsKey(channel.getName())) {
      ChannelReplicator replicator=replicatorMap.get(channel.getName());
      if (!replicator.getChannel().getReplicationSource().equals(channel.getReplicationSource())) {
        logger.info("String_Node_Str",replicator.getChannel().getReplicationSource(),channel.getReplicationSource());
        replicator.stop();
        startReplication(channel);
      }
    }
 else {
      startReplication(channel);
    }
    replicators.add(channel.getName());
  }
  Set<String> toStop=new HashSet<>(replicatorMap.keySet());
  toStop.removeAll(replicators);
  logger.info("String_Node_Str",toStop);
  for (  String nameToStop : toStop) {
    logger.info("String_Node_Str",nameToStop);
    ChannelReplicator replicator=replicatorMap.remove(nameToStop);
    replicator.stop();
  }
}
Program: 61779
Project: 61779
Buggy source:
@Override protected void shutDown() throws Exception {
  stopped.set(true);
  stopReplication();
}

Fixed version (ground truth):
@Override protected void shutDown() throws Exception {
  stopped.set(true);
  exit();
}
Program: 61780
Project: 61780
Buggy source:
@Override public void exit(){
  hubUtils.stopGroupCallback(getGroupName(),channel.getReplicationSource());
}

Fixed version (ground truth):
@Override public void exit(){
}
Program: 61781
Project: 61781
Buggy source:
private synchronized void replicateChannels(){
  if (stopped.get()) {
    logger.info("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str");
  Set<String> replicators=new HashSet<>();
  Iterable<ChannelConfiguration> replicatedChannels=channelService.getChannels(REPLICATED);
  for (  ChannelConfiguration channel : replicatedChannels) {
    if (replicatorMap.containsKey(channel.getName())) {
      ChannelReplicator replicator=replicatorMap.get(channel.getName());
      if (!replicator.getChannel().getReplicationSource().equals(channel.getReplicationSource())) {
        logger.info("String_Node_Str",replicator.getChannel().getReplicationSource(),channel.getReplicationSource());
        replicator.exit();
        startReplication(channel);
      }
    }
 else {
      startReplication(channel);
    }
    replicators.add(channel.getName());
  }
  Set<String> toStop=new HashSet<>(replicatorMap.keySet());
  toStop.removeAll(replicators);
  logger.info("String_Node_Str",toStop);
  for (  String nameToStop : toStop) {
    logger.info("String_Node_Str",nameToStop);
    ChannelReplicator replicator=replicatorMap.remove(nameToStop);
    replicator.exit();
  }
}

Fixed version (ground truth):
private synchronized void replicateChannels(){
  if (stopped.get()) {
    logger.info("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str");
  Set<String> replicators=new HashSet<>();
  Iterable<ChannelConfiguration> replicatedChannels=channelService.getChannels(REPLICATED);
  for (  ChannelConfiguration channel : replicatedChannels) {
    if (replicatorMap.containsKey(channel.getName())) {
      ChannelReplicator replicator=replicatorMap.get(channel.getName());
      if (!replicator.getChannel().getReplicationSource().equals(channel.getReplicationSource())) {
        logger.info("String_Node_Str",replicator.getChannel().getReplicationSource(),channel.getReplicationSource());
        replicator.stop();
        startReplication(channel);
      }
    }
 else {
      startReplication(channel);
    }
    replicators.add(channel.getName());
  }
  Set<String> toStop=new HashSet<>(replicatorMap.keySet());
  toStop.removeAll(replicators);
  logger.info("String_Node_Str",toStop);
  for (  String nameToStop : toStop) {
    logger.info("String_Node_Str",nameToStop);
    ChannelReplicator replicator=replicatorMap.remove(nameToStop);
    replicator.stop();
  }
}
Program: 61782
Project: 61782
Buggy source:
@Override protected void shutDown() throws Exception {
  stopped.set(true);
  stopReplication();
}

Fixed version (ground truth):
@Override protected void shutDown() throws Exception {
  stopped.set(true);
  exit();
}
Program: 61783
Project: 61783
Buggy source:
@Override public void exit(){
  hubUtils.stopGroupCallback(getGroupName(),channel.getReplicationSource());
}

Fixed version (ground truth):
@Override public void exit(){
}
Program: 61784
Project: 61784
Buggy source:
private synchronized void replicateChannels(){
  if (stopped.get()) {
    logger.info("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str");
  Set<String> replicators=new HashSet<>();
  Iterable<ChannelConfiguration> replicatedChannels=channelService.getChannels(REPLICATED);
  for (  ChannelConfiguration channel : replicatedChannels) {
    if (replicatorMap.containsKey(channel.getName())) {
      ChannelReplicator replicator=replicatorMap.get(channel.getName());
      if (!replicator.getChannel().getReplicationSource().equals(channel.getReplicationSource())) {
        logger.info("String_Node_Str",replicator.getChannel().getReplicationSource(),channel.getReplicationSource());
        replicator.exit();
        startReplication(channel);
      }
    }
 else {
      startReplication(channel);
    }
    replicators.add(channel.getName());
  }
  Set<String> toStop=new HashSet<>(replicatorMap.keySet());
  toStop.removeAll(replicators);
  logger.info("String_Node_Str",toStop);
  for (  String nameToStop : toStop) {
    logger.info("String_Node_Str",nameToStop);
    ChannelReplicator replicator=replicatorMap.remove(nameToStop);
    replicator.exit();
  }
}

Fixed version (ground truth):
private synchronized void replicateChannels(){
  if (stopped.get()) {
    logger.info("String_Node_Str");
    return;
  }
  logger.info("String_Node_Str");
  Set<String> replicators=new HashSet<>();
  Iterable<ChannelConfiguration> replicatedChannels=channelService.getChannels(REPLICATED);
  for (  ChannelConfiguration channel : replicatedChannels) {
    if (replicatorMap.containsKey(channel.getName())) {
      ChannelReplicator replicator=replicatorMap.get(channel.getName());
      if (!replicator.getChannel().getReplicationSource().equals(channel.getReplicationSource())) {
        logger.info("String_Node_Str",replicator.getChannel().getReplicationSource(),channel.getReplicationSource());
        replicator.stop();
        startReplication(channel);
      }
    }
 else {
      startReplication(channel);
    }
    replicators.add(channel.getName());
  }
  Set<String> toStop=new HashSet<>(replicatorMap.keySet());
  toStop.removeAll(replicators);
  logger.info("String_Node_Str",toStop);
  for (  String nameToStop : toStop) {
    logger.info("String_Node_Str",nameToStop);
    ChannelReplicator replicator=replicatorMap.remove(nameToStop);
    replicator.stop();
  }
}
Program: 61785
Project: 61785
Buggy source:
@Override protected void shutDown() throws Exception {
  stopped.set(true);
  stopReplication();
}

Fixed version (ground truth):
@Override protected void shutDown() throws Exception {
  stopped.set(true);
  exit();
}
Program: 61786
Project: 61786
Buggy source:
@Override public void exit(){
  hubUtils.stopGroupCallback(getGroupName(),channel.getReplicationSource());
}

Fixed version (ground truth):
@Override public void exit(){
}
Program: 61787
Project: 61787
Buggy source:
@Override public Optional<ContentKey> getLatest(String channelName,boolean stable,boolean trace){
  DirectionQuery query=DirectionQuery.builder().channelName(channelName).contentKey(new ContentKey(TimeUtil.time(stable),"String_Node_Str")).next(false).stable(stable).count(1).build();
  query.trace(trace);
  Collection<ContentKey> keys=getKeys(query);
  if (trace) {
    query.getTraces().log(logger);
  }
  if (keys.isEmpty()) {
    return Optional.absent();
  }
 else {
    return Optional.of(keys.iterator().next());
  }
}

Fixed version (ground truth):
@Override public Optional<ContentKey> getLatest(String channelName,boolean stable,boolean trace){
  DirectionQuery query=DirectionQuery.builder().channelName(channelName).contentKey(new ContentKey(TimeUtil.time(stable),"String_Node_Str")).next(false).stable(stable).ttlDays(getChannelConfiguration(channelName).getTtlDays()).count(1).build();
  query.trace(trace);
  Collection<ContentKey> keys=getKeys(query);
  if (trace) {
    query.getTraces().log(logger);
  }
  if (keys.isEmpty()) {
    return Optional.absent();
  }
 else {
    return Optional.of(keys.iterator().next());
  }
}
Program: 61788
Project: 61788
Buggy source:
@Override public Optional<ContentKey> getLatest(String channelName,boolean stable,boolean trace){
  DirectionQuery query=DirectionQuery.builder().channelName(channelName).contentKey(new ContentKey(TimeUtil.time(stable),"String_Node_Str")).next(false).stable(stable).count(1).build();
  query.trace(trace);
  Collection<ContentKey> keys=getKeys(query);
  if (trace) {
    query.getTraces().log(logger);
  }
  if (keys.isEmpty()) {
    return Optional.absent();
  }
 else {
    return Optional.of(keys.iterator().next());
  }
}

Fixed version (ground truth):
@Override public Optional<ContentKey> getLatest(String channelName,boolean stable,boolean trace){
  DirectionQuery query=DirectionQuery.builder().channelName(channelName).contentKey(new ContentKey(TimeUtil.time(stable),"String_Node_Str")).next(false).stable(stable).ttlDays(getChannelConfiguration(channelName).getTtlDays()).count(1).build();
  query.trace(trace);
  Collection<ContentKey> keys=getKeys(query);
  if (trace) {
    query.getTraces().log(logger);
  }
  if (keys.isEmpty()) {
    return Optional.absent();
  }
 else {
    return Optional.of(keys.iterator().next());
  }
}
Program: 61789
Project: 61789
Buggy source:
@Override public Optional<ContentKey> getLatest(String channelName,boolean stable,boolean trace){
  DirectionQuery query=DirectionQuery.builder().channelName(channelName).contentKey(new ContentKey(TimeUtil.time(stable),"String_Node_Str")).next(false).stable(stable).count(1).build();
  query.trace(trace);
  Collection<ContentKey> keys=getKeys(query);
  if (trace) {
    query.getTraces().log(logger);
  }
  if (keys.isEmpty()) {
    return Optional.absent();
  }
 else {
    return Optional.of(keys.iterator().next());
  }
}

Fixed version (ground truth):
@Override public Optional<ContentKey> getLatest(String channelName,boolean stable,boolean trace){
  DirectionQuery query=DirectionQuery.builder().channelName(channelName).contentKey(new ContentKey(TimeUtil.time(stable),"String_Node_Str")).next(false).stable(stable).ttlDays(getChannelConfiguration(channelName).getTtlDays()).count(1).build();
  query.trace(trace);
  Collection<ContentKey> keys=getKeys(query);
  if (trace) {
    query.getTraces().log(logger);
  }
  if (keys.isEmpty()) {
    return Optional.absent();
  }
 else {
    return Optional.of(keys.iterator().next());
  }
}
Program: 61791
Project: 61791
Buggy source:
@Inject public GroupCaller(CuratorFramework curator,Provider<CallbackQueue> queueProvider,GroupService groupService,MetricsTimer metricsTimer,GroupContentKey groupContentKey,GroupContentKeySet groupInProcess){
  this.curator=curator;
  this.queueProvider=queueProvider;
  this.groupService=groupService;
  this.metricsTimer=metricsTimer;
  this.groupContentKey=groupContentKey;
  this.groupInProcess=groupInProcess;
}

Fixed version (ground truth):
@Inject public GroupCaller(CuratorFramework curator,Provider<CallbackQueue> queueProvider,GroupService groupService,MetricsTimer metricsTimer,LastContentKey lastContentKey,GroupContentKeySet groupInProcess){
  this.curator=curator;
  this.queueProvider=queueProvider;
  this.groupService=groupService;
  this.metricsTimer=metricsTimer;
  this.lastContentKey=lastContentKey;
  this.groupInProcess=groupInProcess;
}
Program: 61792
Project: 61792
Buggy source:
private void delete(){
  logger.info("String_Node_Str" + group.getName());
  groupInProcess.delete(group.getName());
  groupContentKey.delete(group.getName());
  logger.info("String_Node_Str" + group.getName());
}

Fixed version (ground truth):
private void delete(){
  logger.info("String_Node_Str" + group.getName());
  groupInProcess.delete(group.getName());
  lastContentKey.delete(group.getName(),GROUP_LAST_COMPLETED);
  logger.info("String_Node_Str" + group.getName());
}
Program: 61793
Project: 61793
Buggy source:
@Override public void takeLeadership(AtomicBoolean hasLeadership){
  this.hasLeadership=hasLeadership;
  retryer=buildRetryer();
  logger.info("String_Node_Str" + group);
  Optional<Group> foundGroup=groupService.getGroup(group.getName());
  if (!foundGroup.isPresent()) {
    logger.info("String_Node_Str" + group.getName());
    return;
  }
  this.client=GroupClient.createClient();
  callbackQueue=queueProvider.get();
  try {
    ContentKey lastCompletedKey=groupContentKey.get(group.getName(),new ContentKey());
    logger.debug("String_Node_Str",lastCompletedKey,group.getName());
    if (hasLeadership.get()) {
      sendInProcess(lastCompletedKey);
      callbackQueue.start(group,lastCompletedKey);
      while (hasLeadership.get()) {
        Optional<ContentKey> nextOptional=callbackQueue.next();
        if (nextOptional.isPresent()) {
          send(nextOptional.get());
        }
      }
    }
  }
 catch (  RuntimeInterruptedException|InterruptedException e) {
    logger.info("String_Node_Str" + group.getName());
  }
 finally {
    logger.info("String_Node_Str" + group);
    closeQueue();
    if (deleteOnExit.get()) {
      delete();
    }
  }
}

Fixed version (ground truth):
@Override public void takeLeadership(AtomicBoolean hasLeadership){
  this.hasLeadership=hasLeadership;
  retryer=buildRetryer();
  logger.info("String_Node_Str" + group);
  Optional<Group> foundGroup=groupService.getGroup(group.getName());
  if (!foundGroup.isPresent()) {
    logger.info("String_Node_Str" + group.getName());
    return;
  }
  this.client=GroupClient.createClient();
  callbackQueue=queueProvider.get();
  try {
    ContentKey lastCompletedKey=lastContentKey.get(group.getName(),new ContentKey(),GROUP_LAST_COMPLETED);
    logger.debug("String_Node_Str",lastCompletedKey,group.getName());
    if (hasLeadership.get()) {
      sendInProcess(lastCompletedKey);
      callbackQueue.start(group,lastCompletedKey);
      while (hasLeadership.get()) {
        Optional<ContentKey> nextOptional=callbackQueue.next();
        if (nextOptional.isPresent()) {
          send(nextOptional.get());
        }
      }
    }
  }
 catch (  RuntimeInterruptedException|InterruptedException e) {
    logger.info("String_Node_Str" + group.getName());
  }
 finally {
    logger.info("String_Node_Str" + group);
    closeQueue();
    if (deleteOnExit.get()) {
      delete();
    }
  }
}
Program: 61794
Project: 61794
Buggy source:
public ContentKey getLastCompleted(){
  return groupContentKey.get(group.getName(),ContentKey.NONE);
}

Fixed version (ground truth):
public ContentKey getLastCompleted(){
  return lastContentKey.get(group.getName(),ContentKey.NONE,GROUP_LAST_COMPLETED);
}
Program: 61795
Project: 61795
Buggy source:
private void send(ContentKey key) throws InterruptedException {
  logger.trace("String_Node_Str",key,group.getName());
  semaphore.acquire();
  executorService.submit(new Callable<Object>(){
    @Override public Object call() throws Exception {
      groupInProcess.add(group.getName(),key);
      try {
        makeTimedCall(createResponse(key));
        groupContentKey.updateIncrease(key,group.getName());
        groupInProcess.remove(group.getName(),key);
        logger.trace("String_Node_Str",key,group.getName());
      }
 catch (      Exception e) {
        logger.warn("String_Node_Str" + key + "String_Node_Str"+ group.getName(),e);
      }
 finally {
        semaphore.release();
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
private void send(ContentKey key) throws InterruptedException {
  logger.trace("String_Node_Str",key,group.getName());
  semaphore.acquire();
  executorService.submit(new Callable<Object>(){
    @Override public Object call() throws Exception {
      groupInProcess.add(group.getName(),key);
      try {
        makeTimedCall(createResponse(key));
        lastContentKey.updateIncrease(key,group.getName(),GROUP_LAST_COMPLETED);
        groupInProcess.remove(group.getName(),key);
        logger.trace("String_Node_Str",key,group.getName());
      }
 catch (      Exception e) {
        logger.warn("String_Node_Str" + key + "String_Node_Str"+ group.getName(),e);
      }
 finally {
        semaphore.release();
      }
      return null;
    }
  }
);
}
Program: 61796
Project: 61796
Buggy source:
public Optional<Group> upsertGroup(Group group){
  logger.info("String_Node_Str" + group);
  group=group.withDefaults();
  groupValidator.validate(group);
  Optional<Group> existingGroup=getGroup(group.getName());
  if (existingGroup.isPresent()) {
    if (existingGroup.get().equals(group)) {
      return existingGroup;
    }
    throw new ConflictException("String_Node_Str");
  }
  groupContentKey.initialize(group.getName(),group.getStartingKey());
  dynamoGroupDao.upsertGroup(group);
  groupCallback.notifyWatchers();
  return existingGroup;
}

Fixed version (ground truth):
public Optional<Group> upsertGroup(Group group){
  logger.info("String_Node_Str" + group);
  group=group.withDefaults();
  groupValidator.validate(group);
  Optional<Group> existingGroup=getGroup(group.getName());
  if (existingGroup.isPresent()) {
    if (existingGroup.get().equals(group)) {
      return existingGroup;
    }
    throw new ConflictException("String_Node_Str");
  }
  lastContentKey.initialize(group.getName(),group.getStartingKey(),GroupCaller.GROUP_LAST_COMPLETED);
  dynamoGroupDao.upsertGroup(group);
  groupCallback.notifyWatchers();
  return existingGroup;
}
Program: 61797
Project: 61797
Buggy source:
@Inject public GroupService(DynamoGroupDao dynamoGroupDao,GroupValidator groupValidator,GroupCallback groupCallback,GroupContentKey groupContentKey){
  this.dynamoGroupDao=dynamoGroupDao;
  this.groupValidator=groupValidator;
  this.groupCallback=groupCallback;
  this.groupContentKey=groupContentKey;
}

Fixed version (ground truth):
@Inject public GroupService(DynamoGroupDao dynamoGroupDao,GroupValidator groupValidator,GroupCallback groupCallback,LastContentKey lastContentKey){
  this.dynamoGroupDao=dynamoGroupDao;
  this.groupValidator=groupValidator;
  this.groupCallback=groupCallback;
  this.lastContentKey=lastContentKey;
}
Program: 61798
Project: 61798
Buggy source:
@Inject public V1ChannelReplicator(ChannelService channelService,ChannelUtils channelUtils,SequenceIteratorFactory sequenceIteratorFactory,SequenceFinder sequenceFinder,CuratorFramework curator){
  this.channelService=channelService;
  this.sequenceIteratorFactory=sequenceIteratorFactory;
  this.channelUtils=channelUtils;
  this.sequenceFinder=sequenceFinder;
  this.curator=curator;
}

Fixed version (ground truth):
@Inject public V1ChannelReplicator(ChannelService channelService,ChannelUtils channelUtils,SequenceIteratorFactory sequenceIteratorFactory,SequenceFinder sequenceFinder,CuratorFramework curator,LastContentKey lastContentKey){
  this.channelService=channelService;
  this.sequenceIteratorFactory=sequenceIteratorFactory;
  this.channelUtils=channelUtils;
  this.sequenceFinder=sequenceFinder;
  this.curator=curator;
  this.lastContentKey=lastContentKey;
}
Program: 61799
Project: 61799
Buggy source:
private void replicate(AtomicBoolean hasLeadership){
  long sequence=getLastUpdated();
  if (sequence == ChannelUtils.NOT_FOUND) {
    return;
  }
  logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str"+ sequence);
  iterator=sequenceIteratorFactory.create(sequence,channel);
  long lastReplicated=0;
  try {
    while (iterator.hasNext() && hasLeadership.get()) {
      Optional<Content> optionalContent=iterator.next();
      if (optionalContent.isPresent()) {
        Content content=optionalContent.get();
        ContentKey key=content.getContentKey().get();
        if (key.getMillis() < lastReplicated) {
          key=new ContentKey(new DateTime(lastReplicated),key.getHash());
          content.setContentKey(key);
        }
        channelService.insert(channel.getName(),content);
        lastReplicated=key.getMillis();
      }
 else {
        logger.warn("String_Node_Str" + channel.getUrl());
      }
    }
  }
  finally {
    logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str");
    closeIterator();
  }
}

Fixed version (ground truth):
private void replicate(AtomicBoolean hasLeadership){
  long sequence=getLastUpdated();
  if (sequence == ChannelUtils.NOT_FOUND) {
    return;
  }
  logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str"+ sequence);
  iterator=sequenceIteratorFactory.create(sequence,channel);
  try {
    while (iterator.hasNext() && hasLeadership.get()) {
      Optional<Content> optionalContent=iterator.next();
      if (optionalContent.isPresent()) {
        Content content=optionalContent.get();
        ContentKey nextKey=content.getContentKey().get();
        ContentKey lastCompletedKey=lastContentKey.get(channel.getName(),nextKey,V1_REPLICATE_LAST_COMPLETED);
        if (nextKey.compareTo(lastCompletedKey) < 0) {
          nextKey=new ContentKey(lastCompletedKey.getTime(),nextKey.getHash());
          content.setContentKey(nextKey);
        }
        channelService.insert(channel.getName(),content);
        lastContentKey.updateIncrease(nextKey,channel.getName(),V1_REPLICATE_LAST_COMPLETED);
      }
 else {
        logger.warn("String_Node_Str" + channel.getUrl());
      }
    }
  }
  finally {
    logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str");
    closeIterator();
  }
}
Program: 61801
Project: 61801
Buggy source:
@Inject public GroupCaller(CuratorFramework curator,Provider<CallbackQueue> queueProvider,GroupService groupService,MetricsTimer metricsTimer,GroupContentKey groupContentKey,GroupContentKeySet groupInProcess){
  this.curator=curator;
  this.queueProvider=queueProvider;
  this.groupService=groupService;
  this.metricsTimer=metricsTimer;
  this.groupContentKey=groupContentKey;
  this.groupInProcess=groupInProcess;
}

Fixed version (ground truth):
@Inject public GroupCaller(CuratorFramework curator,Provider<CallbackQueue> queueProvider,GroupService groupService,MetricsTimer metricsTimer,LastContentKey lastContentKey,GroupContentKeySet groupInProcess){
  this.curator=curator;
  this.queueProvider=queueProvider;
  this.groupService=groupService;
  this.metricsTimer=metricsTimer;
  this.lastContentKey=lastContentKey;
  this.groupInProcess=groupInProcess;
}
Program: 61802
Project: 61802
Buggy source:
private void delete(){
  logger.info("String_Node_Str" + group.getName());
  groupInProcess.delete(group.getName());
  groupContentKey.delete(group.getName());
  logger.info("String_Node_Str" + group.getName());
}

Fixed version (ground truth):
private void delete(){
  logger.info("String_Node_Str" + group.getName());
  groupInProcess.delete(group.getName());
  lastContentKey.delete(group.getName(),GROUP_LAST_COMPLETED);
  logger.info("String_Node_Str" + group.getName());
}
Program: 61803
Project: 61803
Buggy source:
@Override public void takeLeadership(AtomicBoolean hasLeadership){
  this.hasLeadership=hasLeadership;
  retryer=buildRetryer();
  logger.info("String_Node_Str" + group);
  Optional<Group> foundGroup=groupService.getGroup(group.getName());
  if (!foundGroup.isPresent()) {
    logger.info("String_Node_Str" + group.getName());
    return;
  }
  this.client=GroupClient.createClient();
  callbackQueue=queueProvider.get();
  try {
    ContentKey lastCompletedKey=groupContentKey.get(group.getName(),new ContentKey());
    logger.debug("String_Node_Str",lastCompletedKey,group.getName());
    if (hasLeadership.get()) {
      sendInProcess(lastCompletedKey);
      callbackQueue.start(group,lastCompletedKey);
      while (hasLeadership.get()) {
        Optional<ContentKey> nextOptional=callbackQueue.next();
        if (nextOptional.isPresent()) {
          send(nextOptional.get());
        }
      }
    }
  }
 catch (  RuntimeInterruptedException|InterruptedException e) {
    logger.info("String_Node_Str" + group.getName());
  }
 finally {
    logger.info("String_Node_Str" + group);
    closeQueue();
    if (deleteOnExit.get()) {
      delete();
    }
  }
}

Fixed version (ground truth):
@Override public void takeLeadership(AtomicBoolean hasLeadership){
  this.hasLeadership=hasLeadership;
  retryer=buildRetryer();
  logger.info("String_Node_Str" + group);
  Optional<Group> foundGroup=groupService.getGroup(group.getName());
  if (!foundGroup.isPresent()) {
    logger.info("String_Node_Str" + group.getName());
    return;
  }
  this.client=GroupClient.createClient();
  callbackQueue=queueProvider.get();
  try {
    ContentKey lastCompletedKey=lastContentKey.get(group.getName(),new ContentKey(),GROUP_LAST_COMPLETED);
    logger.debug("String_Node_Str",lastCompletedKey,group.getName());
    if (hasLeadership.get()) {
      sendInProcess(lastCompletedKey);
      callbackQueue.start(group,lastCompletedKey);
      while (hasLeadership.get()) {
        Optional<ContentKey> nextOptional=callbackQueue.next();
        if (nextOptional.isPresent()) {
          send(nextOptional.get());
        }
      }
    }
  }
 catch (  RuntimeInterruptedException|InterruptedException e) {
    logger.info("String_Node_Str" + group.getName());
  }
 finally {
    logger.info("String_Node_Str" + group);
    closeQueue();
    if (deleteOnExit.get()) {
      delete();
    }
  }
}
Program: 61804
Project: 61804
Buggy source:
public ContentKey getLastCompleted(){
  return groupContentKey.get(group.getName(),ContentKey.NONE);
}

Fixed version (ground truth):
public ContentKey getLastCompleted(){
  return lastContentKey.get(group.getName(),ContentKey.NONE,GROUP_LAST_COMPLETED);
}
Program: 61805
Project: 61805
Buggy source:
private void send(ContentKey key) throws InterruptedException {
  logger.trace("String_Node_Str",key,group.getName());
  semaphore.acquire();
  executorService.submit(new Callable<Object>(){
    @Override public Object call() throws Exception {
      groupInProcess.add(group.getName(),key);
      try {
        makeTimedCall(createResponse(key));
        groupContentKey.updateIncrease(key,group.getName());
        groupInProcess.remove(group.getName(),key);
        logger.trace("String_Node_Str",key,group.getName());
      }
 catch (      Exception e) {
        logger.warn("String_Node_Str" + key + "String_Node_Str"+ group.getName(),e);
      }
 finally {
        semaphore.release();
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
private void send(ContentKey key) throws InterruptedException {
  logger.trace("String_Node_Str",key,group.getName());
  semaphore.acquire();
  executorService.submit(new Callable<Object>(){
    @Override public Object call() throws Exception {
      groupInProcess.add(group.getName(),key);
      try {
        makeTimedCall(createResponse(key));
        lastContentKey.updateIncrease(key,group.getName(),GROUP_LAST_COMPLETED);
        groupInProcess.remove(group.getName(),key);
        logger.trace("String_Node_Str",key,group.getName());
      }
 catch (      Exception e) {
        logger.warn("String_Node_Str" + key + "String_Node_Str"+ group.getName(),e);
      }
 finally {
        semaphore.release();
      }
      return null;
    }
  }
);
}
Program: 61806
Project: 61806
Buggy source:
public Optional<Group> upsertGroup(Group group){
  logger.info("String_Node_Str" + group);
  group=group.withDefaults();
  groupValidator.validate(group);
  Optional<Group> existingGroup=getGroup(group.getName());
  if (existingGroup.isPresent()) {
    if (existingGroup.get().equals(group)) {
      return existingGroup;
    }
    throw new ConflictException("String_Node_Str");
  }
  groupContentKey.initialize(group.getName(),group.getStartingKey());
  dynamoGroupDao.upsertGroup(group);
  groupCallback.notifyWatchers();
  return existingGroup;
}

Fixed version (ground truth):
public Optional<Group> upsertGroup(Group group){
  logger.info("String_Node_Str" + group);
  group=group.withDefaults();
  groupValidator.validate(group);
  Optional<Group> existingGroup=getGroup(group.getName());
  if (existingGroup.isPresent()) {
    if (existingGroup.get().equals(group)) {
      return existingGroup;
    }
    throw new ConflictException("String_Node_Str");
  }
  lastContentKey.initialize(group.getName(),group.getStartingKey(),GroupCaller.GROUP_LAST_COMPLETED);
  dynamoGroupDao.upsertGroup(group);
  groupCallback.notifyWatchers();
  return existingGroup;
}
Program: 61807
Project: 61807
Buggy source:
@Inject public GroupService(DynamoGroupDao dynamoGroupDao,GroupValidator groupValidator,GroupCallback groupCallback,GroupContentKey groupContentKey){
  this.dynamoGroupDao=dynamoGroupDao;
  this.groupValidator=groupValidator;
  this.groupCallback=groupCallback;
  this.groupContentKey=groupContentKey;
}

Fixed version (ground truth):
@Inject public GroupService(DynamoGroupDao dynamoGroupDao,GroupValidator groupValidator,GroupCallback groupCallback,LastContentKey lastContentKey){
  this.dynamoGroupDao=dynamoGroupDao;
  this.groupValidator=groupValidator;
  this.groupCallback=groupCallback;
  this.lastContentKey=lastContentKey;
}
Program: 61808
Project: 61808
Buggy source:
@Inject public V1ChannelReplicator(ChannelService channelService,ChannelUtils channelUtils,SequenceIteratorFactory sequenceIteratorFactory,SequenceFinder sequenceFinder,CuratorFramework curator){
  this.channelService=channelService;
  this.sequenceIteratorFactory=sequenceIteratorFactory;
  this.channelUtils=channelUtils;
  this.sequenceFinder=sequenceFinder;
  this.curator=curator;
}

Fixed version (ground truth):
@Inject public V1ChannelReplicator(ChannelService channelService,ChannelUtils channelUtils,SequenceIteratorFactory sequenceIteratorFactory,SequenceFinder sequenceFinder,CuratorFramework curator,LastContentKey lastContentKey){
  this.channelService=channelService;
  this.sequenceIteratorFactory=sequenceIteratorFactory;
  this.channelUtils=channelUtils;
  this.sequenceFinder=sequenceFinder;
  this.curator=curator;
  this.lastContentKey=lastContentKey;
}
Program: 61809
Project: 61809
Buggy source:
private void replicate(AtomicBoolean hasLeadership){
  long sequence=getLastUpdated();
  if (sequence == ChannelUtils.NOT_FOUND) {
    return;
  }
  logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str"+ sequence);
  iterator=sequenceIteratorFactory.create(sequence,channel);
  long lastReplicated=0;
  try {
    while (iterator.hasNext() && hasLeadership.get()) {
      Optional<Content> optionalContent=iterator.next();
      if (optionalContent.isPresent()) {
        Content content=optionalContent.get();
        ContentKey key=content.getContentKey().get();
        if (key.getMillis() < lastReplicated) {
          key=new ContentKey(new DateTime(lastReplicated),key.getHash());
          content.setContentKey(key);
        }
        channelService.insert(channel.getName(),content);
        lastReplicated=key.getMillis();
      }
 else {
        logger.warn("String_Node_Str" + channel.getUrl());
      }
    }
  }
  finally {
    logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str");
    closeIterator();
  }
}

Fixed version (ground truth):
private void replicate(AtomicBoolean hasLeadership){
  long sequence=getLastUpdated();
  if (sequence == ChannelUtils.NOT_FOUND) {
    return;
  }
  logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str"+ sequence);
  iterator=sequenceIteratorFactory.create(sequence,channel);
  try {
    while (iterator.hasNext() && hasLeadership.get()) {
      Optional<Content> optionalContent=iterator.next();
      if (optionalContent.isPresent()) {
        Content content=optionalContent.get();
        ContentKey nextKey=content.getContentKey().get();
        ContentKey lastCompletedKey=lastContentKey.get(channel.getName(),nextKey,V1_REPLICATE_LAST_COMPLETED);
        if (nextKey.compareTo(lastCompletedKey) < 0) {
          nextKey=new ContentKey(lastCompletedKey.getTime(),nextKey.getHash());
          content.setContentKey(nextKey);
        }
        channelService.insert(channel.getName(),content);
        lastContentKey.updateIncrease(nextKey,channel.getName(),V1_REPLICATE_LAST_COMPLETED);
      }
 else {
        logger.warn("String_Node_Str" + channel.getUrl());
      }
    }
  }
  finally {
    logger.info("String_Node_Str" + channel.getUrl() + "String_Node_Str");
    closeIterator();
  }
}
Program: 61811
Project: 61811
Buggy source:
@Inject public GroupCaller(CuratorFramework curator,Provider<CallbackQueue> queueProvider,GroupService groupService,MetricsTimer metricsTimer,GroupContentKey groupContentKey,GroupContentKeySet groupInProcess){
  this.curator=curator;
  this.queueProvider=queueProvider;
  this.groupService=groupService;
  this.metricsTimer=metricsTimer;
  this.groupContentKey=groupContentKey;
  this.groupInProcess=groupInProcess;
}

Fixed version (ground truth):
@Inject public GroupCaller(CuratorFramework curator,Provider<CallbackQueue> queueProvider,GroupService groupService,MetricsTimer metricsTimer,LastContentKey lastContentKey,GroupContentKeySet groupInProcess){
  this.curator=curator;
  this.queueProvider=queueProvider;
  this.groupService=groupService;
  this.metricsTimer=metricsTimer;
  this.lastContentKey=lastContentKey;
  this.groupInProcess=groupInProcess;
}
Program: 61812
Project: 61812
Buggy source:
private void delete(){
  logger.info("String_Node_Str" + group.getName());
  groupInProcess.delete(group.getName());
  groupContentKey.delete(group.getName());
  logger.info("String_Node_Str" + group.getName());
}

Fixed version (ground truth):
private void delete(){
  logger.info("String_Node_Str" + group.getName());
  groupInProcess.delete(group.getName());
  lastContentKey.delete(group.getName(),GROUP_LAST_COMPLETED);
  logger.info("String_Node_Str" + group.getName());
}
Program: 61813
Project: 61813
Buggy source:
@Override public void takeLeadership(AtomicBoolean hasLeadership){
  this.hasLeadership=hasLeadership;
  retryer=buildRetryer();
  logger.info("String_Node_Str" + group);
  Optional<Group> foundGroup=groupService.getGroup(group.getName());
  if (!foundGroup.isPresent()) {
    logger.info("String_Node_Str" + group.getName());
    return;
  }
  this.client=GroupClient.createClient();
  callbackQueue=queueProvider.get();
  try {
    ContentKey lastCompletedKey=groupContentKey.get(group.getName(),new ContentKey());
    logger.debug("String_Node_Str",lastCompletedKey,group.getName());
    if (hasLeadership.get()) {
      sendInProcess(lastCompletedKey);
      callbackQueue.start(group,lastCompletedKey);
      while (hasLeadership.get()) {
        Optional<ContentKey> nextOptional=callbackQueue.next();
        if (nextOptional.isPresent()) {
          send(nextOptional.get());
        }
      }
    }
  }
 catch (  RuntimeInterruptedException|InterruptedException e) {
    logger.info("String_Node_Str" + group.getName());
  }
 finally {
    logger.info("String_Node_Str" + group);
    closeQueue();
    if (deleteOnExit.get()) {
      delete();
    }
  }
}

Fixed version (ground truth):
@Override public void takeLeadership(AtomicBoolean hasLeadership){
  this.hasLeadership=hasLeadership;
  retryer=buildRetryer();
  logger.info("String_Node_Str" + group);
  Optional<Group> foundGroup=groupService.getGroup(group.getName());
  if (!foundGroup.isPresent()) {
    logger.info("String_Node_Str" + group.getName());
    return;
  }
  this.client=GroupClient.createClient();
  callbackQueue=queueProvider.get();
  try {
    ContentKey lastCompletedKey=lastContentKey.get(group.getName(),new ContentKey(),GROUP_LAST_COMPLETED);
    logger.debug("String_Node_Str",lastCompletedKey,group.getName());
    if (hasLeadership.get()) {
      sendInProcess(lastCompletedKey);
      callbackQueue.start(group,lastCompletedKey);
      while (hasLeadership.get()) {
        Optional<ContentKey> nextOptional=callbackQueue.next();
        if (nextOptional.isPresent()) {
          send(nextOptional.get());
        }
      }
    }
  }
 catch (  RuntimeInterruptedException|InterruptedException e) {
    logger.info("String_Node_Str" + group.getName());
  }
 finally {
    logger.info("String_Node_Str" + group);
    closeQueue();
    if (deleteOnExit.get()) {
      delete();
    }
  }
}
Program: 61814
Project: 61814
Buggy source:
public ContentKey getLastCompleted(){
  return groupContentKey.get(group.getName(),ContentKey.NONE);
}

Fixed version (ground truth):
public ContentKey getLastCompleted(){
  return lastContentKey.get(group.getName(),ContentKey.NONE,GROUP_LAST_COMPLETED);
}
Program: 61815
Project: 61815
Buggy source:
private void send(ContentKey key) throws InterruptedException {
  logger.trace("String_Node_Str",key,group.getName());
  semaphore.acquire();
  executorService.submit(new Callable<Object>(){
    @Override public Object call() throws Exception {
      groupInProcess.add(group.getName(),key);
      try {
        makeTimedCall(createResponse(key));
        groupContentKey.updateIncrease(key,group.getName());
        groupInProcess.remove(group.getName(),key);
        logger.trace("String_Node_Str",key,group.getName());
      }
 catch (      Exception e) {
        logger.warn("String_Node_Str" + key + "String_Node_Str"+ group.getName(),e);
      }
 finally {
        semaphore.release();
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
private void send(ContentKey key) throws InterruptedException {
  logger.trace("String_Node_Str",key,group.getName());
  semaphore.acquire();
  executorService.submit(new Callable<Object>(){
    @Override public Object call() throws Exception {
      groupInProcess.add(group.getName(),key);
      try {
        makeTimedCall(createResponse(key));
        lastContentKey.updateIncrease(key,group.getName(),GROUP_LAST_COMPLETED);
        groupInProcess.remove(group.getName(),key);
        logger.trace("String_Node_Str",key,group.getName());
      }
 catch (      Exception e) {
        logger.warn("String_Node_Str" + key + "String_Node_Str"+ group.getName(),e);
      }
 finally {
        semaphore.release();
      }
      return null;
    }
  }
);
}
Program: 61816
Project: 61816
Buggy source:
public Optional<Group> upsertGroup(Group group){
  logger.info("String_Node_Str" + group);
  group=group.withDefaults();
  groupValidator.validate(group);
  Optional<Group> existingGroup=getGroup(group.getName());
  if (existingGroup.isPresent()) {
    if (existingGroup.get().equals(group)) {
      return existingGroup;
    }
    throw new ConflictException("String_Node_Str");
  }
  groupContentKey.initialize(group.getName(),group.getStartingKey());
  dynamoGroupDao.upsertGroup(group);
  groupCallback.notifyWatchers();
  return existingGroup;
}

Fixed version (ground truth):
public Optional<Group> upsertGroup(Group group){
  logger.info("String_Node_Str" + group);
  group=group.withDefaults();
  groupValidator.validate(group);
  Optional<Group> existingGroup=getGroup(group.getName());
  if (existingGroup.isPresent()) {
    if (existingGroup.get().equals(group)) {
      return existingGroup;
    }
    throw new ConflictException("String_Node_Str");
  }
  lastContentKey.initialize(group.getName(),group.getStartingKey(),GroupCaller.GROUP_LAST_COMPLETED);
  dynamoGroupDao.upsertGroup(group);
  groupCallback.notifyWatchers();
  return existingGroup;
}
Program: 61817
Project: 61817
Buggy source:
@Inject public GroupService(DynamoGroupDao dynamoGroupDao,GroupValidator groupValidator,GroupCallback groupCallback,GroupContentKey groupContentKey){
  this.dynamoGroupDao=dynamoGroupDao;
  this.groupValidator=groupValidator;
  this.groupCallback=groupCallback;
  this.groupContentKey=groupContentKey;
}

Fixed version (ground truth):
@Inject public GroupService(DynamoGroupDao dynamoGroupDao,GroupValidator groupValidator,GroupCallback groupCallback,LastContentKey lastContentKey){
  this.dynamoGroupDao=dynamoGroupDao;
  this.groupValidator=groupValidator;
  this.groupCallback=groupCallback;
  this.lastContentKey=lastContentKey;
}
Program: 61818
Project: 61818
Buggy source:
@Inject public V1ChannelReplicator(ChannelService channelService,ChannelUtils channelUtils,SequenceIteratorFactory sequenceIteratorFactory,SequenceFinder sequenceFinder,CuratorFramework curator){
  this.channelService=channelService;
  this.sequenceIteratorFactory=sequenceIteratorFactory;
  this.channelUtils=channelUtils;
  this.sequenceFinder=sequenceFinder;
  this.curator=curator;
}

Fixed version (ground truth):
@Inject public V1ChannelReplicator(ChannelService channelService,ChannelUtils channelUtils,SequenceIteratorFactory sequenceIteratorFactory,SequenceFinder sequenceFinder,CuratorFramework curator,LastContentKey lastContentKey){
  this.channelService=channelService;
  this.sequenceIteratorFactory=sequenceIteratorFactory;
  this.channelUtils=channelUtils;
  this.sequenceFinder=sequenceFinder;
  this.curator=curator;
  this.lastContentKey=lastContentKey;
}