nus-yam/ex-repair huggingface dataset:
Program: 55540
Project: 55540
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: 55542
Project: 55542
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: 55543
Project: 55543
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: 55545
Project: 55545
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: 55546
Project: 55546
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void logQueuedEnvelopes(){
  this.encapsulatedContext.logQueuedEnvelopes();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void logQueuedEnvelopes(){
  if (this.encapsulatedContext != null) {
    this.encapsulatedContext.logQueuedEnvelopes();
  }
}
Program: 55547
Project: 55547
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void processEvent(final AbstractEvent event){
  if (event instanceof ByteBufferedChannelCloseEvent) {
    LOG.info("String_Node_Str");
  }
 else   if (event instanceof UnexpectedEnvelopeEvent) {
    final UnexpectedEnvelopeEvent uee=(UnexpectedEnvelopeEvent)event;
    if (uee.getExpectedSequenceNumber() > this.nextEnvelopeToSend) {
      this.nextEnvelopeToSend=uee.getExpectedSequenceNumber();
    }
  }
 else {
    LOG.warn("String_Node_Str" + event);
  }
  getNext().processEvent(event);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void processEvent(final AbstractEvent event){
  if (event instanceof ByteBufferedChannelCloseEvent) {
    LOG.info("String_Node_Str");
  }
 else   if (event instanceof UnexpectedEnvelopeEvent) {
    final UnexpectedEnvelopeEvent uee=(UnexpectedEnvelopeEvent)event;
    if (uee.getExpectedSequenceNumber() > this.nextEnvelopeToSend) {
      this.nextEnvelopeToSend=uee.getExpectedSequenceNumber();
    }
  }
 else   if (event instanceof ReceiverNotFoundEvent) {
    final ReceiverNotFoundEvent rnfe=(ReceiverNotFoundEvent)event;
    LOG.warn("String_Node_Str" + rnfe.getReceiverID() + "String_Node_Str"+ rnfe.getSequenceNumber());
  }
 else {
    LOG.warn("String_Node_Str" + event);
  }
  getNext().processEvent(event);
}
Program: 55549
Project: 55549
Buggy source:
/** 
 * Updates the vertex's current execution state.
 * @param newExecutionState the new execution state
 * @param optionalMessage an optional message related to the state change
 */
public ExecutionState updateExecutionState(ExecutionState newExecutionState,final String optionalMessage){
  if (newExecutionState == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (this.executionState.get() == ExecutionState.CANCELING && newExecutionState == ExecutionState.FINISHED) {
    LOG.info("String_Node_Str" + toString() + "String_Node_Str");
    newExecutionState=ExecutionState.CANCELED;
  }
  final ExecutionState previousState=this.executionState.getAndSet(newExecutionState);
  if (previousState == newExecutionState) {
    return previousState;
  }
  ExecutionStateTransition.checkTransition(true,toString(),previousState,newExecutionState);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,newExecutionState,optionalMessage);
  }
  return previousState;
}

Fixed version (ground truth):
/** 
 * Updates the vertex's current execution state.
 * @param newExecutionState the new execution state
 * @param optionalMessage an optional message related to the state change
 */
public ExecutionState updateExecutionState(ExecutionState newExecutionState,final String optionalMessage){
  if (newExecutionState == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final ExecutionState currentExecutionState=this.executionState.get();
  if (currentExecutionState == ExecutionState.CANCELING) {
    if (newExecutionState == ExecutionState.FINISHING) {
      return currentExecutionState;
    }
    if (newExecutionState == ExecutionState.FINISHED) {
      LOG.info("String_Node_Str" + toString() + "String_Node_Str");
      newExecutionState=ExecutionState.CANCELED;
    }
  }
  final ExecutionState previousState=this.executionState.getAndSet(newExecutionState);
  if (previousState == newExecutionState) {
    return previousState;
  }
  ExecutionStateTransition.checkTransition(true,toString(),previousState,newExecutionState);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,newExecutionState,optionalMessage);
  }
  return previousState;
}
Program: 55551
Project: 55551
Buggy source:
public void executionStateChanged(final JobID jobID,final ExecutionVertexID id,final ExecutionState newExecutionState,final String optionalDescription){
  if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED || newExecutionState == ExecutionState.FAILED) {
    unregisterTask(id);
  }
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):
public void executionStateChanged(final JobID jobID,final ExecutionVertexID id,final ExecutionState newExecutionState,final String optionalDescription){
  if (newExecutionState == ExecutionState.CANCELING) {
    return;
  }
  if (newExecutionState == ExecutionState.FINISHED || newExecutionState == ExecutionState.CANCELED || newExecutionState == ExecutionState.FAILED) {
    unregisterTask(id);
  }
synchronized (this.jobManager) {
    try {
      this.jobManager.updateTaskExecutionState(new TaskExecutionState(jobID,id,newExecutionState,optionalDescription));
    }
 catch (    IOException e) {
      LOG.error(StringUtils.stringifyException(e));
    }
  }
}
Program: 55552
Project: 55552
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: 55553
Project: 55553
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: 55555
Project: 55555
Buggy source:
boolean hasDataLeft();

