nus-yam/ex-repair huggingface dataset:
Program: 55824
Project: 55824
Buggy source:
@Test public void testPactString(){
  PactString string0=new PactString("String_Node_Str");
  PactString string1=new PactString("String_Node_Str");
  PactString string2=new PactString("String_Node_Str");
  PactString string3=new PactString("String_Node_Str");
  PactString string4=new PactString("String_Node_Str");
  for (int length=5; length <= 15; length+=10) {
    assertNormalizableKey(string0,string1,length);
    assertNormalizableKey(string0,string2,length);
    assertNormalizableKey(string0,string3,length);
    assertNormalizableKey(string0,string4,length);
  }
  try {
    string0.write(mOut);
    string4.write(mOut);
    string2.write(mOut);
    string3.write(mOut);
    PactString string1n=new PactString();
    PactString string2n=new PactString();
    PactString string3n=new PactString();
    PactString string4n=new PactString();
    string1n.read(mIn);
    string4n.read(mIn);
    string2n.read(mIn);
    string3n.read(mIn);
    for (int length=5; length <= 15; length+=10) {
      assertNormalizableKey(string0,string1n,length);
      assertNormalizableKey(string0,string2n,length);
      assertNormalizableKey(string0,string3n,length);
      assertNormalizableKey(string0,string4n,length);
    }
    string2.setValue("String_Node_Str");
    assertNormalizableKey(string2,string3,32);
  }
 catch (  Exception e) {
    Assert.assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void testPactString(){
  PactString string0=new PactString("String_Node_Str");
  PactString string1=new PactString("String_Node_Str");
  PactString string2=new PactString("String_Node_Str");
  PactString string3=new PactString("String_Node_Str");
  PactString string4=new PactString("String_Node_Str");
  for (int length=5; length <= 15; length+=10) {
    assertNormalizableKey(string0,string1,length);
    assertNormalizableKey(string0,string2,length);
    assertNormalizableKey(string0,string3,length);
    assertNormalizableKey(string0,string4,length);
  }
}
Program: 55825
Project: 55825
Buggy source:
@Test public void testPactInteger(){
  PactInteger int0=new PactInteger(10);
  Assert.assertEquals(10,int0.getValue());
  PactInteger int1=new PactInteger(10);
  PactInteger int2=new PactInteger(-10);
  PactInteger int3=new PactInteger(255);
  for (int length=2; length <= 4; length++) {
    assertNormalizableKey(int0,int1,length);
    assertNormalizableKey(int0,int2,length);
    assertNormalizableKey(int0,int3,length);
  }
  try {
    int0.write(mOut);
    int2.write(mOut);
    int3.write(mOut);
    PactInteger int1n=new PactInteger();
    PactInteger int2n=new PactInteger();
    PactInteger int3n=new PactInteger();
    int1n.read(mIn);
    int2n.read(mIn);
    int3n.read(mIn);
    for (int length=2; length <= 4; length++) {
      assertNormalizableKey(int0,int1n,length);
      assertNormalizableKey(int0,int2n,length);
      assertNormalizableKey(int0,int3n,length);
    }
  }
 catch (  Exception e) {
    Assert.fail(e.getMessage());
  }
}

Fixed version (ground truth):
@Test public void testPactInteger(){
  PactInteger int0=new PactInteger(10);
  PactInteger int1=new PactInteger(10);
  PactInteger int2=new PactInteger(-10);
  PactInteger int3=new PactInteger(255);
  PactInteger int4=new PactInteger(Integer.MAX_VALUE);
  PactInteger int5=new PactInteger(Integer.MAX_VALUE & 0xff800000);
  PactInteger int6=new PactInteger(Integer.MIN_VALUE);
  PactInteger int7=new PactInteger(Integer.MIN_VALUE & 0xff800000);
  for (int length=2; length <= 4; length++) {
    assertNormalizableKey(int0,int1,length);
    assertNormalizableKey(int0,int2,length);
    assertNormalizableKey(int0,int3,length);
    assertNormalizableKey(int0,int4,length);
    assertNormalizableKey(int0,int5,length);
    assertNormalizableKey(int0,int6,length);
    assertNormalizableKey(int0,int7,length);
    assertNormalizableKey(int4,int5,length);
    assertNormalizableKey(int6,int7,length);
  }
}
Program: 55826
Project: 55826
Buggy source:
@Test public void testPactLong(){
  PactLong long0=new PactLong(10);
  Assert.assertEquals(10,long0.getValue());
  PactLong long1=new PactLong(10);
  PactLong long2=new PactLong(-10);
  PactLong long3=new PactLong(255);
  for (int length=2; length <= 8; length++) {
    assertNormalizableKey(long0,long1,length);
    assertNormalizableKey(long0,long2,length);
    assertNormalizableKey(long0,long3,length);
  }
  try {
    long0.write(mOut);
    long2.write(mOut);
    long3.write(mOut);
    PactLong long1n=new PactLong();
    PactLong long2n=new PactLong();
    PactLong long3n=new PactLong();
    long1n.read(mIn);
    long2n.read(mIn);
    long3n.read(mIn);
    for (int length=2; length <= 8; length++) {
      assertNormalizableKey(long0,long1n,length);
      assertNormalizableKey(long0,long2n,length);
      assertNormalizableKey(long0,long3n,length);
    }
  }
 catch (  Exception e) {
    Assert.fail(e.getMessage());
  }
}

Fixed version (ground truth):
@Test public void testPactLong(){
  PactLong long0=new PactLong(10);
  PactLong long1=new PactLong(10);
  PactLong long2=new PactLong(-10);
  PactLong long3=new PactLong(255);
  PactLong long4=new PactLong(Long.MAX_VALUE);
  PactLong long5=new PactLong(Long.MAX_VALUE & 0xff80000000000000L);
  PactLong long6=new PactLong(Long.MIN_VALUE);
  PactLong long7=new PactLong(Long.MIN_VALUE & 0xff80000000000000L);
  for (int length=2; length <= 8; length++) {
    assertNormalizableKey(long0,long1,length);
    assertNormalizableKey(long0,long2,length);
    assertNormalizableKey(long0,long3,length);
    assertNormalizableKey(long0,long4,length);
    assertNormalizableKey(long0,long5,length);
    assertNormalizableKey(long0,long6,length);
    assertNormalizableKey(long0,long7,length);
    assertNormalizableKey(long4,long5,length);
    assertNormalizableKey(long6,long7,length);
  }
}
Program: 55827
Project: 55827
Buggy source:
private void assertNormalizableKey(Key key1,Key key2,int len){
  byte[] normalizedKeys=new byte[2 * len];
  ((NormalizableKey)key1).copyNormalizedKey(normalizedKeys,0,len);
  ((NormalizableKey)key2).copyNormalizedKey(normalizedKeys,len,len);
  for (int i=0; i < len; i++) {
    int comp;
    if ((comp=(normalizedKeys[i] - normalizedKeys[len + i])) != 0) {
      if (Math.signum(key1.compareTo(key2)) != Math.signum(comp)) {
        Assert.fail("String_Node_Str");
      }
      return;
    }
  }
  if (key1.compareTo(key2) != 0 && ((NormalizableKey)key1).getMaxNormalizedKeyLen() <= len) {
    Assert.fail("String_Node_Str" + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void assertNormalizableKey(NormalizableKey key1,NormalizableKey key2,int len){
  byte[] normalizedKeys=new byte[2 * len];
  key1.copyNormalizedKey(normalizedKeys,0,len);
  key2.copyNormalizedKey(normalizedKeys,len,len);
  for (int i=0; i < len; i++) {
    int comp;
    int normKey1=normalizedKeys[i] & 0xFF;
    int normKey2=normalizedKeys[len + i] & 0xFF;
    if ((comp=(normKey1 - normKey2)) != 0) {
      if (Math.signum(key1.compareTo(key2)) != Math.signum(comp)) {
        Assert.fail("String_Node_Str");
      }
      return;
    }
  }
  if (key1.compareTo(key2) != 0 && key1.getMaxNormalizedKeyLen() <= len) {
    Assert.fail("String_Node_Str" + "String_Node_Str");
  }
}
Program: 55828
Project: 55828
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void allocatedResourcesDied(final JobID jobID,final List<AllocatedResource> allocatedResources){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void allocatedResourcesDied(final JobID jobID,final List<AllocatedResource> allocatedResources){
  for (  final AllocatedResource allocatedResource : allocatedResources) {
    LOG.info("String_Node_Str" + allocatedResource.getInstance().getName() + "String_Node_Str"+ jobID+ "String_Node_Str");
    ExecutionGraph job=this.jobQueue.getFirst();
synchronized (job) {
      Iterator<ExecutionGraph> iterator=this.jobQueue.descendingIterator();
      while (job.getJobID() != jobID) {
        if (iterator.hasNext()) {
          job=iterator.next();
        }
 else {
          LOG.error("String_Node_Str" + jobID + "String_Node_Str");
          return;
        }
      }
      List<ExecutionVertex> vertices=job.getVerticesAssignedToResource(allocatedResource);
      Iterator<ExecutionVertex> vertexIter=vertices.iterator();
      while (vertexIter.hasNext()) {
        ExecutionVertex vertex=vertexIter.next();
        vertex.updateExecutionState(ExecutionState.FAILED,"String_Node_Str" + allocatedResource.getInstance().getName() + "String_Node_Str"+ vertex.getEnvironment().getTaskName()+ "String_Node_Str");
        if (vertex.getExecutionState() == ExecutionState.FAILED) {
          job.executionStateChanged(jobID,vertex.getID(),ExecutionState.FAILED,"String_Node_Str" + allocatedResource.getInstance().getName() + "String_Node_Str"+ vertex.getEnvironment().getTaskName()+ "String_Node_Str");
          return;
        }
        vertex.setAllocatedResource(new AllocatedResource(DummyInstance.createDummyInstance(allocatedResource.getInstanceType()),allocatedResource.getInstanceType(),null));
      }
      try {
        LOG.info("String_Node_Str" + allocatedResource.getInstanceType().getIdentifier());
        final InstanceRequestMap instanceMap=new InstanceRequestMap();
        instanceMap.setMaximumNumberOfInstances(allocatedResource.getInstanceType(),1);
        instanceMap.setMinimumNumberOfInstances(allocatedResource.getInstanceType(),1);
        this.getInstanceManager().requestInstance(jobID,job.getJobConfiguration(),instanceMap,null);
      }
 catch (      InstanceException e) {
        e.printStackTrace();
      }
      job.executionStateChanged(jobID,vertices.get(0).getID(),ExecutionState.RECOVERING,null);
    }
  }
}
Program: 55829
Project: 55829
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public synchronized void executionStateChanged(final JobID jobID,final ExecutionVertexID vertexID,final ExecutionState newExecutionState,String optionalMessage){
  final InternalJobStatus oldStatus=this.jobStatus;
  checkAndUpdateJobStatus(newExecutionState);
  if (newExecutionState == ExecutionState.FINISHED) {
    if (this.isCurrentStageCompleted()) {
      ++this.indexToCurrentExecutionStage;
      if (this.indexToCurrentExecutionStage < this.stages.size()) {
        final Iterator<ExecutionStageListener> it=this.executionStageListeners.iterator();
        final ExecutionStage nextExecutionStage=getCurrentExecutionStage();
        while (it.hasNext()) {
          it.next().nextExecutionStageEntered(jobID,nextExecutionStage);
        }
      }
    }
  }
  if (this.jobStatus != oldStatus) {
    if (this.jobStatus == InternalJobStatus.FAILING) {
      this.errorDescription=optionalMessage;
    }
    if (this.jobStatus == InternalJobStatus.FAILED) {
      optionalMessage=this.errorDescription;
    }
    final Iterator<JobStatusListener> it=this.jobStatusListeners.iterator();
    while (it.hasNext()) {
      it.next().jobStatusHasChanged(this,this.jobStatus,optionalMessage);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public synchronized void executionStateChanged(final JobID jobID,final ExecutionVertexID vertexID,final ExecutionState newExecutionState,String optionalMessage){
  final InternalJobStatus oldStatus=this.jobStatus;
  if (newExecutionState == ExecutionState.RERUNNING) {
    this.recovering.remove(getVertexByID(vertexID));
  }
  checkAndUpdateJobStatus(newExecutionState);
  if (newExecutionState == ExecutionState.FINISHED) {
    if (this.isCurrentStageCompleted()) {
      ++this.indexToCurrentExecutionStage;
      if (this.indexToCurrentExecutionStage < this.stages.size()) {
        final Iterator<ExecutionStageListener> it=this.executionStageListeners.iterator();
        final ExecutionStage nextExecutionStage=getCurrentExecutionStage();
        while (it.hasNext()) {
          it.next().nextExecutionStageEntered(jobID,nextExecutionStage);
        }
      }
    }
  }
  if (this.jobStatus == InternalJobStatus.RECOVERING) {
    LOG.info("String_Node_Str");
    this.recovering.add(this.getVertexByID(vertexID));
  }
  if (this.jobStatus != oldStatus) {
    if (this.jobStatus == InternalJobStatus.FAILING) {
      this.errorDescription=optionalMessage;
    }
    if (this.jobStatus == InternalJobStatus.FAILED) {
      optionalMessage=this.errorDescription;
    }
    final Iterator<JobStatusListener> it=this.jobStatusListeners.iterator();
    while (it.hasNext()) {
      it.next().jobStatusHasChanged(this,this.jobStatus,optionalMessage);
    }
  }
}
Program: 55831
Project: 55831
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void jobStatusHasChanged(final ExecutionGraph executionGraph,final InternalJobStatus newJobStatus,final String optionalMessage){
synchronized (executionGraph) {
    LOG.info("String_Node_Str" + executionGraph.getJobName() + "String_Node_Str"+ executionGraph.getJobID()+ "String_Node_Str"+ "String_Node_Str"+ newJobStatus);
  }
  if (newJobStatus == InternalJobStatus.CANCELING || newJobStatus == InternalJobStatus.FAILING) {
    cancelJob(executionGraph);
  }
  if (newJobStatus == InternalJobStatus.FINISHED) {
    removeAllCheckpoints(executionGraph);
  }
  if (newJobStatus == InternalJobStatus.CANCELED || newJobStatus == InternalJobStatus.FAILED || newJobStatus == InternalJobStatus.FINISHED) {
    unregisterJob(executionGraph);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void jobStatusHasChanged(final ExecutionGraph executionGraph,final InternalJobStatus newJobStatus,final String optionalMessage){
synchronized (executionGraph) {
    LOG.info("String_Node_Str" + executionGraph.getJobName() + "String_Node_Str"+ executionGraph.getJobID()+ "String_Node_Str"+ "String_Node_Str"+ newJobStatus);
  }
  if (newJobStatus == InternalJobStatus.CANCELING || newJobStatus == InternalJobStatus.FAILING) {
    cancelJob(executionGraph);
  }
  if (newJobStatus == InternalJobStatus.FINISHED) {
    removeAllCheckpoints(executionGraph);
  }
  if (newJobStatus == InternalJobStatus.CANCELED || newJobStatus == InternalJobStatus.FAILED || newJobStatus == InternalJobStatus.FINISHED) {
    unregisterJob(executionGraph);
  }
  if (newJobStatus == InternalJobStatus.RECOVERING) {
    try {
      RecoveryThread recoverythread=new RecoveryThread(executionGraph,this);
      recoverythread.start();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 55832
Project: 55832
Buggy source:
private List<ExecutionVertex> findFollowers(ExecutionVertex vertex,ArrayList<ExecutionVertex> restart){
  ArrayList<ExecutionVertex> follower=new ArrayList<ExecutionVertex>();
  for (int i=0; i < vertex.getNumberOfSuccessors(); i++) {
    ExecutionVertex successor=vertex.getSuccessor(i);
    if (!restart.contains(successor)) {
      follower.add(successor);
      if (successor.getCheckpointState() == CheckpointState.COMPLETE) {
        this.checkpoints.remove(successor);
        final List<ExecutionVertexID> checkpointsToRemove=new ArrayList<ExecutionVertexID>();
        checkpointsToRemove.add(successor.getID());
        try {
          successor.getAllocatedResource().getInstance().removeCheckpoints(checkpointsToRemove);
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
  return follower;
}

Fixed version (ground truth):
private List<ExecutionVertex> findFollowers(ExecutionVertex vertex,ArrayList<ExecutionVertex> restart){
  ArrayList<ExecutionVertex> follower=new ArrayList<ExecutionVertex>();
  for (int i=0; i < vertex.getNumberOfSuccessors(); i++) {
    ExecutionVertex successor=vertex.getSuccessor(i);
    if (!restart.contains(successor)) {
      follower.add(successor);
      if (successor.getCheckpointState() == CheckpointState.PARTIAL) {
        this.checkpoints.remove(successor);
        final List<ExecutionVertexID> checkpointsToRemove=new ArrayList<ExecutionVertexID>();
        checkpointsToRemove.add(successor.getID());
        try {
          successor.getAllocatedResource().getInstance().removeCheckpoints(checkpointsToRemove);
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
  return follower;
}
Program: 55834
Project: 55834
Buggy source:
void executionStateChanged(final JobID jobID,final ExecutionVertexID id,final Task task,final ExecutionState newExecutionState,final String optionalDescription){
  if (newExecutionState == ExecutionState.RUNNING) {
synchronized (this.runningTasks) {
      this.runningTasks.put(id,task);
    }
  }
  if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED || newExecutionState == ExecutionState.FAILED) {
synchronized (this.runningTasks) {
      this.runningTasks.remove(id);
    }
    unregisterTask(id,task);
  }
synchronized (this.jobManager) {
    try {
      this.jobManager.updateTaskExecutionState(new TaskExecutionState(jobID,id,newExecutionState,optionalDescription));
    }
 catch (    IOException e) {
      LOG.error(StringUtils.stringifyException(e));
    }
  }
}

Fixed version (ground truth):
void executionStateChanged(final JobID jobID,final ExecutionVertexID id,final Task task,final ExecutionState newExecutionState,final String optionalDescription){
  if (newExecutionState == ExecutionState.RUNNING || newExecutionState == ExecutionState.RUNNING) {
synchronized (this.runningTasks) {
      this.runningTasks.put(id,task);
    }
  }
  if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED || newExecutionState == ExecutionState.FAILED) {
synchronized (this.runningTasks) {
      this.runningTasks.remove(id);
    }
    unregisterTask(id,task);
  }
synchronized (this.jobManager) {
    try {
      this.jobManager.updateTaskExecutionState(new TaskExecutionState(jobID,id,newExecutionState,optionalDescription));
    }
 catch (    IOException e) {
      LOG.error(StringUtils.stringifyException(e));
    }
  }
}
Program: 55835
Project: 55835
Buggy source:
/** 
 * Deserializes the next record from one of the data buffers.
 * @return the next record or <code>null</code> if all data buffers are exhausted
 * @throws ExecutionFailureException if the record cannot be deserialized
 */
private T deserializeNextRecord(final T target) throws IOException {
  if (this.bufferedRecord != null) {
    final T record=this.bufferedRecord;
    this.bufferedRecord=null;
    return record;
  }
  if (this.uncompressedDataBuffer == null) {
synchronized (this.synchronisationObject) {
      if (this.ioException != null) {
        throw this.ioException;
      }
      requestReadBuffersFromBroker();
    }
    if (this.uncompressedDataBuffer == null) {
      return null;
    }
    if (this.decompressor != null) {
      this.decompressor.decompress();
    }
  }
  final T nextRecord=this.deserializationBuffer.readData(target,this.uncompressedDataBuffer);
  if (this.uncompressedDataBuffer.remaining() == 0) {
    releasedConsumedReadBuffer();
    this.bufferedRecord=nextRecord;
    return null;
  }
  return nextRecord;
}

Fixed version (ground truth):
/** 
 * Deserializes the next record from one of the data buffers.
 * @return the next record or <code>null</code> if all data buffers are exhausted
 * @throws ExecutionFailureException if the record cannot be deserialized
 */
private T deserializeNextRecord(final T target) throws IOException {
  if (this.uncompressedDataBuffer == null) {
synchronized (this.synchronisationObject) {
      if (this.ioException != null) {
        throw this.ioException;
      }
      requestReadBuffersFromBroker();
    }
    if (this.uncompressedDataBuffer == null) {
      return null;
    }
    if (this.decompressor != null) {
      this.decompressor.decompress();
    }
  }
  final T nextRecord=this.deserializationBuffer.readData(target,this.uncompressedDataBuffer);
  if (this.uncompressedDataBuffer.remaining() == 0) {
    releasedConsumedReadBuffer();
  }
  return nextRecord;
}
Program: 55836
Project: 55836
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean isClosed() throws IOException {
  if (this.bufferedRecord != null || this.uncompressedDataBuffer != null) {
    return false;
  }
synchronized (this.synchronisationObject) {
    if (this.ioException != null) {
      throw this.ioException;
    }
    if (!this.brokerAggreedToCloseChannel) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean isClosed() throws IOException {
  if (this.uncompressedDataBuffer != null) {
    return false;
  }
synchronized (this.synchronisationObject) {
    if (this.ioException != null) {
      throw this.ioException;
    }
    if (!this.brokerAggreedToCloseChannel) {
      return false;
    }
  }
  return true;
}
Program: 55837
Project: 55837
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void close() throws IOException, InterruptedException {
  this.deserializationBuffer.clear();
  if (this.uncompressedDataBuffer != null) {
    releasedConsumedReadBuffer();
  }
  if (this.getType() == ChannelType.NETWORK) {
synchronized (this.synchronisationObject) {
      if (!this.brokerAggreedToCloseChannel) {
        while (!this.brokerAggreedToCloseChannel) {
          requestReadBuffersFromBroker();
          if (this.uncompressedDataBuffer != null || this.compressedDataBuffer != null) {
            releasedConsumedReadBuffer();
          }
          this.synchronisationObject.wait(500);
        }
        this.bufferedRecord=null;
      }
    }
  }
  final ChannelType type=getType();
  if (type == ChannelType.NETWORK || type == ChannelType.INMEMORY) {
    transferEvent(new ByteBufferedChannelCloseEvent());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void close() throws IOException, InterruptedException {
  this.deserializationBuffer.clear();
  if (this.uncompressedDataBuffer != null) {
    releasedConsumedReadBuffer();
  }
  if (this.getType() == ChannelType.NETWORK) {
synchronized (this.synchronisationObject) {
      if (!this.brokerAggreedToCloseChannel) {
        while (!this.brokerAggreedToCloseChannel) {
          requestReadBuffersFromBroker();
          if (this.uncompressedDataBuffer != null || this.compressedDataBuffer != null) {
            releasedConsumedReadBuffer();
          }
          this.synchronisationObject.wait(500);
        }
      }
    }
  }
  final ChannelType type=getType();
  if (type == ChannelType.NETWORK || type == ChannelType.INMEMORY) {
    transferEvent(new ByteBufferedChannelCloseEvent());
  }
}
Program: 55838
Project: 55838
Buggy source:
private List<ExecutionVertex> findFollowers(ExecutionVertex vertex,ArrayList<ExecutionVertex> restart){
  ArrayList<ExecutionVertex> follower=new ArrayList<ExecutionVertex>();
  for (int i=0; i < vertex.getNumberOfSuccessors(); i++) {
    ExecutionVertex successor=vertex.getSuccessor(i);
    if (!restart.contains(successor)) {
      follower.add(successor);
      if (successor.getCheckpointState() == CheckpointState.PARTIAL) {
        this.checkpoints.remove(successor);
        final List<ExecutionVertexID> checkpointsToRemove=new ArrayList<ExecutionVertexID>();
        checkpointsToRemove.add(successor.getID());
        try {
          successor.getAllocatedResource().getInstance().removeCheckpoints(checkpointsToRemove);
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
  return follower;
}

Fixed version (ground truth):
private List<ExecutionVertex> findFollowers(ExecutionVertex vertex,ArrayList<ExecutionVertex> restart){
  ArrayList<ExecutionVertex> follower=new ArrayList<ExecutionVertex>();
  for (int i=0; i < vertex.getNumberOfSuccessors(); i++) {
    ExecutionVertex successor=vertex.getSuccessor(i);
    if (!restart.contains(successor)) {
      follower.add(successor);
      if (successor.getCheckpointState() == CheckpointState.PARTIAL) {
        this.checkpoints.remove(successor);
        this.globalConsistentCheckpoint.remove(successor.getID());
        final SerializableArrayList<ExecutionVertexID> checkpointsToRemove=new SerializableArrayList<ExecutionVertexID>();
        checkpointsToRemove.add(successor.getID());
        try {
          successor.getAllocatedResource().getInstance().removeCheckpoints(checkpointsToRemove);
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
  }
  return follower;
}
Program: 55839
Project: 55839
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void run(){
  if (this.failedVertices.isEmpty()) {
    LOG.error("String_Node_Str");
  }
  Iterator<ExecutionVertex> vertexIter=this.failedVertices.iterator();
  while (vertexIter.hasNext()) {
    ExecutionVertex failed=vertexIter.next();
    LOG.info("String_Node_Str" + failed);
    List<ExecutionVertex> restart=findRestarts(failed);
    Iterator<ExecutionVertex> restartIterator=restart.iterator();
    while (restartIterator.hasNext()) {
      ExecutionVertex vertex=restartIterator.next();
      if (!vertex.equals(failed)) {
        LOG.info("String_Node_Str" + vertex.getName());
        final List<ExecutionVertexID> checkpointsToReplay=new ArrayList<ExecutionVertexID>();
        checkpointsToReplay.add(vertex.getID());
        try {
          vertex.getAllocatedResource().getInstance().replayCheckpoints(checkpointsToReplay);
        }
 catch (        Exception e) {
          LOG.info("String_Node_Str" + StringUtils.stringifyException(e) + "String_Node_Str");
        }
      }
    }
    LOG.info("String_Node_Str" + failed);
  }
  this.job.executionStateChanged(this.job.getJobID(),null,ExecutionState.RERUNNING,null);
  LOG.info("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void run(){
  if (this.failedVertices.isEmpty()) {
    LOG.error("String_Node_Str");
  }
  List<CheckpointReplayResult> replayCheckpoints=new ArrayList();
  Iterator<ExecutionVertex> vertexIter=this.failedVertices.iterator();
  while (vertexIter.hasNext()) {
    ExecutionVertex failed=vertexIter.next();
    LOG.info("String_Node_Str" + failed);
    findRestarts(failed);
    Iterator<ExecutionVertexID> checkpointIterator=this.globalConsistentCheckpoint.iterator();
    while (checkpointIterator.hasNext()) {
      ExecutionVertexID checkpoint=checkpointIterator.next();
      AbstractInstance instance=job.getVertexByID(checkpoint).getAllocatedResource().getInstance();
      try {
        replayCheckpoints.addAll(instance.replayCheckpoints(this.globalConsistentCheckpoint));
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  for (  CheckpointReplayResult replayResult : replayCheckpoints) {
    if (replayResult.getReturnCode() == ReturnCode.ERROR) {
      LOG.info("String_Node_Str" + replayResult.getDescription());
      return;
    }
  }
  this.job.executionStateChanged(this.job.getJobID(),null,ExecutionState.RERUNNING,null);
  LOG.info("String_Node_Str");
}
Program: 55841
Project: 55841
Buggy source:
void executionStateChanged(final JobID jobID,final ExecutionVertexID id,final Task task,final ExecutionState newExecutionState,final String optionalDescription){
  if (newExecutionState == ExecutionState.RUNNING || newExecutionState == ExecutionState.RUNNING) {
synchronized (this.runningTasks) {
      this.runningTasks.put(id,task);
    }
  }
  if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED) {
synchronized (this.runningTasks) {
      this.runningTasks.remove(id);
    }
    unregisterTask(id,task);
  }
synchronized (this.jobManager) {
    try {
      this.jobManager.updateTaskExecutionState(new TaskExecutionState(jobID,id,newExecutionState,optionalDescription));
    }
 catch (    IOException e) {
      LOG.error(StringUtils.stringifyException(e));
    }
  }
}

Fixed version (ground truth):
void executionStateChanged(final JobID jobID,final ExecutionVertexID id,final Task task,final ExecutionState newExecutionState,final String optionalDescription){
  if (newExecutionState == ExecutionState.RUNNING || newExecutionState == ExecutionState.RUNNING) {
synchronized (this.runningTasks) {
      this.runningTasks.put(id,task);
    }
  }
  if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED) {
synchronized (this.runningTasks) {
      this.runningTasks.remove(id);
    }
    unregisterTask(id,task);
  }
  if (newExecutionState == ExecutionState.FAILED) {
    this.runningTasks.remove(id);
  }
synchronized (this.jobManager) {
    try {
      this.jobManager.updateTaskExecutionState(new TaskExecutionState(jobID,id,newExecutionState,optionalDescription));
    }
 catch (    IOException e) {
      LOG.error(StringUtils.stringifyException(e));
    }
  }
}
Program: 55842
Project: 55842
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public List<CheckpointReplayResult> replayCheckpoints(final List<ExecutionVertexID> vertexIDs) throws IOException {
  final List<CheckpointReplayResult> checkpointResultList=new SerializableArrayList<CheckpointReplayResult>();
  for (  final ExecutionVertexID vertexID : vertexIDs) {
    if (!this.checkpointManager.hasCompleteCheckpointAvailable(vertexID)) {
      if (this.checkpointManager.hasPartialCheckpointAvailable(vertexID)) {
synchronized (this.runningTasks) {
          if (!this.runningTasks.containsKey(vertexID)) {
            final CheckpointReplayResult result=new CheckpointReplayResult(vertexID,ReturnCode.ERROR);
            result.setDescription("String_Node_Str");
            checkpointResultList.add(result);
            continue;
          }
        }
      }
 else {
        final CheckpointReplayResult result=new CheckpointReplayResult(vertexID,ReturnCode.ERROR);
        result.setDescription("String_Node_Str");
        checkpointResultList.add(result);
        continue;
      }
    }
    this.checkpointManager.replayCheckpoint(vertexID);
    checkpointResultList.add(new CheckpointReplayResult(vertexID,ReturnCode.SUCCESS));
  }
  return checkpointResultList;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public SerializableArrayList<CheckpointReplayResult> replayCheckpoints(final List<ExecutionVertexID> vertexIDs) throws IOException {
  final SerializableArrayList<CheckpointReplayResult> checkpointResultList=new SerializableArrayList<CheckpointReplayResult>();
  for (  final ExecutionVertexID vertexID : vertexIDs) {
    if (!this.checkpointManager.hasCompleteCheckpointAvailable(vertexID)) {
      if (this.checkpointManager.hasPartialCheckpointAvailable(vertexID)) {
synchronized (this.runningTasks) {
          if (!this.runningTasks.containsKey(vertexID)) {
            final CheckpointReplayResult result=new CheckpointReplayResult(vertexID,ReturnCode.ERROR);
            result.setDescription("String_Node_Str");
            checkpointResultList.add(result);
            continue;
          }
        }
      }
 else {
        final CheckpointReplayResult result=new CheckpointReplayResult(vertexID,ReturnCode.ERROR);
        result.setDescription("String_Node_Str");
        checkpointResultList.add(result);
        continue;
      }
    }
    this.checkpointManager.replayCheckpoint(vertexID);
    checkpointResultList.add(new CheckpointReplayResult(vertexID,ReturnCode.SUCCESS));
  }
  return checkpointResultList;
}
Program: 55843
Project: 55843
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void processEnvelopeFromInputChannel(final TransferEnvelope transferEnvelope) throws IOException, InterruptedException {
  System.out.println("String_Node_Str");
  processEnvelope(transferEnvelope,false);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void processEnvelopeFromInputChannel(final TransferEnvelope transferEnvelope) throws IOException, InterruptedException {
  processEnvelope(transferEnvelope,false);
}
Program: 55844
Project: 55844
Buggy source:
private boolean processEnvelopeEnvelopeWithoutBuffer(final TransferEnvelope transferEnvelope,final TransferEnvelopeReceiverList receiverList){
  System.out.println("String_Node_Str" + transferEnvelope.getEventList().size());
  final Iterator<ChannelID> localIt=receiverList.getLocalReceivers().iterator();
  while (localIt.hasNext()) {
    final ChannelID localReceiver=localIt.next();
    final ChannelContext channelContext=this.registeredChannels.get(localReceiver);
    if (channelContext == null) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("String_Node_Str" + localReceiver + "String_Node_Str"+ transferEnvelope.getJobID());
      }
      continue;
    }
    channelContext.queueTransferEnvelope(transferEnvelope);
  }
  final Iterator<InetSocketAddress> remoteIt=receiverList.getRemoteReceivers().iterator();
  while (remoteIt.hasNext()) {
    final InetSocketAddress remoteReceiver=remoteIt.next();
    this.networkConnectionManager.queueEnvelopeForTransfer(remoteReceiver,transferEnvelope);
  }
  return true;
}

Fixed version (ground truth):
private boolean processEnvelopeEnvelopeWithoutBuffer(final TransferEnvelope transferEnvelope,final TransferEnvelopeReceiverList receiverList){
  final Iterator<ChannelID> localIt=receiverList.getLocalReceivers().iterator();
  while (localIt.hasNext()) {
    final ChannelID localReceiver=localIt.next();
    final ChannelContext channelContext=this.registeredChannels.get(localReceiver);
    if (channelContext == null) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("String_Node_Str" + localReceiver + "String_Node_Str"+ transferEnvelope.getJobID());
      }
      continue;
    }
    channelContext.queueTransferEnvelope(transferEnvelope);
  }
  final Iterator<InetSocketAddress> remoteIt=receiverList.getRemoteReceivers().iterator();
  while (remoteIt.hasNext()) {
    final InetSocketAddress remoteReceiver=remoteIt.next();
    this.networkConnectionManager.queueEnvelopeForTransfer(remoteReceiver,transferEnvelope);
  }
  return true;
}
Program: 55845
Project: 55845
Buggy source:
/** 
 * Sets the number of fields in the record. If the new number of fields is longer than the current number of fields, then null fields are appended. If the new number of fields is smaller than the current number of fields, then the last fields are truncated.
 * @param numFields The new number of fields.
 */
public void setNumFields(final int numFields){
  final int oldNumFields=this.numFields;
  if (numFields > oldNumFields) {
    makeSpace(numFields);
    for (int i=oldNumFields; i < numFields; i++) {
      this.offsets[i]=NULL_INDICATOR_OFFSET;
    }
  }
 else {
    if (this.lastUnmodifiedPos >= numFields)     this.lastUnmodifiedPos=numFields - 1;
  }
  this.numFields=numFields;
}

Fixed version (ground truth):
/** 
 * Sets the number of fields in the record. If the new number of fields is longer than the current number of fields, then null fields are appended. If the new number of fields is smaller than the current number of fields, then the last fields are truncated.
 * @param numFields The new number of fields.
 */
public void setNumFields(final int numFields){
  final int oldNumFields=this.numFields;
  if (numFields > oldNumFields) {
    makeSpace(numFields);
    for (int i=oldNumFields; i < numFields; i++) {
      this.offsets[i]=NULL_INDICATOR_OFFSET;
    }
  }
 else {
    if (this.lastUnmodifiedPos >= numFields)     this.lastUnmodifiedPos=numFields - 1;
    markModified(numFields);
  }
  this.numFields=numFields;
}
Program: 55846
Project: 55846
Buggy source:
/** 
 * Emit the candidate.
 * @param left
 * @param right
 */
protected void emitCandidate(KeyValuePair<JsonNode,JsonNode> left,KeyValuePair<JsonNode,JsonNode> right){
  EvaluationExpression resultProjection1=this.resultProjection1, resultProjection2=this.resultProjection2;
  if (resultProjection1 == null)   resultProjection1=EvaluationExpression.VALUE;
  if (resultProjection2 == null)   resultProjection2=EvaluationExpression.VALUE;
  final EvaluationContext context=this.getContext();
  this.sopremoTestPlan.getExpectedOutput(0).add(createPactJsonArray(resultProjection1.evaluate(left.getValue(),context),resultProjection2.evaluate(right.getValue(),context)));
}

Fixed version (ground truth):
/** 
 * Emit the candidate.
 * @param left
 * @param right
 */
protected void emitCandidate(KeyValuePair<JsonNode,JsonNode> left,KeyValuePair<JsonNode,JsonNode> right){
  EvaluationExpression resultProjection1=this.resultProjection1, resultProjection2=this.resultProjection2;
  if (resultProjection1 == null)   resultProjection1=EvaluationExpression.VALUE;
  if (resultProjection2 == null)   resultProjection2=EvaluationExpression.VALUE;
  final EvaluationContext context=this.getContext();
  this.sopremoTestPlan.getExpectedOutput(0).add(new ArrayNode(resultProjection1.evaluate(left.getValue(),context),resultProjection2.evaluate(right.getValue(),context)));
}
Program: 55847
Project: 55847
Buggy source:
private JsonNode flatArrayOfElements(SopremoTestPlan testPlan,int[]... ids){
  ArrayNode array=new ArrayNode();
  for (int sourceIndex=0; sourceIndex < ids.length; sourceIndex++) {
    EvaluationExpression resultProjection=this.resultProjections[sourceIndex];
    if (resultProjection == null)     resultProjection=EvaluationExpression.VALUE;
    for (int tupleIndex=0; tupleIndex < ids[sourceIndex].length; tupleIndex++)     array.add(resultProjection.evaluate(this.findTuple(testPlan,sourceIndex,ids[sourceIndex][tupleIndex]),testPlan.getEvaluationContext()));
  }
  return new JsonNode(array);
}

Fixed version (ground truth):
private JsonNode flatArrayOfElements(SopremoTestPlan testPlan,int[]... ids){
  ArrayNode array=new ArrayNode();
  for (int sourceIndex=0; sourceIndex < ids.length; sourceIndex++) {
    EvaluationExpression resultProjection=this.resultProjections[sourceIndex];
    if (resultProjection == null)     resultProjection=EvaluationExpression.VALUE;
    for (int tupleIndex=0; tupleIndex < ids[sourceIndex].length; tupleIndex++)     array.add(resultProjection.evaluate(this.findTuple(testPlan,sourceIndex,ids[sourceIndex][tupleIndex]),testPlan.getEvaluationContext()));
  }
  return new ArrayNode(array);
}
Program: 55848
Project: 55848
Buggy source:
private void writeObject(final ObjectOutputStream oos) throws IOException {
  oos.defaultWriteObject();
  new JsonNode(this.initialAggregate).write(oos);
}

Fixed version (ground truth):
private void writeObject(final ObjectOutputStream oos) throws IOException {
  oos.defaultWriteObject();
  this.initialAggregate.write(oos);
}
Program: 55849
Project: 55849
Buggy source:
@Override public void initialize(){
  try {
    final ByteArrayOutputStream cloneBuffer=new ByteArrayOutputStream();
    final JsonNode cloner=new JsonNode(this.initialAggregate);
    cloner.write(new DataOutputStream(cloneBuffer));
    cloner.read(new DataInputStream(new ByteArrayInputStream(cloneBuffer.toByteArray())));
    this.aggregate=cloner;
  }
 catch (  final IOException e) {
    throw new IllegalStateException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void initialize(){
  try {
    final ByteArrayOutputStream cloneBuffer=new ByteArrayOutputStream();
    final JsonNode cloner=this.initialAggregate;
    cloner.write(new DataOutputStream(cloneBuffer));
    cloner.read(new DataInputStream(new ByteArrayInputStream(cloneBuffer.toByteArray())));
    this.aggregate=cloner;
  }
 catch (  final IOException e) {
    throw new IllegalStateException("String_Node_Str");
  }
}
Program: 55850
Project: 55850
Buggy source:
private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException {
  ois.defaultReadObject();
  final JsonNode pactJsonObject=new JsonNode();
  pactJsonObject.read(ois);
  this.initialAggregate=pactJsonObject;
}

Fixed version (ground truth):
private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException {
  ois.defaultReadObject();
  final JsonNode jsonObject=new ObjectNode();
  jsonObject.read(ois);
  this.initialAggregate=jsonObject;
}
Program: 55851
Project: 55851
Buggy source:
public void writeTree(JsonNode value) throws IOException {
  if (value != null) {
    this.writer.write(value.toString());
    this.writer.flush();
  }
}

Fixed version (ground truth):
public void writeTree(JsonNode value) throws IOException {
  if (value != null) {
    if (!this.isFirst) {
      this.writer.write("String_Node_Str");
    }
    this.writer.write(value.toString());
    this.writer.flush();
    this.isFirst=false;
  }
}
Program: 55852
Project: 55852
Buggy source:
public void writeEndArray() throws IOException {
  JsonToken.END_ARRAY.write(this.writer);
}

Fixed version (ground truth):
public void writeEndArray() throws IOException {
  JsonToken.END_ARRAY.write(this.writer);
  this.writer.flush();
}
Program: 55853
Project: 55853
Buggy source:
public void writeStartArray() throws IOException {
  JsonToken.START_ARRAY.write(this.writer);
}

Fixed version (ground truth):
public void writeStartArray() throws IOException {
  JsonToken.START_ARRAY.write(this.writer);
  this.writer.flush();
}
Program: 55854
Project: 55854
Buggy source:
@Override public int compareTo(Key o){
  return 0;
}

Fixed version (ground truth):
@Override public int compareTo(Key other){
  ArrayNode node=(ArrayNode)other;
  if (node.size() != this.size()) {
    return 1;
  }
  for (int i=0; i < this.size(); i++) {
    int comp=this.get(i).compareTo(node.get(i));
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}
Program: 55855
Project: 55855
Buggy source:
@Override public KeyValuePair<JsonNode,JsonNode> createPair(){
  return new KeyValuePair<JsonNode,JsonNode>(NullNode.getInstance(),new PactJsonObject());
}

Fixed version (ground truth):
@Override public KeyValuePair<JsonNode,JsonNode> createPair(){
  return new KeyValuePair<JsonNode,JsonNode>(NullNode.getInstance(),new ObjectNode());
}
Program: 55857
Project: 55857
Buggy source:
public void restartExecution(){
  this.restarting=true;
  changeExecutionState(ExecutionState.RESTARTING,null);
  LOG.info("String_Node_Str" + this.taskName);
  this.isCanceled=true;
  if (this.executingThread == null) {
    LOG.error("String_Node_Str" + this.taskName + "String_Node_Str");
    return;
  }
  try {
    this.invokable.cancel();
  }
 catch (  Exception e) {
    LOG.error(StringUtils.stringifyException(e));
  }
  while (this.isCanceled) {
    this.executingThread.interrupt();
  }
  LOG.info("String_Node_Str");
  this.isCanceled=false;
  this.executingThread=new Thread(this,this.taskName);
  this.executingThread.start();
  return;
}

Fixed version (ground truth):
public void restartExecution(){
  this.restarting=true;
  changeExecutionState(ExecutionState.RESTARTING,null);
  LOG.info("String_Node_Str" + this.taskName);
  this.isCanceled=true;
  if (this.executingThread == null) {
    LOG.error("String_Node_Str" + this.taskName + "String_Node_Str");
    return;
  }
  try {
    this.invokable.cancel();
  }
 catch (  Exception e) {
    LOG.error(StringUtils.stringifyException(e));
  }
  while (this.isCanceled) {
    this.executingThread.interrupt();
  }
  LOG.info("String_Node_Str");
  System.out.println("String_Node_Str");
  this.isCanceled=false;
  this.executingThread=new Thread(this,this.taskName);
  this.executingThread.start();
  return;
}
Program: 55861
Project: 55861
Buggy source:
/** 
 * Returns the number of successors, i.e. the number of vertices this vertex is connected to.
 * @return the number of successors
 */
public synchronized int getNumberOfSuccessors(){
  int numberOfSuccessors=0;
  LOG.info(this.environment.getNumberOfOutputGates());
  for (int i=0; i < this.environment.getNumberOfOutputGates(); i++) {
    LOG.info(this.environment.getOutputGate(i).getNumberOfOutputChannels());
    numberOfSuccessors+=this.environment.getOutputGate(i).getNumberOfOutputChannels();
  }
  return numberOfSuccessors;
}

Fixed version (ground truth):
/** 
 * Returns the number of successors, i.e. the number of vertices this vertex is connected to.
 * @return the number of successors
 */
public synchronized int getNumberOfSuccessors(){
  int numberOfSuccessors=0;
  for (int i=0; i < this.environment.getNumberOfOutputGates(); i++) {
    numberOfSuccessors+=this.environment.getOutputGate(i).getNumberOfOutputChannels();
  }
  return numberOfSuccessors;
}
Program: 55862
Project: 55862
Buggy source:
/** 
 */
public void recover(ChannelID sourceChannelID){
  try {
    getTaskManager().recover(sourceChannelID);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * recovers the given channel
 */
public void recover(ChannelID sourceChannelID){
  try {
    getTaskManager().recover(sourceChannelID);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 55863
Project: 55863
Buggy source:
@Override public void rewind(){
  this.byteBuffer.rewind();
}

Fixed version (ground truth):
@Override public void rewind(){
  this.byteBuffer.position(0);
}
Program: 55864
Project: 55864
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void vertexAssignmentChanged(ExecutionVertexID id,AllocatedResource newAllocatedResource){
  final ManagementVertexID managementVertexID=id.toManagementVertexID();
  final long timestamp=System.currentTimeMillis();
  final AbstractInstance instance=newAllocatedResource.getInstance();
  VertexAssignmentEvent event;
  if (instance == null) {
    event=new VertexAssignmentEvent(timestamp,managementVertexID,"String_Node_Str","String_Node_Str");
  }
 else {
    event=new VertexAssignmentEvent(timestamp,managementVertexID,instance.getName(),instance.getType().getIdentifier());
  }
  this.eventCollector.updateManagementGraph(jobID,event);
  this.eventCollector.addEvent(this.jobID,event);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void vertexAssignmentChanged(ExecutionVertexID id,AllocatedResource newAllocatedResource){
  final ManagementVertexID managementVertexID=id.toManagementVertexID();
  final long timestamp=System.currentTimeMillis();
  final AbstractInstance instance=newAllocatedResource.getInstance();
  VertexAssignmentEvent event;
  if (instance == null) {
    event=new VertexAssignmentEvent(timestamp,managementVertexID,"String_Node_Str","String_Node_Str");
  }
 else {
    event=new VertexAssignmentEvent(timestamp,managementVertexID,instance.getName(),instance.getType().getIdentifier());
  }
  this.eventCollector.updateManagementGraph(this.jobID,event);
  this.eventCollector.addEvent(this.jobID,event);
}
Program: 55867
Project: 55867
Buggy source:
/** 
 */
void recoverAll(ChannelID sourceChannelID);

Fixed version (ground truth):
/** 
 * @param sourceChannelID
 * @param address
 */
void recoverAll(ChannelID sourceChannelID);
Program: 55868
Project: 55868
Buggy source:
/** 
 */
void recover(ChannelID sourceChannelID);

Fixed version (ground truth):
/** 
 * @param sourceChannelID
 * @param instanceConnectionInfo
 */
void recover(ChannelID sourceChannelID);
Program: 55869
Project: 55869
Buggy source:
public void recoverAll(ChannelID sourceChannelID){
  this.checkpointManager.recoverAllChannelCheckpoints(sourceChannelID);
}

Fixed version (ground truth):
@Override public void recoverAll(ChannelID sourceChannelID){
  this.checkpointManager.recoverAllChannelCheckpoints(sourceChannelID);
}
Program: 55870
Project: 55870
Buggy source:
@Override public void restart(ExecutionVertexID executionVertexID,Configuration jobConfiguration){
  Environment ee=this.runningTasks.remove(executionVertexID);
  ee.restartExecution();
  for (int i=0; i < ee.getNumberOfInputGates(); i++) {
    InputGate<? extends Record> ingate=ee.getInputGate(i);
    for (int j=0; j < ingate.getNumberOfInputChannels(); j++) {
      this.byteBufferedChannelManager.clear(ingate.getInputChannel(j).getID());
    }
  }
  for (int i=0; i < ee.getNumberOfOutputGates(); i++) {
    OutputGate<? extends Record> outgate=ee.getOutputGate(i);
    for (int j=0; j < outgate.getNumberOfOutputChannels(); j++) {
      this.byteBufferedChannelManager.clear(outgate.getOutputChannel(j).getID());
    }
  }
}

Fixed version (ground truth):
@Override public void restart(ExecutionVertexID executionVertexID,Configuration jobConfiguration){
  Environment ee=this.runningTasks.remove(executionVertexID);
  ee.restartExecution();
  for (int i=0; i < ee.getNumberOfInputGates(); i++) {
    InputGate<? extends Record> ingate=ee.getInputGate(i);
    for (int j=0; j < ingate.getNumberOfInputChannels(); j++) {
      if (!(ingate.getInputChannel(j) instanceof FileInputChannel<?>)) {
        this.byteBufferedChannelManager.clear(ingate.getInputChannel(j).getID());
      }
    }
  }
  for (int i=0; i < ee.getNumberOfOutputGates(); i++) {
    OutputGate<? extends Record> outgate=ee.getOutputGate(i);
    for (int j=0; j < outgate.getNumberOfOutputChannels(); j++) {
      this.byteBufferedChannelManager.clear(outgate.getOutputChannel(j).getID());
    }
  }
}