nus-yam/ex-repair huggingface dataset:
Program: 87734
Project: 87734
Buggy source:
private static ExecutionState determineOverallExecutionState(final ExecutionState unchangedExecutionState,final ExecutionState changedExecutionState){
  if (changedExecutionState == null) {
    return changedExecutionState;
  }
  if (changedExecutionState == ExecutionState.REPLAYING) {
    if (unchangedExecutionState == ExecutionState.RUNNING || unchangedExecutionState == ExecutionState.FINISHING) {
      return ExecutionState.REPLAYING;
    }
 else {
      return unchangedExecutionState;
    }
  }
  if (changedExecutionState == ExecutionState.CANCELING) {
    return ExecutionState.CANCELING;
  }
  if (changedExecutionState == ExecutionState.CANCELED && unchangedExecutionState == ExecutionState.CANCELED) {
    return ExecutionState.CANCELED;
  }
  if (changedExecutionState == ExecutionState.FINISHING && (unchangedExecutionState == ExecutionState.FINISHING || unchangedExecutionState == ExecutionState.FINISHED)) {
    return ExecutionState.FINISHING;
  }
  if (changedExecutionState == ExecutionState.FINISHED && unchangedExecutionState == ExecutionState.FINISHED) {
    return ExecutionState.FINISHED;
  }
  if (changedExecutionState == ExecutionState.FAILED && unchangedExecutionState == ExecutionState.FAILED) {
    return ExecutionState.FAILED;
  }
  return null;
}

Fixed version (ground truth):
private static ExecutionState determineOverallExecutionState(final ExecutionState unchangedExecutionState,final ExecutionState changedExecutionState){
  if (unchangedExecutionState == null) {
    return changedExecutionState;
  }
  if (changedExecutionState == ExecutionState.REPLAYING) {
    if (unchangedExecutionState == ExecutionState.RUNNING || unchangedExecutionState == ExecutionState.FINISHING) {
      return ExecutionState.REPLAYING;
    }
 else {
      return unchangedExecutionState;
    }
  }
  if (changedExecutionState == ExecutionState.CANCELING) {
    return ExecutionState.CANCELING;
  }
  if (changedExecutionState == ExecutionState.CANCELED && unchangedExecutionState == ExecutionState.CANCELED) {
    return ExecutionState.CANCELED;
  }
  if (changedExecutionState == ExecutionState.FINISHING && (unchangedExecutionState == ExecutionState.FINISHING || unchangedExecutionState == ExecutionState.FINISHED)) {
    return ExecutionState.FINISHING;
  }
  if (changedExecutionState == ExecutionState.FINISHED && unchangedExecutionState == ExecutionState.FINISHED) {
    return ExecutionState.FINISHED;
  }
  if (changedExecutionState == ExecutionState.FAILED && unchangedExecutionState == ExecutionState.FAILED) {
    return ExecutionState.FAILED;
  }
  return null;
}
Program: 87735
Project: 87735
Buggy source:
protected void replayCheckpointsFromPreviousStage(final ExecutionGraph executionGraph){
  final int currentStageIndex=executionGraph.getIndexOfCurrentExecutionStage();
  final ExecutionStage previousStage=executionGraph.getStage(currentStageIndex - 1);
  for (int i=0; i < previousStage.getNumberOfOutputExecutionVertices(); ++i) {
    final ExecutionVertex vertex=previousStage.getOutputExecutionVertex(i);
    vertex.updateExecutionState(ExecutionState.ASSIGNED);
  }
  deployAssignedInputVertices(executionGraph);
}