Fixed version (ground truth):
boolean hasDataLeft() throws IOException, InterruptedException ;
Program: 55556
Project: 55556
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: 55557
Project: 55557
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: 55558
Project: 55558
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: 55559
Project: 55559
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: 55560
Project: 55560
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: 55561
Project: 55561
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: 55562
Project: 55562
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: 55563
Project: 55563
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ChannelType getType(){
  return this.encapsulatedContext.getType();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ChannelType getType(){
  return null;
}
Program: 55564
Project: 55564
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: 55566
Project: 55566
Buggy source:
/** 
 * Cancels or kills the task.
 * @param cancel <code>true/code> if the task shall be canceled, <code>false</code> if it shall be killed
 */
private void cancelOrKillExecution(final boolean cancel){
  final Thread executingThread=this.environment.getExecutingThread();
  if (executingThread == null) {
    return;
  }
  if (this.executionState != ExecutionState.RUNNING && this.executionState != ExecutionState.REPLAYING && this.executionState != ExecutionState.FINISHING) {
    return;
  }
  LOG.info((cancel ? "String_Node_Str" : "String_Node_Str") + this.environment.getTaskNameWithIndex());
  if (cancel) {
    this.isCanceled=true;
    executionStateChanged(ExecutionState.CANCELING,null);
  }
  try {
    final AbstractInvokable invokable=this.environment.getInvokable();
    if (invokable != null) {
      invokable.cancel();
    }
  }
 catch (  Throwable e) {
    LOG.error(StringUtils.stringifyException(e));
  }
  while (true) {
    executingThread.interrupt();
    if (!executingThread.isAlive()) {
      break;
    }
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      break;
    }
    LOG.info((cancel == true ? "String_Node_Str" : "String_Node_Str") + this.environment.getTaskName() + "String_Node_Str"+ this.executionState);
  }
}

Fixed version (ground truth):
/** 
 * Cancels or kills the task.
 * @param cancel <code>true/code> if the task shall be canceled, <code>false</code> if it shall be killed
 */
private void cancelOrKillExecution(final boolean cancel){
  final Thread executingThread=this.environment.getExecutingThread();
  if (executingThread == null) {
    return;
  }
  if (this.executionState != ExecutionState.RUNNING && this.executionState != ExecutionState.REPLAYING && this.executionState != ExecutionState.FINISHING) {
    return;
  }
  LOG.info((cancel ? "String_Node_Str" : "String_Node_Str") + this.environment.getTaskNameWithIndex());
  if (cancel) {
    this.isCanceled=true;
    executionStateChanged(ExecutionState.CANCELING,null);
    try {
      final AbstractInvokable invokable=this.environment.getInvokable();
      if (invokable != null) {
        invokable.cancel();
      }
    }
 catch (    Throwable e) {
      LOG.error(StringUtils.stringifyException(e));
    }
  }
  while (true) {
    executingThread.interrupt();
    if (!executingThread.isAlive()) {
      break;
    }
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      break;
    }
    LOG.info((cancel == true ? "String_Node_Str" : "String_Node_Str") + this.environment.getTaskName() + "String_Node_Str"+ this.executionState);
  }
}
Program: 55567
Project: 55567
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: 55568
Project: 55568
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: 55569
Project: 55569
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: 55570
Project: 55570
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: 55571
Project: 55571
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: 55572
Project: 55572
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: 55573
Project: 55573
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: 55576
Project: 55576
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: 55577
Project: 55577
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: 55578
Project: 55578
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: 55579
Project: 55579
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: 55580
Project: 55580
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: 55581
Project: 55581
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: 55582
Project: 55582
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean isInputChannel(){
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean isInputChannel(){
  return false;
}
Program: 55583
Project: 55583
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: 55586
Project: 55586
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: 55588
Project: 55588
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: 55589
Project: 55589
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: 55592
Project: 55592
Buggy source:
public boolean keepsUniqueProperty(FieldSet uniqueSet,int input){
  for (  Integer uniqueField : uniqueSet) {
    if (isFieldKept(uniqueField,input) == false) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean keepsUniqueProperty(FieldSet uniqueSet,int input){
  for (  Integer uniqueField : uniqueSet) {
    if (isFieldKept(input,uniqueField) == false) {
      return false;
    }
  }
  return true;
}
Program: 55593
Project: 55593
Buggy source:
private void recycleBuffer(final ByteBuffer byteBuffer){
synchronized (this.buffers) {
    if (this.isDestroyed) {
      this.globalBufferPool.releaseGlobalBuffer(this.buffers.poll());
      this.requestedNumberOfBuffers--;
      return;
    }
    this.buffers.add(byteBuffer);
    this.buffers.notify();
  }
}

Fixed version (ground truth):
private void recycleBuffer(final ByteBuffer byteBuffer){
synchronized (this.buffers) {
    if (this.isDestroyed) {
      this.globalBufferPool.releaseGlobalBuffer(byteBuffer);
      this.requestedNumberOfBuffers--;
      return;
    }
    this.buffers.add(byteBuffer);
    this.buffers.notify();
  }
}
Program: 55594
Project: 55594
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: 55596
Project: 55596
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: 55597
Project: 55597
Buggy source:
/** 
 * Returns the key column numbers for the specific input if it is preserved by this node. Null, otherwise.
 * @param input
 * @return
 */
protected int[] getConstantKeySet(int input){
  int[] keyColumns=null;
  Contract contract=getPactContract();
  if (contract instanceof AbstractPact<?>) {
    AbstractPact<?> abstractPact=(AbstractPact<?>)contract;
    keyColumns=abstractPact.getKeyColumnNumbers(input);
    if (keyColumns != null) {
      for (      int keyColumn : keyColumns) {
        if (isFieldKept(input,keyColumn) == false) {
          keyColumns=null;
          break;
        }
      }
    }
  }
  return keyColumns;
}

Fixed version (ground truth):
/** 
 * Returns the key column numbers for the specific input if it is preserved by this node. Null, otherwise.
 * @param input
 * @return
 */
protected int[] getConstantKeySet(int input){
  int[] keyColumns=null;
  Contract contract=getPactContract();
  if (contract instanceof AbstractPact<?>) {
    AbstractPact<?> abstractPact=(AbstractPact<?>)contract;
    keyColumns=abstractPact.getKeyColumnNumbers(input);
    if (keyColumns != null) {
      if (keyColumns.length == 0) {
        return null;
      }
      for (      int keyColumn : keyColumns) {
        if (isFieldKept(input,keyColumn) == false) {
          return null;
        }
      }
    }
  }
  return keyColumns;
}
Program: 55599
Project: 55599
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){
}