Fixed version (ground truth):
protected void replayCheckpointsFromPreviousStage(final ExecutionGraph executionGraph){
  final int currentStageIndex=executionGraph.getIndexOfCurrentExecutionStage();
  final ExecutionStage previousStage=executionGraph.getStage(currentStageIndex - 1);
  final List<ExecutionVertex> verticesToBeReplayed=new ArrayList<ExecutionVertex>();
  for (int i=0; i < previousStage.getNumberOfOutputExecutionVertices(); ++i) {
    final ExecutionVertex vertex=previousStage.getOutputExecutionVertex(i);
    vertex.updateExecutionState(ExecutionState.ASSIGNED);
    verticesToBeReplayed.add(vertex);
  }
  deployAssignedVertices(verticesToBeReplayed);
}
Program: 87737
Project: 87737
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean hasDataLeft() throws IOException, InterruptedException {
  if (this.closeAcknowledgementReceived) {
    return getNext().hasDataLeft();
  }
  if ((this.lastSequenceNumberWithReceiverNotFound + 1) == this.sequenceNumber) {
    return getNext().hasDataLeft();
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean hasDataLeft() throws IOException, InterruptedException {
  if (this.byteBufferedOutputChannel.getType() == ChannelType.FILE) {
    return getNext().hasDataLeft();
  }
  if (this.closeAcknowledgmentReceived) {
    return getNext().hasDataLeft();
  }
  if ((this.lastSequenceNumberWithReceiverNotFound + 1) == this.sequenceNumber) {
    return getNext().hasDataLeft();
  }
  return true;
}
Program: 87738
Project: 87738
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void processEvent(final AbstractEvent event){
  if (event instanceof ByteBufferedChannelCloseEvent) {
    this.closeAcknowledgementReceived=true;
  }
 else   if (event instanceof ReceiverNotFoundEvent) {
    this.lastSequenceNumberWithReceiverNotFound=((ReceiverNotFoundEvent)event).getSequenceNumber();
  }
 else   if (event instanceof AbstractTaskEvent) {
    this.byteBufferedOutputChannel.processEvent(event);
  }
  getNext().processEvent(event);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void processEvent(final AbstractEvent event){
  if (event instanceof ByteBufferedChannelCloseEvent) {
    this.closeAcknowledgmentReceived=true;
  }
 else   if (event instanceof ReceiverNotFoundEvent) {
    this.lastSequenceNumberWithReceiverNotFound=((ReceiverNotFoundEvent)event).getSequenceNumber();
  }
 else   if (event instanceof AbstractTaskEvent) {
    this.byteBufferedOutputChannel.processEvent(event);
  }
  getNext().processEvent(event);
}
Program: 87740
Project: 87740
Buggy source:
/** 
 * Sets up Nephele in local mode.
 */
@BeforeClass public static void startNephele(){
  if (jobManagerThread == null) {
    JobManager jobManager=null;
    try {
      Constructor<JobManager> c=JobManager.class.getDeclaredConstructor(new Class[]{String.class,String.class});
      c.setAccessible(true);
      jobManager=c.newInstance(new Object[]{new String(System.getProperty("String_Node_Str") + "String_Node_Str"),new String("String_Node_Str")});
    }
 catch (    SecurityException e) {
      fail(e.getMessage());
    }
catch (    NoSuchMethodException e) {
      fail(e.getMessage());
    }
catch (    IllegalArgumentException e) {
      fail(e.getMessage());
    }
catch (    InstantiationException e) {
      fail(e.getMessage());
    }
catch (    IllegalAccessException e) {
      fail(e.getMessage());
    }
catch (    InvocationTargetException e) {
      fail(e.getMessage());
    }
    configuration=GlobalConfiguration.getConfiguration(new String[]{ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY});
    if (jobManager != null) {
      jobManagerThread=new JobManagerThread(jobManager);
      jobManagerThread.start();
    }
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets up Nephele in local mode.
 */
@BeforeClass public static void startNephele(){
  if (jobManagerThread == null) {
    JobManager jobManager=null;
    try {
      Constructor<JobManager> c=JobManager.class.getDeclaredConstructor(new Class[]{String.class,String.class});
      c.setAccessible(true);
      jobManager=c.newInstance(new Object[]{ServerTestUtils.getConfigDir(),new String("String_Node_Str")});
    }
 catch (    SecurityException e) {
      fail(e.getMessage());
    }
catch (    NoSuchMethodException e) {
      fail(e.getMessage());
    }
catch (    IllegalArgumentException e) {
      fail(e.getMessage());
    }
catch (    InstantiationException e) {
      fail(e.getMessage());
    }
catch (    IllegalAccessException e) {
      fail(e.getMessage());
    }
catch (    InvocationTargetException e) {
      fail(e.getMessage());
    }
    configuration=GlobalConfiguration.getConfiguration(new String[]{ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY});
    if (jobManager != null) {
      jobManagerThread=new JobManagerThread(jobManager);
      jobManagerThread.start();
    }
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
}
Program: 87741
Project: 87741
Buggy source:
public long getDefaultBlockSize(){
  return 32 * 1024 * 1024;
}

Fixed version (ground truth):
/** 
 * Return the number of bytes that large input files should be optimally be split into to minimize I/O time.
 * @return the number of bytes that large input files should be optimally be split into to minimize I/O time
 */
public long getDefaultBlockSize(){
  return 32 * 1024 * 1024;
}
Program: 87742
Project: 87742
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override protected void implCloseChannel() throws IOException {
  getOutputStream().close();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void implCloseChannel() throws IOException {
  getOutputStream().close();
  if (this.inputStream != null) {
    this.inputStream.close();
    this.inputStream=null;
  }
}
Program: 87745
Project: 87745
Buggy source:
/** 
 * Creates an instance that wraps the plan defined in the jar file using the given arguments. For generating the plan the class defined in the className parameter is used.
 * @param jarFile The jar file which contains the plan.
 * @param className Name of the class which generates the plan. Overrides the class defined in the jar file manifest
 * @param args Optional. The arguments used to create the pact plan, depend on implementation of the pact plan. See getDescription().
 * @throws ProgramInvocationException This invocation is thrown if the PlanAssembler can't be properly loaded. Causes may be a missing / wrong class or manifest files.
 */
public PactProgram(File jarFile,String className,String... args) throws ProgramInvocationException {
  this.assemblerClass=getPactAssemblerFromJar(jarFile,className);
  this.jarFile=jarFile;
  this.args=args;
}

Fixed version (ground truth):
/** 
 * Creates an instance that wraps the plan defined in the jar file using the given arguments. For generating the plan the class defined in the className parameter is used.
 * @param jarFile The jar file which contains the plan.
 * @param className Name of the class which generates the plan. Overrides the class defined in the jar file manifest
 * @param args Optional. The arguments used to create the pact plan, depend on implementation of the pact plan. See getDescription().
 * @throws ProgramInvocationException This invocation is thrown if the PlanAssembler can't be properly loaded. Causes may be a missing / wrong class or manifest files.
 */
public PactProgram(File jarFile,String className,String... args) throws ProgramInvocationException {
  this.jarFile=jarFile;
  this.args=args;
  this.assemblerClass=getPactAssemblerFromJar(jarFile,className);
}
Program: 87746
Project: 87746
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ChannelType getType(){
  return this.encapsulatedContext.getType();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ChannelType getType(){
  return null;
}
Program: 87747
Project: 87747
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean hasDataLeft(){
  return this.writeThread.hasDataLeft();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean hasDataLeft() throws IOException, InterruptedException {
  if (isUndecided()) {
    setCheckpointDecisionSynchronously(true);
  }
  if (this.writeThread == null) {
    return false;
  }
  if (this.writeThread.hasDataLeft()) {
    return true;
  }
  if (!this.completeCheckpointAnnounced) {
    this.completeCheckpointAnnounced=true;
    this.task.checkpointStateChanged(CheckpointState.COMPLETE);
  }
  return false;
}
Program: 87748
Project: 87748
Buggy source:
boolean hasFinished(){
  this.incomingEventQueue.processQueuedEvents();
  return (!this.forwardingChain.anyForwarderHasDataLeft());
}

Fixed version (ground truth):
boolean hasFinished() throws IOException, InterruptedException {
  this.incomingEventQueue.processQueuedEvents();
  return (!this.forwardingChain.anyForwarderHasDataLeft());
}
Program: 87750
Project: 87750
Buggy source:
boolean hasDataLeft();

Fixed version (ground truth):
boolean hasDataLeft() throws IOException, InterruptedException ;
Program: 87751
Project: 87751
Buggy source:
public boolean anyForwarderHasDataLeft(){
  final Iterator<OutputChannelForwarder> it=this.forwardingChain.iterator();
  while (it.hasNext()) {
    if (it.next().hasDataLeft()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean anyForwarderHasDataLeft() throws IOException, InterruptedException {
  final Iterator<OutputChannelForwarder> it=this.forwardingChain.iterator();
  while (it.hasNext()) {
    if (it.next().hasDataLeft()) {
      return true;
    }
  }
  return false;
}
Program: 87752
Project: 87752
Buggy source:
public CheckpointDeserializer(final AbstractID ownerID){
  this.ownerID=ownerID;
  this.fileBufferManager=FileBufferManager.getInstance();
}

Fixed version (ground truth):
public CheckpointDeserializer(final AbstractID ownerID,final boolean distributed){
  this.ownerID=ownerID;
  this.fileBufferManager=FileBufferManager.getInstance();
  this.distributed=distributed;
}
Program: 87753
Project: 87753
Buggy source:
@Override protected boolean readBufferData(final ReadableByteChannel readableByteChannel) throws IOException {
  final ByteBuffer tempBuffer=getTempBuffer();
  if (!this.bufferDataSerializationStarted) {
    tempBuffer.clear();
    this.bufferDataSerializationStarted=true;
  }
  readableByteChannel.read(tempBuffer);
  if (tempBuffer.hasRemaining()) {
    return true;
  }
  final long offset=byteBufferToLong(tempBuffer);
  final Buffer fileBuffer=BufferFactory.createFromCheckpoint(getSizeOfBuffer(),offset,this.ownerID,this.fileBufferManager,true);
  setBuffer(fileBuffer);
  this.bufferDataSerializationStarted=false;
  return false;
}

Fixed version (ground truth):
@Override protected boolean readBufferData(final ReadableByteChannel readableByteChannel) throws IOException {
  final ByteBuffer tempBuffer=getTempBuffer();
  if (!this.bufferDataSerializationStarted) {
    tempBuffer.clear();
    this.bufferDataSerializationStarted=true;
  }
  readableByteChannel.read(tempBuffer);
  if (tempBuffer.hasRemaining()) {
    return true;
  }
  final long offset=byteBufferToLong(tempBuffer);
  final Buffer fileBuffer=BufferFactory.createFromCheckpoint(getSizeOfBuffer(),offset,this.ownerID,this.fileBufferManager,this.distributed);
  setBuffer(fileBuffer);
  this.bufferDataSerializationStarted=false;
  return false;
}
Program: 87754
Project: 87754
Buggy source:
@Override public Class<? extends Value>[] getPactSchema(){
  Class<? extends Value>[] schema=new Class[this.mapping.size()];
  for (int i=0; i < this.mapping.size(); i++) {
    schema[i]=JsonNodeWrapper.class;
  }
  return schema;
}

Fixed version (ground truth):
@Override public Class<? extends Value>[] getPactSchema(){
  Class<? extends Value>[] schema=new Class[this.mapping.size() + 1];
  for (int i=0; i <= this.mapping.size(); i++) {
    schema[i]=JsonNodeWrapper.class;
  }
  return schema;
}
Program: 87755
Project: 87755
Buggy source:
@Test public void shouldUseRecordTarget(){
  this.schema.setMappings("String_Node_Str","String_Node_Str");
  ObjectNode object=new ObjectNode().put("String_Node_Str",TextNode.valueOf("String_Node_Str")).put("String_Node_Str",TextNode.valueOf("String_Node_Str"));
  PactRecord target=new PactRecord();
  PactRecord result=this.schema.jsonToRecord(object,target);
  Assert.assertSame(target,result);
}

Fixed version (ground truth):
@Test public void shouldUseRecordTarget(){
  this.schema.setMappings("String_Node_Str","String_Node_Str");
  ObjectNode object=new ObjectNode().put("String_Node_Str",TextNode.valueOf("String_Node_Str")).put("String_Node_Str",TextNode.valueOf("String_Node_Str"));
  PactRecord target=new PactRecord();
  target.setField(2,new JsonNodeWrapper(new ObjectNode()));
  PactRecord result=this.schema.jsonToRecord(object,target);
  Assert.assertSame(target,result);
}
Program: 87756
Project: 87756
Buggy source:
@Test public void shouldConvertFromJsonToRecord(){
  this.schema.setMappings("String_Node_Str","String_Node_Str");
  ObjectNode object=new ObjectNode();
  object.put("String_Node_Str",TextNode.valueOf("String_Node_Str")).put("String_Node_Str",TextNode.valueOf("String_Node_Str"));
  PactRecord result=this.schema.jsonToRecord(object,null);
  PactRecord expected=new PactRecord();
  expected.setField(0,new JsonNodeWrapper(TextNode.valueOf("String_Node_Str")));
  expected.setField(1,new JsonNodeWrapper(TextNode.valueOf("String_Node_Str")));
  Assert.assertTrue(PactRecordEqualer.recordsEqual(expected,result,this.schema.getPactSchema()));
}

Fixed version (ground truth):
@Test public void shouldConvertFromJsonToRecord(){
  this.schema.setMappings("String_Node_Str","String_Node_Str");
  ObjectNode object=new ObjectNode();
  object.put("String_Node_Str",TextNode.valueOf("String_Node_Str")).put("String_Node_Str",TextNode.valueOf("String_Node_Str"));
  PactRecord result=this.schema.jsonToRecord(object,null);
  PactRecord expected=new PactRecord();
  expected.setField(0,new JsonNodeWrapper(TextNode.valueOf("String_Node_Str")));
  expected.setField(1,new JsonNodeWrapper(TextNode.valueOf("String_Node_Str")));
  expected.setField(2,new JsonNodeWrapper(new ObjectNode()));
  Assert.assertTrue(PactRecordEqualer.recordsEqual(expected,result,this.schema.getPactSchema()));
}
Program: 87757
Project: 87757
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void read(DataInput in) throws IOException {
  final int addr_length=in.readInt();
  byte[] address=new byte[addr_length];
  in.readFully(address);
  this.hostname=StringRecord.readString(in);
  try {
    this.inetAddress=InetAddress.getByAddress(address);
  }
 catch (  UnknownHostException uhe) {
    throw new IOException(StringUtils.stringifyException(uhe));
  }
  this.ipcPort=in.readInt();
  this.dataPort=in.readInt();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void read(DataInput in) throws IOException {
  final int addr_length=in.readInt();
  byte[] address=new byte[addr_length];
  in.readFully(address);
  this.hostname=StringRecord.readString(in);
  this.domainname=StringRecord.readString(in);
  try {
    this.inetAddress=InetAddress.getByAddress(address);
  }
 catch (  UnknownHostException uhe) {
    throw new IOException(StringUtils.stringifyException(uhe));
  }
  this.ipcPort=in.readInt();
  this.dataPort=in.readInt();
}
Program: 87758
Project: 87758
Buggy source:
/** 
 * Returns the host name of the instance.
 * @return the host name of the instance
 */
public String getHostName(){
  return this.hostname;
}

Fixed version (ground truth):
/** 
 * Returns the host name of the instance. If the host name could not be determined, the return value will be a textual representation of the instance's IP address.
 * @return the host name of the instance
 */
public String getHostName(){
  return this.hostname;
}
Program: 87759
Project: 87759
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void write(DataOutput out) throws IOException {
  out.writeInt(this.inetAddress.getAddress().length);
  out.write(this.inetAddress.getAddress());
  StringRecord.writeString(out,this.hostname);
  out.writeInt(this.ipcPort);
  out.writeInt(this.dataPort);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void write(DataOutput out) throws IOException {
  out.writeInt(this.inetAddress.getAddress().length);
  out.write(this.inetAddress.getAddress());
  StringRecord.writeString(out,this.hostname);
  StringRecord.writeString(out,this.domainname);
  out.writeInt(this.ipcPort);
  out.writeInt(this.dataPort);
}
Program: 87760
Project: 87760
Buggy source:
/** 
 * Filters these properties by what can be preserved through the given output contract.
 * @param contract The output contract.
 * @return True, if any non-default value is preserved, false otherwise.
 */
public boolean filterByNodesConstantSet(OptimizerNode node,int input){
  if (ordering != null) {
    ArrayList<Integer> involvedIndexes=ordering.getInvolvedIndexes();
    for (int i=0; i < involvedIndexes.size(); i++) {
      if (node.isFieldKept(input,i) == false) {
        ordering=ordering.createNewOrderingUpToIndex(i);
        break;
      }
    }
  }
  if (this.groupedFields != null) {
    for (    Integer index : this.groupedFields) {
      if (node.isFieldKept(input,index) == false) {
        this.groupedFields=null;
        this.grouped=false;
        break;
      }
    }
  }
 else {
    this.grouped=false;
  }
  return !isTrivial();
}

Fixed version (ground truth):
/** 
 * Filters these properties by what can be preserved through the given output contract.
 * @param contract The output contract.
 * @return True, if any non-default value is preserved, false otherwise.
 */
public boolean filterByNodesConstantSet(OptimizerNode node,int input){
  if (ordering != null) {
    ArrayList<Integer> involvedIndexes=ordering.getInvolvedIndexes();
    for (int i=0; i < involvedIndexes.size(); i++) {
      if (node.isFieldKept(input,involvedIndexes.get(i)) == false) {
        ordering=ordering.createNewOrderingUpToIndex(i);
        break;
      }
    }
  }
  if (this.groupedFields != null) {
    for (    Integer index : this.groupedFields) {
      if (node.isFieldKept(input,index) == false) {
        this.groupedFields=null;
        this.grouped=false;
        break;
      }
    }
  }
 else {
    this.grouped=false;
  }
  return !isTrivial();
}
Program: 87761
Project: 87761
Buggy source:
@Override public void run() throws Exception {
  final MutableObjectIterator<PactRecord> input=this.inputs[0];
  final MapStub stub=this.stub;
  final Collector output=this.output;
  final PactRecord record=new PactRecord();
  int count=0;
  long consumedPactRecordsInBytes=0L;
  final Environment env=getEnvironment();
  final OutputCollector oc=(OutputCollector)output;
  if (this.stub.getClass().isAnnotationPresent(ForceCheckpoint.class)) {
    env.isForced(this.stub.getClass().getAnnotation(ForceCheckpoint.class).checkpoint());
  }
  while (this.running && input.next(record)) {
    consumedPactRecordsInBytes=+record.getBinaryLength();
    stub.map(record,output);
    if (++count == 10) {
      env.reportPACTDataStatistics(consumedPactRecordsInBytes,oc.getCollectedPactRecordsInBytes());
      consumedPactRecordsInBytes=0L;
      count=0;
    }
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  final MutableObjectIterator<PactRecord> input=this.inputs[0];
  final MapStub stub=this.stub;
  final Collector output=this.output;
  final PactRecord record=new PactRecord();
  int count=0;
  long consumedPactRecordsInBytes=0L;
  final Environment env=getEnvironment();
  final OutputCollector oc=(OutputCollector)output;
  if (this.stub.getClass().isAnnotationPresent(ForceCheckpoint.class)) {
    env.isForced(this.stub.getClass().getAnnotation(ForceCheckpoint.class).checkpoint());
  }
  while (this.running && input.next(record)) {
    consumedPactRecordsInBytes+=record.getBinaryLength();
    stub.map(record,output);
    if (++count == 10) {
      env.reportPACTDataStatistics(consumedPactRecordsInBytes,oc.getCollectedPactRecordsInBytes());
      consumedPactRecordsInBytes=0L;
      count=0;
    }
  }
}
Program: 87762
Project: 87762
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
 else   if (obj == null) {
    return false;
  }
 else   if (getClass() != obj.getClass()) {
    return false;
  }
  GlobalProperties other=(GlobalProperties)obj;
  if ((ordering == other.getOrdering() || (ordering != null && ordering.equals(other.getOrdering()))) && partitioning == other.getPartitioning() && partitionedFields.equals(other.getPartitionedFields())) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
 else   if (obj == null) {
    return false;
  }
 else   if (getClass() != obj.getClass()) {
    return false;
  }
  GlobalProperties other=(GlobalProperties)obj;
  if ((ordering == other.getOrdering() || (ordering != null && ordering.equals(other.getOrdering()))) && partitioning == other.getPartitioning() && partitionedFields != null && partitionedFields.equals(other.getPartitionedFields())) {
    return true;
  }
 else {
    return false;
  }
}
Program: 87763
Project: 87763
Buggy source:
private static boolean isNetworkTask(final RuntimeTask task){
  final RuntimeEnvironment environment=task.getRuntimeEnvironment();
  for (int i=0; i < environment.getNumberOfOutputGates(); ++i) {
    if (environment.getOutputGate(i).getChannelType() == ChannelType.NETWORK) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean isNetworkTask(final RuntimeTask task){
  final RuntimeEnvironment environment=task.getRuntimeEnvironment();
  for (int i=0; i < environment.getNumberOfOutputGates(); ++i) {
    if (environment.getOutputGate(i).getChannelType() == ChannelType.NETWORK) {
      LOG.info(environment.getTaskNameWithIndex() + "String_Node_Str");
      return true;
    }
  }
  return false;
}
Program: 87764
Project: 87764
Buggy source:
public static CheckpointMode getCheckpointMode(){
  if (CHECKPOINT_MODE == null) {
    final String mode=GlobalConfiguration.getString("String_Node_Str","String_Node_Str").toLowerCase();
    if ("String_Node_Str".equals(mode)) {
      CHECKPOINT_MODE=CheckpointMode.ALWAYS;
    }
 else     if ("String_Node_Str".equals(mode)) {
      CHECKPOINT_MODE=CheckpointMode.NETWORK;
    }
 else     if ("String_Node_Str".equals(mode)) {
      CHECKPOINT_MODE=CheckpointMode.DYNAMIC;
    }
 else {
      CHECKPOINT_MODE=CheckpointMode.NETWORK;
    }
  }
  return CHECKPOINT_MODE;
}

Fixed version (ground truth):
public static CheckpointMode getCheckpointMode(){
  if (CHECKPOINT_MODE == null) {
    final String mode=GlobalConfiguration.getString("String_Node_Str","String_Node_Str").toLowerCase();
    if ("String_Node_Str".equals(mode)) {
      CHECKPOINT_MODE=CheckpointMode.ALWAYS;
    }
 else     if ("String_Node_Str".equals(mode)) {
      CHECKPOINT_MODE=CheckpointMode.NETWORK;
    }
 else     if ("String_Node_Str".equals(mode)) {
      CHECKPOINT_MODE=CheckpointMode.DYNAMIC;
    }
 else {
      CHECKPOINT_MODE=CheckpointMode.NEVER;
    }
  }
  return CHECKPOINT_MODE;
}
Program: 87765
Project: 87765
Buggy source:
@Override protected Entry<String,IJsonNode> loadNext(){
  if (this.lastIndex >= LazyObjectNode.this.schema.getMappingSize()) {
    return noMoreElements();
  }
  String key=LazyObjectNode.this.schema.getMappings().get(this.lastIndex);
  IJsonNode value=SopremoUtil.unwrap(LazyObjectNode.this.record.getField(this.lastIndex,JsonNodeWrapper.class));
  this.lastIndex++;
  return new AbstractMap.SimpleEntry<String,IJsonNode>(key,value);
}

Fixed version (ground truth):
@Override protected Entry<String,IJsonNode> loadNext(){
  while (this.lastIndex < LazyObjectNode.this.schema.getMappingSize()) {
    String key=LazyObjectNode.this.schema.getMappings().get(this.lastIndex);
    if (!LazyObjectNode.this.record.isNull(lastIndex)) {
      IJsonNode value=SopremoUtil.unwrap(LazyObjectNode.this.record.getField(this.lastIndex,JsonNodeWrapper.class));
      this.lastIndex++;
      return new AbstractMap.SimpleEntry<String,IJsonNode>(key,value);
    }
    this.lastIndex++;
  }
  return noMoreElements();
}
Program: 87766
Project: 87766
Buggy source:
@Override public Iterator<Entry<String,IJsonNode>> iterator(){
  Iterator<Entry<String,IJsonNode>> iterator2=((IObjectNode)getOtherField()).iterator();
  Iterator<Entry<String,IJsonNode>> iterator1=new AbstractIterator<Map.Entry<String,IJsonNode>>(){
    int lastIndex=0;
    @Override protected Entry<String,IJsonNode> loadNext(){
      if (this.lastIndex >= LazyObjectNode.this.schema.getMappingSize()) {
        return noMoreElements();
      }
      String key=LazyObjectNode.this.schema.getMappings().get(this.lastIndex);
      IJsonNode value=SopremoUtil.unwrap(LazyObjectNode.this.record.getField(this.lastIndex,JsonNodeWrapper.class));
      this.lastIndex++;
      return new AbstractMap.SimpleEntry<String,IJsonNode>(key,value);
    }
  }
;
  return new ConcatenatingIterator<Map.Entry<String,IJsonNode>>(iterator1,iterator2);
}

Fixed version (ground truth):
@Override public Iterator<Entry<String,IJsonNode>> iterator(){
  Iterator<Entry<String,IJsonNode>> iterator2=((IObjectNode)getOtherField()).iterator();
  Iterator<Entry<String,IJsonNode>> iterator1=new AbstractIterator<Map.Entry<String,IJsonNode>>(){
    int lastIndex=0;
    @Override protected Entry<String,IJsonNode> loadNext(){
      while (this.lastIndex < LazyObjectNode.this.schema.getMappingSize()) {
        String key=LazyObjectNode.this.schema.getMappings().get(this.lastIndex);
        if (!LazyObjectNode.this.record.isNull(lastIndex)) {
          IJsonNode value=SopremoUtil.unwrap(LazyObjectNode.this.record.getField(this.lastIndex,JsonNodeWrapper.class));
          this.lastIndex++;
          return new AbstractMap.SimpleEntry<String,IJsonNode>(key,value);
        }
        this.lastIndex++;
      }
      return noMoreElements();
    }
  }
;
  return new ConcatenatingIterator<Map.Entry<String,IJsonNode>>(iterator1,iterator2);
}
Program: 87767
Project: 87767
Buggy source:
@Override public PactRecord jsonToRecord(IJsonNode value,PactRecord target){
  if (target == null) {
    target=new PactRecord(this.mapping.size() + 1);
  }
  for (int i=0; i < this.mapping.size(); i++) {
    target.setField(i,new JsonNodeWrapper(((IObjectNode)value).get(this.mapping.get(i))));
    ((IObjectNode)value).remove(this.mapping.get(i));
  }
  target.setField(this.mapping.size(),new JsonNodeWrapper(value));
  return target;
}

Fixed version (ground truth):
@Override public PactRecord jsonToRecord(IJsonNode value,PactRecord target){
  if (target == null) {
    target=new PactRecord(this.mapping.size() + 1);
  }
  for (int i=0; i < this.mapping.size(); i++) {
    target.setField(i,new JsonNodeWrapper(((IObjectNode)value).remove(this.mapping.get(i))));
  }
  target.setField(this.mapping.size(),new JsonNodeWrapper(value));
  return target;
}
Program: 87771
Project: 87771
Buggy source:
@Override public void collect(PactRecord record){
  this.list.add(record.createCopy());
}

Fixed version (ground truth):
@Override public void collect(PactRecord record){
  this.collectedPactRecordsInBytes+=record.getBinaryLength();
  this.list.add(record.createCopy());
}
Program: 87773
Project: 87773
Buggy source:
@Override public void collect(PactRecord record){
  if (this.exception != null)   throw new RuntimeException("String_Node_Str",this.exception.getCause() == null ? this.exception : this.exception.getCause());
  this.inputCollector.collect(record);
}

Fixed version (ground truth):
@Override public void collect(PactRecord record){
  this.collectedPactRecordsInBytes+=record.getBinaryLength();
  if (this.exception != null)   throw new RuntimeException("String_Node_Str",this.exception.getCause() == null ? this.exception : this.exception.getCause());
  this.inputCollector.collect(record);
}
Program: 87774
Project: 87774
Buggy source:
@Override public void collect(PactRecord record){
  try {
    this.consumedPactRecordsInBytes+=record.getBinaryLength();
    this.mapper.map(record,this.collector);
    if (++this.count == 10) {
      parent.getEnvironment().reportPACTDataStatistics(this.consumedPactRecordsInBytes,((OutputCollector)this.collector).getCollectedPactRecordsInBytes());
      this.consumedPactRecordsInBytes=0L;
      this.count=0;
    }
  }
 catch (  Exception ex) {
    throw new ExceptionInChainedStubException(this.taskName,ex);
  }
}

Fixed version (ground truth):
@Override public void collect(PactRecord record){
  final int recordLength=record.getBinaryLength();
  this.collectedPactRecordsInBytes+=recordLength;
  try {
    this.consumedPactRecordsInBytes+=recordLength;
    this.mapper.map(record,this.collector);
    if (++this.count == 10) {
      parent.getEnvironment().reportPACTDataStatistics(this.consumedPactRecordsInBytes,((OutputCollector)this.collector).getCollectedPactRecordsInBytes());
      this.consumedPactRecordsInBytes=0L;
      this.count=0;
    }
  }
 catch (  Exception ex) {
    throw new ExceptionInChainedStubException(this.taskName,ex);
  }
}
Program: 87775
Project: 87775
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void killInstance(final StringRecord instanceName) throws IOException {
  final AbstractInstance instance=this.instanceManager.getInstanceByName(instanceName.toString());
  if (instance == null) {
    LOG.error("String_Node_Str" + instanceName + "String_Node_Str");
  }
  LOG.info("String_Node_Str" + instance);
  final Runnable runnable=new Runnable(){
    @Override public void run(){
      try {
        instance.killTaskManager();
      }
 catch (      IOException ioe) {
        LOG.error(StringUtils.stringifyException(ioe));
      }
    }
  }
;
  this.executorService.execute(runnable);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void killInstance(final StringRecord instanceName) throws IOException {
  final AbstractInstance instance=this.instanceManager.getInstanceByName(instanceName.toString());
  if (instance == null) {
    LOG.error("String_Node_Str" + instanceName + "String_Node_Str");
    return;
  }
  LOG.info("String_Node_Str" + instance);
  final Runnable runnable=new Runnable(){
    @Override public void run(){
      try {
        instance.killTaskManager();
      }
 catch (      IOException ioe) {
        LOG.error(StringUtils.stringifyException(ioe));
      }
    }
  }
;
  this.executorService.execute(runnable);
}
Program: 87776
Project: 87776
Buggy source:
/** 
 * Registers the spilling queue with this network connection. The network connection is then in charge of polling the elements from the queue.
 * @param spillingQueue the queue to register
 */
void registerSpillingQueue(final SpillingQueue spillingQueue){
synchronized (this.queuedEnvelopes) {
    checkConnection();
    this.queuedEnvelopes.registerSpillingQueue(spillingQueue);
  }
}

Fixed version (ground truth):
/** 
 * Registers the spilling queue with this network connection. The network connection is then in charge of polling the elements from the queue.
 * @param spillingQueue the queue to register
 */
void registerSpillingQueue(final SpillingQueue spillingQueue){
}
Program: 87777
Project: 87777
Buggy source:
private void showOustandingEnvelopeLog(){
  int dataAvailableCounter=0;
  final int pos=this.outstandingEnvelopesAsIntBuffer.position();
  final int limit=this.outstandingEnvelopesAsIntBuffer.limit();
  for (int i=0; i < this.outstandingEnvelopesAsIntBuffer.capacity(); ++i) {
    if (i < pos) {
      System.out.print('_');
      continue;
    }
    if (i >= limit) {
      System.out.print('_');
      continue;
    }
    final int entry=this.outstandingEnvelopesAsIntBuffer.get(i);
    final int channelIndex=getInputChannel(entry);
    final boolean dataAvailable=getDataAvailability(entry);
    if (dataAvailable) {
      ++dataAvailableCounter;
    }
    char ch=(char)(((int)'A') + channelIndex + (dataAvailable ? 0 : 32));
    System.out.print(ch);
  }
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + dataAvailableCounter);
}

Fixed version (ground truth):
private void showOustandingEnvelopeLog(){
  int dataAvailableCounter=0;
  final int pos=this.outstandingEnvelopesAsIntBuffer.position();
  final int limit=this.outstandingEnvelopesAsIntBuffer.limit();
  final StringBuilder sb=new StringBuilder();
  for (int i=0; i < this.outstandingEnvelopesAsIntBuffer.capacity(); ++i) {
    if (i < pos) {
      sb.append('_');
      continue;
    }
    if (i >= limit) {
      sb.append('_');
      continue;
    }
    final int entry=this.outstandingEnvelopesAsIntBuffer.get(i);
    final int channelIndex=getInputChannel(entry);
    final boolean dataAvailable=getDataAvailability(entry);
    if (dataAvailable) {
      ++dataAvailableCounter;
    }
    char ch=(char)(((int)'A') + channelIndex + (dataAvailable ? 0 : 32));
    sb.append(ch);
  }
  LOG.debug(sb.toString());
}
Program: 87780
Project: 87780
Buggy source:
RuntimeInputGateContext(final String taskName,final TransferEnvelopeDispatcher transferEnvelopeDispatcher,final InputGate<? extends Record> inputGate,final EnvelopeConsumptionTracker envelopeConsumptionTracker){
  this.taskName=taskName;
  this.localBufferPool=new LocalBufferPool(1,false);
  this.transferEnvelopeDispatcher=transferEnvelopeDispatcher;
  this.inputGate=inputGate;
  this.envelopeConsumptionTracker=envelopeConsumptionTracker;
}

Fixed version (ground truth):
RuntimeInputGateContext(final String taskName,final TransferEnvelopeDispatcher transferEnvelopeDispatcher,final InputGate<? extends Record> inputGate,final EnvelopeConsumptionTracker envelopeConsumptionTracker){
  this.taskName=taskName;
  this.localBufferPool=new LocalBufferPool(1,false);
  this.transferEnvelopeDispatcher=transferEnvelopeDispatcher;
  this.inputGate=inputGate;
  this.envelopeConsumptionTracker=envelopeConsumptionTracker;
  this.fileBufferManager=FileBufferManager.getInstance();
}
Program: 87781
Project: 87781
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public Buffer requestEmptyBufferBlocking(final int minimumSizeOfBuffer) throws IOException, InterruptedException {
  return this.localBufferPool.requestEmptyBufferBlocking(minimumSizeOfBuffer);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public Buffer requestEmptyBufferBlocking(final int minimumSizeOfBuffer) throws IOException, InterruptedException {
  final Buffer buffer=this.localBufferPool.requestEmptyBuffer(minimumSizeOfBuffer);
  if (buffer != null) {
    return buffer;
  }
  if (this.envelopeConsumptionTracker.followsLog()) {
    return BufferFactory.createFromFile(minimumSizeOfBuffer,this.inputGate.getGateID(),fileBufferManager);
  }
  return this.localBufferPool.requestEmptyBufferBlocking(minimumSizeOfBuffer);
}
Program: 87783
Project: 87783
Buggy source:
void finish(){
synchronized (this) {
    writeAnnouncedEnvelopesBufferToDisk();
  }
}

Fixed version (ground truth):
void finish(){
synchronized (this) {
    if (this.announcedEnvelopesAsIntBuffer.position() == 0) {
      return;
    }
  }
  final EnvelopeConsumptionLog lock=this;
  final Thread finisherThread=new Thread("String_Node_Str" + this.environment.getTaskNameWithIndex()){
    /** 
 * {@inheritDoc}
 */
    @Override public void run(){
synchronized (lock) {
        writeAnnouncedEnvelopesBufferToDisk();
      }
    }
  }
;
  finisherThread.start();
  boolean regularExit=false;
  while (!regularExit) {
    try {
      finisherThread.join();
      regularExit=true;
    }
 catch (    InterruptedException ie) {
    }
  }
}
Program: 87784
Project: 87784
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean isInputChannel(){
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean isInputChannel(){
  return false;
}
Program: 87785
Project: 87785
Buggy source:
private void sendReceiverNotFoundEvent(final TransferEnvelope envelope,final ChannelID unknownReceiver){
  if (ChannelID.SYSTEM_ID.equals(envelope.getSource())) {
    LOG.error("String_Node_Str");
    return;
  }
  final JobID jobID=envelope.getJobID();
  final TransferEnvelope transferEnvelope=new TransferEnvelope(0,jobID,ChannelID.SYSTEM_ID);
  final ReceiverNotFoundEvent unknownReceiverEvent=new ReceiverNotFoundEvent(unknownReceiver,envelope.getSequenceNumber());
  transferEnvelope.addEvent(unknownReceiverEvent);
  final TransferEnvelopeReceiverList receiverList=getReceiverList(jobID,unknownReceiver);
  if (receiverList == null) {
    LOG.error("String_Node_Str" + unknownReceiver);
    return;
  }
  processEnvelopeEnvelopeWithoutBuffer(transferEnvelope,receiverList);
}

Fixed version (ground truth):
private void sendReceiverNotFoundEvent(final TransferEnvelope envelope,final ChannelID receiver){
  if (envelope.getBuffer() == null && envelope.getSequenceNumber() == 0) {
    final EventList eventList=envelope.getEventList();
    if (eventList.size() == 1) {
      final AbstractEvent event=eventList.get(0);
      if (event instanceof ReceiverNotFoundEvent) {
        LOG.info("String_Node_Str");
        return;
      }
    }
  }
  final JobID jobID=envelope.getJobID();
  final TransferEnvelope transferEnvelope=new TransferEnvelope(0,jobID,receiver);
  final ReceiverNotFoundEvent unknownReceiverEvent=new ReceiverNotFoundEvent(receiver,envelope.getSequenceNumber());
  transferEnvelope.addEvent(unknownReceiverEvent);
  final TransferEnvelopeReceiverList receiverList=getReceiverList(jobID,receiver);
  if (receiverList == null) {
    LOG.error("String_Node_Str" + receiver);
    return;
  }
  processEnvelopeEnvelopeWithoutBuffer(transferEnvelope,receiverList);
}
Program: 87787
Project: 87787
Buggy source:
@Override public BufferProvider getBufferProvider(final JobID jobID,final ChannelID sourceChannelID) throws IOException, InterruptedException {
  final TransferEnvelopeReceiverList receiverList=getReceiverList(jobID,sourceChannelID);
  if (receiverList.hasLocalReceivers() && !receiverList.hasRemoteReceivers()) {
    final List<ChannelID> localReceivers=receiverList.getLocalReceivers();
    if (localReceivers.size() == 1) {
      final ChannelID localReceiver=localReceivers.get(0);
      final ChannelContext cc=this.registeredChannels.get(localReceiver);
      if (cc == null) {
        return this.transitBufferPool;
      }
      if (!cc.isInputChannel()) {
        throw new IOException("String_Node_Str" + localReceiver + "String_Node_Str");
      }
      final InputChannelContext icc=(InputChannelContext)cc;
      return icc;
    }
  }
  return this.transitBufferPool;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public BufferProvider getBufferProvider(final JobID jobID,final ChannelID sourceChannelID) throws IOException, InterruptedException {
  final TransferEnvelopeReceiverList receiverList=getReceiverList(jobID,sourceChannelID);
  if (receiverList.hasLocalReceivers() && !receiverList.hasRemoteReceivers()) {
    final List<ChannelID> localReceivers=receiverList.getLocalReceivers();
    if (localReceivers.size() == 1) {
      final ChannelID localReceiver=localReceivers.get(0);
      final ChannelContext cc=this.registeredChannels.get(localReceiver);
      if (cc == null) {
        return this.transitBufferPool;
      }
      if (!cc.isInputChannel()) {
        throw new IOException("String_Node_Str" + localReceiver + "String_Node_Str");
      }
      final InputChannelContext icc=(InputChannelContext)cc;
      return icc;
    }
  }
  return this.transitBufferPool;
}
Program: 87788
Project: 87788
Buggy source:
public static Buffer createFromMemory(final int bufferSize,final ByteBuffer byteBuffer,final Queue<ByteBuffer> queueForRecycledBuffers){
  final InternalBuffer internalBuffer=new MemoryBuffer(bufferSize,byteBuffer,queueForRecycledBuffers);
  return new Buffer(internalBuffer);
}

Fixed version (ground truth):
public static Buffer createFromMemory(final int bufferSize,final ByteBuffer byteBuffer,final MemoryBufferPoolConnector bufferPoolConnector){
  final InternalBuffer internalBuffer=new MemoryBuffer(bufferSize,byteBuffer,bufferPoolConnector);
  return new Buffer(internalBuffer);
}
Program: 87789
Project: 87789
Buggy source:
/** 
 * Increases the number of references to the physical buffer by one.
 */
synchronized void increaseReferenceCounter(){
  if (this.bufferAlreadyRecycled) {
    LOG.error("String_Node_Str");
  }
  ++this.referenceCounter;
}

Fixed version (ground truth):
/** 
 * Increases the number of references to the physical buffer by one.
 */
void increaseReferenceCounter(){
  if (this.referenceCounter.getAndIncrement() == 0) {
    LOG.error("String_Node_Str");
  }
}
Program: 87790
Project: 87790
Buggy source:
/** 
 * Constructs a new memory buffer recycler.
 * @param originalBuffer the original byte buffer
 * @param queueForRecycledBuffers the queue to append the buffer for recycling
 */
MemoryBufferRecycler(final ByteBuffer originalBuffer,final Queue<ByteBuffer> queueForRecycledBuffers){
  this.originalBuffer=originalBuffer;
  this.queueForRecycledBuffers=queueForRecycledBuffers;
}

Fixed version (ground truth):
/** 
 * Constructs a new memory buffer recycler.
 * @param originalBuffer the original byte buffer
 * @param bufferPoolConnector the connection to the pool from which the byte buffer has originally been taken
 */
MemoryBufferRecycler(final ByteBuffer originalBuffer,final MemoryBufferPoolConnector bufferPoolConnector){
  this.originalBuffer=originalBuffer;
  this.bufferPoolConnector=bufferPoolConnector;
}
Program: 87791
Project: 87791
Buggy source:
/** 
 * Decreases the number of references to the physical buffer by one. If the number of references becomes zero the physical buffer is recycled.
 */
synchronized void decreaseReferenceCounter(){
  if (this.bufferAlreadyRecycled) {
    LOG.error("String_Node_Str");
  }
  --this.referenceCounter;
  if (this.referenceCounter <= 0) {
    this.originalBuffer.clear();
synchronized (this.queueForRecycledBuffers) {
      this.queueForRecycledBuffers.add(this.originalBuffer);
      this.queueForRecycledBuffers.notify();
    }
    this.bufferAlreadyRecycled=true;
  }
}

Fixed version (ground truth):
/** 
 * Decreases the number of references to the physical buffer by one. If the number of references becomes zero the physical buffer is recycled.
 */
void decreaseReferenceCounter(){
  final int val=this.referenceCounter.decrementAndGet();
  if (val == 0) {
    this.originalBuffer.clear();
    this.bufferPoolConnector.recycle(this.originalBuffer);
  }
 else   if (val < 0) {
    LOG.error("String_Node_Str");
  }
}
Program: 87792
Project: 87792
Buggy source:
public LocalBufferPool(final String ownerName,final int designatedNumberOfBuffers,final boolean isShared){
  this(ownerName,designatedNumberOfBuffers,isShared,null);
}

Fixed version (ground truth):
public LocalBufferPool(final int designatedNumberOfBuffers,final boolean isShared){
  this(designatedNumberOfBuffers,isShared,null);
}
Program: 87794
Project: 87794
Buggy source:
public ByteBufferedChannelManager(final ChannelLookupProtocol channelLookupService,final InstanceConnectionInfo localInstanceConnectionInfo) throws IOException {
  this.channelLookupService=channelLookupService;
  this.localConnectionInfo=localInstanceConnectionInfo;
  FileBufferManager.getInstance();
  GlobalBufferPool.getInstance();
  this.transitBufferPool=new LocalBufferPool("String_Node_Str",128,true);
  this.networkConnectionManager=new NetworkConnectionManager(this,localInstanceConnectionInfo.getAddress(),localInstanceConnectionInfo.getDataPort());
  this.allowSenderSideSpilling=GlobalConfiguration.getBoolean("String_Node_Str",DEFAULT_ALLOW_SENDER_SIDE_SPILLING);
  this.mergeSpilledBuffers=GlobalConfiguration.getBoolean("String_Node_Str",DEFAULT_MERGE_SPILLED_BUFFERS);
  LOG.info("String_Node_Str" + (this.allowSenderSideSpilling ? "String_Node_Str" : "String_Node_Str") + (this.mergeSpilledBuffers ? "String_Node_Str" : "String_Node_Str"));
}

Fixed version (ground truth):
public ByteBufferedChannelManager(final ChannelLookupProtocol channelLookupService,final InstanceConnectionInfo localInstanceConnectionInfo) throws IOException {
  this.channelLookupService=channelLookupService;
  this.localConnectionInfo=localInstanceConnectionInfo;
  FileBufferManager.getInstance();
  GlobalBufferPool.getInstance();
  this.transitBufferPool=new LocalBufferPool(128,true);
  this.networkConnectionManager=new NetworkConnectionManager(this,localInstanceConnectionInfo.getAddress(),localInstanceConnectionInfo.getDataPort());
  this.allowSenderSideSpilling=GlobalConfiguration.getBoolean("String_Node_Str",DEFAULT_ALLOW_SENDER_SIDE_SPILLING);
  this.mergeSpilledBuffers=GlobalConfiguration.getBoolean("String_Node_Str",DEFAULT_MERGE_SPILLED_BUFFERS);
  LOG.info("String_Node_Str" + (this.allowSenderSideSpilling ? "String_Node_Str" : "String_Node_Str") + (this.mergeSpilledBuffers ? "String_Node_Str" : "String_Node_Str"));
}
Program: 87795
Project: 87795
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void clearLocalBufferPool(){
  this.localBufferPool.clear();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void clearLocalBufferPool(){
  this.localBufferPool.destroy();
}