nus-yam/ex-repair huggingface dataset:
Program: 55655
Project: 55655
Buggy source:
/** 
 * Actually builds the plan but guarantees that the output can be read without additional knowledge. Currently the   {@link SequentialOutputFormat} is used for a guaranteeddeserializable output.<br> If a data source is not  {@link SequentialOutputFormat}, it is replaced by a   {@link SplittingOutputFormat}, with two outputs: the original one and one   {@link SequentialOutputFormat}.
 */
private Plan buildPlanWithReadableSinks(){
  final Collection<FileDataSink> existingSinks=this.getDataSinks();
  final Collection<GenericDataSink> wrappedSinks=new ArrayList<GenericDataSink>();
  for (  final FileDataSink fileSink : existingSinks)   if (!fileSink.getFormatClass().equals(SequentialOutputFormat.class)) {
    TestPairs expectedValues=this.expectedOutputs.get(fileSink);
    if (expectedValues == null)     continue;
    final FileDataSink safeSink=createDefaultSink(fileSink.getName());
    safeSink.setInputs(fileSink.getInputs());
    wrappedSinks.add(fileSink);
    wrappedSinks.add(safeSink);
    this.expectedOutputs.put(safeSink,expectedValues);
    this.actualOutputs.put(safeSink,this.getActualOutput(fileSink));
    this.getActualOutput(fileSink).fromFile(SequentialInputFormat.class,safeSink.getFilePath());
  }
 else {
    wrappedSinks.add(fileSink);
    this.getActualOutput(fileSink).fromFile(SequentialInputFormat.class,fileSink.getFilePath());
  }
  return new Plan(wrappedSinks);
}

Fixed version (ground truth):
/** 
 * Actually builds the plan but guarantees that the output can be read without additional knowledge. Currently the   {@link SequentialOutputFormat} is used for a guaranteeddeserializable output.<br> If a data source is not  {@link SequentialOutputFormat}, it is replaced by a   {@link SplittingOutputFormat}, with two outputs: the original one and one   {@link SequentialOutputFormat}.
 */
private Plan buildPlanWithReadableSinks(){
  final Collection<FileDataSink> existingSinks=this.getDataSinks();
  final Collection<GenericDataSink> wrappedSinks=new ArrayList<GenericDataSink>();
  for (  final FileDataSink fileSink : existingSinks)   if (!fileSink.getFormatClass().equals(SequentialOutputFormat.class)) {
    TestRecords expectedValues=this.expectedOutputs.get(fileSink);
    if (expectedValues == null)     continue;
    final FileDataSink safeSink=createDefaultSink(fileSink.getName());
    safeSink.setInputs(fileSink.getInputs());
    wrappedSinks.add(fileSink);
    wrappedSinks.add(safeSink);
    this.expectedOutputs.put(safeSink,expectedValues);
    this.actualOutputs.put(safeSink,this.getActualOutput(fileSink));
    this.getActualOutput(fileSink).fromFile(SequentialInputFormat.class,safeSink.getFilePath());
  }
 else {
    wrappedSinks.add(fileSink);
    this.getActualOutput(fileSink).fromFile(SequentialInputFormat.class,fileSink.getFilePath());
  }
  return new Plan(wrappedSinks);
}
Program: 55656
Project: 55656
Buggy source:
private void validateResults(){
  for (  final FileDataSink sinkContract : this.getDataSinks()) {
    TestPairs expectedValues=this.expectedOutputs.get(sinkContract);
    if (sinkContract.getFormatClass() == SequentialOutputFormat.class && expectedValues != null && expectedValues.isInitialized()) {
      final TestPairs actualValues=new TestPairs();
      actualValues.fromFile(SequentialInputFormat.class,sinkContract.getFilePath());
      FuzzyTestValueMatcher fuzzyMatcher=this.getFuzzyMatcher(sinkContract);
      FuzzyTestValueSimilarity fuzzySimilarity=this.getFuzzySimilarity(sinkContract);
      try {
        actualValues.assertEquals(expectedValues,fuzzyMatcher,fuzzySimilarity);
      }
 catch (      AssertionError e) {
        AssertionError assertionError=new AssertionError(sinkContract.getName() + "String_Node_Str" + e.getMessage());
        assertionError.initCause(e.getCause());
        throw assertionError;
      }
    }
  }
}

Fixed version (ground truth):
private void validateResults(){
  for (  final FileDataSink sinkContract : this.getDataSinks()) {
    TestRecords expectedValues=this.expectedOutputs.get(sinkContract);
    if (sinkContract.getFormatClass() == SequentialOutputFormat.class && expectedValues != null && expectedValues.isInitialized()) {
      final TestRecords actualValues=new TestRecords();
      actualValues.fromFile(SequentialInputFormat.class,sinkContract.getFilePath());
      FuzzyTestValueMatcher fuzzyMatcher=this.getFuzzyMatcher(sinkContract);
      FuzzyTestValueSimilarity fuzzySimilarity=this.getFuzzySimilarity(sinkContract);
      try {
        actualValues.assertEquals(expectedValues,fuzzyMatcher,fuzzySimilarity);
      }
 catch (      AssertionError e) {
        AssertionError assertionError=new AssertionError(sinkContract.getName() + "String_Node_Str" + e.getMessage());
        assertionError.initCause(e.getCause());
        throw assertionError;
      }
    }
  }
}
Program: 55659
Project: 55659
Buggy source:
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(GlobalProperties other){
  if (this.partitioning != PartitionProperty.NONE) {
    if (this.partitioning == PartitionProperty.ANY) {
      if (other.partitioning == PartitionProperty.NONE) {
        return false;
      }
    }
 else     if (other.partitioning != this.partitioning) {
      return false;
    }
  }
  FieldSet otherPartitionedFields=other.getPartitionedFiels();
  if (this.partitionedFields != null) {
    if (other.partitionedFields == null) {
      return false;
    }
    if (this.partitionedFields.size() > otherPartitionedFields.size()) {
      return false;
    }
    for (    Integer fieldIndex : this.partitionedFields) {
      if (otherPartitionedFields.contains(fieldIndex) == false) {
        return false;
      }
    }
  }
  return this.ordering.isMetBy(other.getOrdering());
}

Fixed version (ground truth):
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(GlobalProperties other){
  if (this.partitioning != PartitionProperty.NONE) {
    if (this.partitioning == PartitionProperty.ANY) {
      if (other.partitioning == PartitionProperty.NONE) {
        return false;
      }
    }
 else     if (other.partitioning != this.partitioning) {
      return false;
    }
  }
  FieldSet otherPartitionedFields=other.getPartitionedFiels();
  if (this.partitionedFields != null) {
    if (other.partitionedFields == null) {
      return false;
    }
    if (this.partitionedFields.size() > otherPartitionedFields.size()) {
      return false;
    }
    for (    Integer fieldIndex : this.partitionedFields) {
      if (otherPartitionedFields.contains(fieldIndex) == false) {
        return false;
      }
    }
  }
  return (this.ordering == null || this.ordering.isMetBy(other.getOrdering()));
}
Program: 55660
Project: 55660
Buggy source:
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(LocalProperties other){
  boolean groupingFulfilled=false;
  if (this.grouped) {
    if (other.isGrouped()) {
      groupingFulfilled=this.groupedFields.equals(other.groupedFields);
    }
    if (!groupingFulfilled && other.getOrdering() != null) {
      ArrayList<Integer> otherIndexes=other.getOrdering().getInvolvedIndexes();
      if (groupedFields.size() > otherIndexes.size()) {
        return false;
      }
      for (int i=0; i < groupedFields.size(); i++) {
        if (groupedFields.contains(otherIndexes.get(i)) == false) {
          return false;
        }
      }
    }
  }
  if (groupingFulfilled == false) {
    return false;
  }
  return this.ordering.isMetBy(other.getOrdering());
}

Fixed version (ground truth):
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(LocalProperties other){
  boolean groupingFulfilled=false;
  if (this.grouped) {
    if (other.isGrouped()) {
      groupingFulfilled=this.groupedFields.equals(other.groupedFields);
    }
    if (!groupingFulfilled && other.getOrdering() != null) {
      ArrayList<Integer> otherIndexes=other.getOrdering().getInvolvedIndexes();
      if (groupedFields.size() > otherIndexes.size()) {
        return false;
      }
      for (int i=0; i < groupedFields.size(); i++) {
        if (groupedFields.contains(otherIndexes.get(i)) == false) {
          return false;
        }
      }
    }
  }
  if (groupingFulfilled == false) {
    return false;
  }
  return (this.ordering == null || this.ordering.isMetBy(other.getOrdering()));
}
Program: 55662
Project: 55662
Buggy source:
@Override public List<List<PactConnection>> getIncomingConnections(){
  return this.inputs;
}

Fixed version (ground truth):
@Override public List<List<PactConnection>> getIncomingConnections(){
  ArrayList<List<PactConnection>> inputs=new ArrayList<List<PactConnection>>(2);
  inputs.add(0,input1);
  inputs.add(1,input2);
  return inputs;
}
Program: 55665
Project: 55665
Buggy source:
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(GlobalProperties other){
  if (this.partitioning != PartitionProperty.NONE) {
    if (this.partitioning == PartitionProperty.ANY) {
      if (other.partitioning == PartitionProperty.NONE) {
        return false;
      }
    }
 else     if (other.partitioning != this.partitioning) {
      return false;
    }
  }
  FieldSet otherPartitionedFields=other.getPartitionedFiels();
  if (this.partitionedFields != null) {
    if (other.partitionedFields == null) {
      return false;
    }
    if (this.partitionedFields.size() > otherPartitionedFields.size()) {
      return false;
    }
    for (    Integer fieldIndex : this.partitionedFields) {
      if (otherPartitionedFields.contains(fieldIndex) == false) {
        return false;
      }
    }
  }
  return (this.ordering == null || this.ordering.isMetBy(other.getOrdering()));
}

Fixed version (ground truth):
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(GlobalProperties other){
  if (this.partitioning != PartitionProperty.NONE) {
    if (this.partitioning == PartitionProperty.ANY) {
      if (other.partitioning == PartitionProperty.NONE) {
        return false;
      }
    }
 else     if (other.partitioning != this.partitioning) {
      return false;
    }
  }
  FieldSet otherPartitionedFields=other.getPartitionedFiels();
  if (this.partitionedFields != null) {
    if (other.partitionedFields == null) {
      return false;
    }
    if (this.partitionedFields.size() < otherPartitionedFields.size()) {
      return false;
    }
    if (this.partitionedFields.containsAll(otherPartitionedFields) == false) {
      return false;
    }
  }
  return (this.ordering == null || this.ordering.isMetBy(other.getOrdering()));
}
Program: 55666
Project: 55666
Buggy source:
public GlobalProperties clone() throws CloneNotSupportedException {
  return (GlobalProperties)super.clone();
}

Fixed version (ground truth):
public GlobalProperties clone() throws CloneNotSupportedException {
  GlobalProperties newProps=(GlobalProperties)super.clone();
  if (this.ordering != null) {
    newProps.ordering=this.ordering.clone();
  }
  if (this.partitionedFields != null) {
    newProps.partitionedFields=(FieldSet)this.partitionedFields.clone();
  }
  return newProps;
}
Program: 55667
Project: 55667
Buggy source:
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(LocalProperties other){
  boolean groupingFulfilled=false;
  if (this.grouped) {
    if (other.isGrouped()) {
      groupingFulfilled=this.groupedFields.equals(other.groupedFields);
    }
    if (!groupingFulfilled && other.getOrdering() != null) {
      ArrayList<Integer> otherIndexes=other.getOrdering().getInvolvedIndexes();
      if (groupedFields.size() > otherIndexes.size()) {
        return false;
      }
      for (int i=0; i < groupedFields.size(); i++) {
        if (groupedFields.contains(otherIndexes.get(i)) == false) {
          return false;
        }
      }
    }
  }
  if (groupingFulfilled == false) {
    return false;
  }
  return (this.ordering == null || this.ordering.isMetBy(other.getOrdering()));
}

Fixed version (ground truth):
/** 
 * Checks, if this set of properties, as interesting properties, is met by the given properties.
 * @param other The properties for which to check whether they meet these properties.
 * @return True, if the properties are met, false otherwise.
 */
public boolean isMetBy(LocalProperties other){
  boolean groupingFulfilled=false;
  if (this.grouped) {
    if (other.isGrouped()) {
      groupingFulfilled=this.groupedFields.equals(other.groupedFields);
    }
    if (!groupingFulfilled && other.getOrdering() != null) {
      ArrayList<Integer> otherIndexes=other.getOrdering().getInvolvedIndexes();
      if (groupedFields.size() > otherIndexes.size()) {
        return false;
      }
      for (int i=0; i < groupedFields.size(); i++) {
        if (groupedFields.contains(otherIndexes.get(i)) == false) {
          return false;
        }
      }
      groupingFulfilled=true;
    }
    if (groupingFulfilled == false) {
      return false;
    }
  }
  return (this.ordering == null || this.ordering.isMetBy(other.getOrdering()));
}
Program: 55668
Project: 55668
Buggy source:
@Override public LocalProperties clone() throws CloneNotSupportedException {
  return (LocalProperties)super.clone();
}

Fixed version (ground truth):
@Override public LocalProperties clone() throws CloneNotSupportedException {
  LocalProperties newProps=(LocalProperties)super.clone();
  if (this.ordering != null) {
    newProps.ordering=this.ordering.clone();
  }
  if (this.groupedFields != null) {
    newProps.groupedFields=(FieldSet)this.groupedFields.clone();
  }
  return newProps;
}
Program: 55669
Project: 55669
Buggy source:
public static final List<InterestingProperties> filterByConstantSet(List<InterestingProperties> props,OptimizerNode node,int input){
  List<InterestingProperties> preserved=new ArrayList<InterestingProperties>();
  for (  InterestingProperties p : props) {
    boolean nonTrivial=p.getGlobalProperties().filterByNodesConstantSet(node,input);
    nonTrivial|=p.getLocalProperties().filterByNodesConstantSet(node,input);
    if (nonTrivial) {
      preserved.add(p);
    }
  }
  return preserved;
}

Fixed version (ground truth):
public static final List<InterestingProperties> filterByConstantSet(List<InterestingProperties> props,OptimizerNode node,int input){
  List<InterestingProperties> preserved=new ArrayList<InterestingProperties>();
  for (  InterestingProperties p : props) {
    GlobalProperties preservedGp=p.getGlobalProperties().createCopy();
    LocalProperties preservedLp=p.getLocalProperties().createCopy();
    boolean nonTrivial=preservedGp.filterByNodesConstantSet(node,input);
    nonTrivial|=preservedLp.filterByNodesConstantSet(node,input);
    if (nonTrivial) {
      try {
        preserved.add(new InterestingProperties(p.getMaximalCosts().clone(),preservedGp,preservedLp));
      }
 catch (      CloneNotSupportedException cnse) {
        throw new RuntimeException(cnse);
      }
    }
  }
  return preserved;
}
Program: 55670
Project: 55670
Buggy source:
public boolean isFieldKept(int input,int fieldNumber){
  if (input != 0) {
    throw new IndexOutOfBoundsException();
  }
switch (constantSetMode) {
case Constant:
    return (constantSet != null && Arrays.binarySearch(constantSet,fieldNumber) >= 0);
case Update:
  return (updateSet == null || Arrays.binarySearch(updateSet,fieldNumber) < 0);
default :
return false;
}
}

Fixed version (ground truth):
public boolean isFieldKept(int input,int fieldNumber){
  if (input != 0) {
    throw new IndexOutOfBoundsException();
  }
  if (constantSetMode == null) {
    return false;
  }
switch (constantSetMode) {
case Constant:
    return (constantSet != null && Arrays.binarySearch(constantSet,fieldNumber) >= 0);
case Update:
  return (updateSet == null || Arrays.binarySearch(updateSet,fieldNumber) < 0);
default :
return false;
}
}
Program: 55671
Project: 55671
Buggy source:
public boolean isFieldKept(int input,int fieldNumber){
  ConstantSetMode constantSetMode;
  int[] constantSet;
  int[] updateSet;
switch (input) {
case 0:
    constantSetMode=constantSet1Mode;
  constantSet=constantSet1;
updateSet=updateSet1;
break;
case 1:
constantSetMode=constantSet2Mode;
constantSet=constantSet2;
updateSet=updateSet2;
break;
default :
throw new IndexOutOfBoundsException();
}
switch (constantSetMode) {
case Constant:
return (constantSet != null && Arrays.binarySearch(constantSet,fieldNumber) >= 0);
case Update:
return (updateSet == null || Arrays.binarySearch(updateSet,fieldNumber) < 0);
default :
return false;
}
}

Fixed version (ground truth):
public boolean isFieldKept(int input,int fieldNumber){
  ConstantSetMode constantSetMode;
  int[] constantSet;
  int[] updateSet;
switch (input) {
case 0:
    constantSetMode=constantSet1Mode;
  constantSet=constantSet1;
updateSet=updateSet1;
break;
case 1:
constantSetMode=constantSet2Mode;
constantSet=constantSet2;
updateSet=updateSet2;
break;
default :
throw new IndexOutOfBoundsException();
}
if (constantSetMode == null) {
return false;
}
switch (constantSetMode) {
case Constant:
return (constantSet != null && Arrays.binarySearch(constantSet,fieldNumber) >= 0);
case Update:
return (updateSet == null || Arrays.binarySearch(updateSet,fieldNumber) < 0);
default :
return false;
}
}
Program: 55673
Project: 55673
Buggy source:
/** 
 * Does the aggregation of the query.  sum(l_extendedprice) as revenue GROUP BY l_orderkey, o_shippriority; Output Schema: Key: ORDERKEY Value: 0:ORDERKEY, 1:SHIPPRIORITY, 2:EXTENDEDPRICESUM
 */
@Override public void reduce(Iterator<PactRecord> values,Collector out){
  PactRecord rec=null;
  double partExtendedPriceSum=0;
  while (values.hasNext()) {
    rec=values.next();
    partExtendedPriceSum+=rec.getField(2,PactDouble.class).getValue();
  }
  this.extendedPrice.setValue(partExtendedPriceSum);
  rec.setField(2,this.extendedPrice);
  out.collect(rec);
}

Fixed version (ground truth):
/** 
 * Does the aggregation of the query.  sum(l_extendedprice) as revenue GROUP BY l_orderkey, o_shippriority; Output Schema: Key: ORDERKEY Value: 0:ORDERKEY, 1:SHIPPRIORITY, 2:EXTENDEDPRICESUM
 */
@Override public void reduce(Iterator<PactRecord> values,Collector out){
  PactRecord rec=null;
  double partExtendedPriceSum=0;
  while (values.hasNext()) {
    rec=values.next();
    partExtendedPriceSum+=rec.getField(5,PactDouble.class).getValue();
  }
  this.extendedPrice.setValue(partExtendedPriceSum);
  rec.setField(2,this.extendedPrice);
  out.collect(rec);
}
Program: 55674
Project: 55674
Buggy source:
/** 
 * Implements the join between LineItem and Order table on the  order key. WHERE l_orderkey = o_orderkey Output Schema - 0:ORDERKEY, 1:SHIPPRIORITY, 2:EXTENDEDPRICE
 */
@Override public void match(PactRecord first,PactRecord second,Collector out){
  first.setField(2,second.getField(1,PactDouble.class));
  out.collect(first);
}

Fixed version (ground truth):
/** 
 * Implements the join between LineItem and Order table on the  order key. WHERE l_orderkey = o_orderkey Output Schema - 0:ORDERKEY, 1:SHIPPRIORITY, 2:EXTENDEDPRICE
 */
@Override public void match(PactRecord order,PactRecord lineitem,Collector out){
  order.setField(5,lineitem.getField(1,PactDouble.class));
  out.collect(order);
}
Program: 55675
Project: 55675
Buggy source:
/** 
 * Does the projection on the LineItem table  Output Schema - 0:ORDERKEY, 1:null, 2:EXTENDEDPRICE
 */
@Override public void map(PactRecord record,Collector out){
  final Tuple t=record.getField(0,Tuple.class);
  try {
    this.orderKey.setValue(t.getLongValueAt(0));
    this.extendedPrice.setValue(Double.parseDouble(t.getStringValueAt(5)));
    result.setField(0,this.orderKey);
    result.setField(1,this.extendedPrice);
    out.collect(result);
  }
 catch (  NumberFormatException nfe) {
    LOGGER.error(nfe);
  }
}

Fixed version (ground truth):
/** 
 * Filters the orders table by year, orderstatus and orderpriority. o_orderstatus = "X"  AND YEAR(o_orderdate) > Y AND o_orderpriority LIKE "Z" Output Schema - 0:ORDERKEY, 1:SHIPPRIORITY
 */
@Override public void map(final PactRecord record,final Collector out){
  record.getFieldInto(2,orderStatus);
  record.getFieldInto(3,orderDate);
  record.getFieldInto(4,orderPrio);
  if (Integer.parseInt(orderDate.getValue().substring(0,4)) > this.yearFilter && orderStatus.getValue().equals("String_Node_Str") && orderPrio.getValue().startsWith(this.prioFilter)) {
    outRecord.setField(0,record.getField(0,PactLong.class));
    outRecord.setField(1,record.getField(1,PactInteger.class));
    out.collect(outRecord);
  }
}
Program: 55676
Project: 55676
Buggy source:
/** 
 * Creates partial sums on the price attribute for each data batch.
 */
@Override public void combine(Iterator<PactRecord> values,Collector out){
  reduce(values,out);
}

Fixed version (ground truth):
/** 
 * Creates partial sums on the price attribute for each data batch.
 */
@Override public void combine(Iterator<PactRecord> values,Collector out){
  PactRecord rec=null;
  double partExtendedPriceSum=0;
  while (values.hasNext()) {
    rec=values.next();
    partExtendedPriceSum+=rec.getField(5,PactDouble.class).getValue();
  }
  this.extendedPrice.setValue(partExtendedPriceSum);
  rec.setField(5,this.extendedPrice);
  out.collect(rec);
}
Program: 55677
Project: 55677
Buggy source:
@Override public void removeFailurePattern(final TreeItem selectedItem){
  final JobFailurePattern failurePattern=(JobFailurePattern)selectedItem.getData();
  if (failurePattern == null) {
    return;
  }
  final MessageBox messageBox=new MessageBox(this.shell,SWT.ICON_QUESTION | SWT.YES | SWT.NO);
  messageBox.setText("String_Node_Str");
  messageBox.setMessage("String_Node_Str" + failurePattern.getName() + "String_Node_Str");
  if (messageBox.open() != SWT.YES) {
    return;
  }
  selectedItem.dispose();
  this.loadedPatterns.remove(failurePattern.getName());
  if (this.jobTree.getItemCount() == 0) {
    jobFailurePatternSelected(null);
  }
 else {
    jobFailurePatternSelected(this.jobTree.getItem(0));
  }
}

Fixed version (ground truth):
@Override public void removeFailurePattern(final TreeItem selectedItem){
  final JobFailurePattern failurePattern=(JobFailurePattern)selectedItem.getData();
  if (failurePattern == null) {
    return;
  }
  final MessageBox messageBox=new MessageBox(this.shell,SWT.ICON_QUESTION | SWT.YES | SWT.NO);
  messageBox.setText("String_Node_Str");
  messageBox.setMessage("String_Node_Str" + failurePattern.getName() + "String_Node_Str");
  if (messageBox.open() != SWT.YES) {
    return;
  }
  selectedItem.dispose();
  this.loadedPatterns.remove(failurePattern.getName());
  if (this.jobTree.getItemCount() == 0) {
    jobFailurePatternSelected(null);
  }
 else {
    final TreeItem ti=this.jobTree.getItem(0);
    this.jobTree.setSelection(ti);
    jobFailurePatternSelected(ti);
  }
}
Program: 55678
Project: 55678
Buggy source:
public void addFailurePatternToTree(final JobFailurePattern failurePattern){
  final TreeItem jobFailureItem=new TreeItem(this.jobTree,SWT.NONE);
  jobFailureItem.setText(failurePattern.getName());
  jobFailureItem.setData(failurePattern);
}

Fixed version (ground truth):
public void addFailurePatternToTree(final JobFailurePattern failurePattern){
  final TreeItem jobFailureItem=new TreeItem(this.jobTree,SWT.NONE);
  jobFailureItem.setText(failurePattern.getName());
  jobFailureItem.setData(failurePattern);
  this.jobTree.setSelection(jobFailureItem);
}
Program: 55679
Project: 55679
Buggy source:
/** 
 * Returns the current status of the job represented by this execution graph.
 * @return the current status of the job
 */
public InternalJobStatus getJobStatus(){
  return this.jobStatus;
}

Fixed version (ground truth):
/** 
 * Returns the current status of the job represented by this execution graph.
 * @return the current status of the job
 */
public InternalJobStatus getJobStatus(){
  return this.jobStatus.get();
}
Program: 55680
Project: 55680
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void executionStateChanged(final JobID jobID,final ExecutionVertexID vertexID,final ExecutionState newExecutionState,String optionalMessage){
  final InternalJobStatus oldStatus=this.jobStatus;
  if (newExecutionState == ExecutionState.RERUNNING) {
    this.recovering.remove(getVertexByID(vertexID));
  }
  checkAndUpdateJobStatus(newExecutionState);
  if (newExecutionState == ExecutionState.FINISHED) {
    if (this.isCurrentStageCompleted()) {
      ++this.indexToCurrentExecutionStage;
      if (this.indexToCurrentExecutionStage < this.stages.size()) {
        final Iterator<ExecutionStageListener> it=this.executionStageListeners.iterator();
        final ExecutionStage nextExecutionStage=getCurrentExecutionStage();
        while (it.hasNext()) {
          it.next().nextExecutionStageEntered(jobID,nextExecutionStage);
        }
      }
    }
  }
  if (newExecutionState == ExecutionState.FAILED && this.jobStatus == InternalJobStatus.RECOVERING) {
    LOG.info("String_Node_Str");
    if (!this.recovering.contains(vertexID)) {
      this.recovering.add(this.getVertexByID(vertexID));
    }
  }
  if (this.jobStatus != oldStatus) {
    if (this.jobStatus == InternalJobStatus.FAILING) {
      this.errorDescription=optionalMessage;
    }
    if (this.jobStatus == InternalJobStatus.FAILED) {
      optionalMessage=this.errorDescription;
    }
    final Iterator<JobStatusListener> it=this.jobStatusListeners.iterator();
    while (it.hasNext()) {
      it.next().jobStatusHasChanged(this,this.jobStatus,optionalMessage);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void executionStateChanged(final JobID jobID,final ExecutionVertexID vertexID,final ExecutionState newExecutionState,String optionalMessage){
  if (newExecutionState == ExecutionState.RERUNNING) {
    this.recovering.remove(getVertexByID(vertexID));
  }
  final InternalJobStatus newJobStatus=determineNewJobStatus(this,newExecutionState);
  if (newExecutionState == ExecutionState.FINISHED) {
    if (this.isCurrentStageCompleted()) {
      ++this.indexToCurrentExecutionStage;
      if (this.indexToCurrentExecutionStage < this.stages.size()) {
        final Iterator<ExecutionStageListener> it=this.executionStageListeners.iterator();
        final ExecutionStage nextExecutionStage=getCurrentExecutionStage();
        while (it.hasNext()) {
          it.next().nextExecutionStageEntered(jobID,nextExecutionStage);
        }
      }
    }
  }
  if (newExecutionState == ExecutionState.FAILED && newJobStatus == InternalJobStatus.RECOVERING) {
    LOG.info("String_Node_Str");
    if (!this.recovering.contains(vertexID)) {
      this.recovering.add(this.getVertexByID(vertexID));
    }
  }
  updateJobStatus(newJobStatus,optionalMessage);
}
Program: 55682
Project: 55682
Buggy source:
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream input=sopremoModule.getInput(0);
  JsonStream nullInput=sopremoModule.getInput(1);
  int n=3;
  Partitioning partitioning=new Partitioning().withInputs(input);
  Grouping group=new Grouping().withInputs(partitioning).withGroupingKey(EvaluationExpression.KEY).withResetKey(false);
  final GenerateBinarySparseMatrix genMatrix=new GenerateBinarySparseMatrix().withInputs(group);
  final GenerateEmptyMatrix emptyMatrix=new GenerateEmptyMatrix().withInputs(nullInput);
  emptyMatrix.setN(n);
  final FillMatrix filledMatrix=new FillMatrix().withInputs(genMatrix,emptyMatrix);
  sopremoModule.getOutput(0).setInput(0,filledMatrix);
  return sopremoModule;
}

Fixed version (ground truth):
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream input=sopremoModule.getInput(0);
  JsonStream nullInput=sopremoModule.getInput(1);
  int n=this.numberOfPartitions;
  Partitioning partitioning=new Partitioning().withInputs(input);
  partitioning.setNumberOfPartitions(n);
  Grouping group=new Grouping().withInputs(partitioning).withGroupingKey(EvaluationExpression.KEY).withResetKey(false);
  final GenerateBinarySparseMatrix genMatrix=new GenerateBinarySparseMatrix().withInputs(group);
  final GenerateEmptyMatrix emptyMatrix=new GenerateEmptyMatrix().withInputs(nullInput);
  emptyMatrix.setN(n);
  final FillMatrix filledMatrix=new FillMatrix().withInputs(genMatrix,emptyMatrix);
  sopremoModule.getOutput(0).setInput(0,filledMatrix);
  return sopremoModule;
}
Program: 55683
Project: 55683
Buggy source:
@Override protected void map(JsonNode key,JsonNode value,JsonCollector out){
  for (int i=1; i <= n; i++) {
    for (int j=1; j <= i; j++) {
      out.collect(new ArrayNode(new IntNode(j),new IntNode(i)),new BinarySparseMatrix());
    }
  }
}

Fixed version (ground truth):
@Override protected void map(JsonNode key,JsonNode value,JsonCollector out){
  for (int i=0; i < n; i++) {
    for (int j=0; j <= i; j++) {
      out.collect(new ArrayNode(new IntNode(j),new IntNode(i)),new BinarySparseMatrix());
    }
  }
}
Program: 55684
Project: 55684
Buggy source:
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream phase1=sopremoModule.getInput(0);
  JsonStream matrix=sopremoModule.getInput(1);
  final TransformDiagonal transDia=new TransformDiagonal().withInputs(phase1);
  final GenerateRows rows=new GenerateRows().withInputs(matrix);
  final ComputeBlockTuples computeRows=new ComputeBlockTuples().withInputs(transDia,rows);
  final GenerateColumns columns=new GenerateColumns().withInputs(computeRows);
  final ComputeBlockTuples computeTuples=new ComputeBlockTuples().withInputs(transDia,columns);
  sopremoModule.getOutput(0).setInput(0,computeTuples);
  return sopremoModule;
}

Fixed version (ground truth):
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream phase1=sopremoModule.getInput(0);
  JsonStream matrix=sopremoModule.getInput(1);
  final TransformDiagonal transDia=new TransformDiagonal().withInputs(phase1);
  final GenerateRows rows=new GenerateRows().withInputs(matrix);
  final ComputeBlockTuples computeRows=new ComputeBlockTuples().withInputs(transDia,rows);
  final GenerateColumns columns=new GenerateColumns().withInputs(computeRows);
  final ComputeBlockTuples computeTuples=new ComputeBlockTuples().withInputs(transDia,columns);
  GenerateFullMatrix fullMatrix=new GenerateFullMatrix().withInputs(computeTuples);
  sopremoModule.getOutput(0).setInput(0,fullMatrix);
  return sopremoModule;
}
Program: 55685
Project: 55685
Buggy source:
@Override protected void match(JsonNode key,JsonNode value1,JsonNode value2,JsonCollector out){
  JsonNode oldKeyPrimary=key;
  JsonNode oldKeyCurrent=((ArrayNode)value2).get(0);
  BinarySparseMatrix current=(BinarySparseMatrix)((ArrayNode)value2).get(1);
  if (oldKeyPrimary.equals(((ArrayNode)oldKeyCurrent).get(1))) {
    current=current.transpose();
  }
  TransitiveClosure.warshall((BinarySparseMatrix)value1,current);
  if (oldKeyPrimary.equals(((ArrayNode)oldKeyCurrent).get(1))) {
    current=current.transpose();
  }
  out.collect(oldKeyCurrent,current);
}

Fixed version (ground truth):
@Override protected void match(JsonNode key,JsonNode value1,JsonNode value2,JsonCollector out){
  JsonNode oldKeyPrimary=key;
  JsonNode oldKeyCurrent=((ArrayNode)value2).get(0);
  BinarySparseMatrix current=(BinarySparseMatrix)((ArrayNode)value2).get(1);
  if (oldKeyPrimary.equals(((ArrayNode)oldKeyCurrent).get(1))) {
    TransitiveClosure.warshall(current,(BinarySparseMatrix)value1,current);
  }
 else {
    TransitiveClosure.warshall((BinarySparseMatrix)value1,current,current);
  }
  out.collect(oldKeyCurrent,current);
}
Program: 55686
Project: 55686
Buggy source:
@Override protected void map(JsonNode key,JsonNode value,JsonCollector out){
  if (((ArrayNode)key).get(0).compareTo(((ArrayNode)key).get(1)) > 0) {
    out.collect(new ArrayNode(((ArrayNode)key).get(1),((ArrayNode)key).get(0)),value);
  }
}

Fixed version (ground truth):
@Override protected void map(JsonNode key,JsonNode value,JsonCollector out){
  if (!((ArrayNode)key).get(0).equals(((ArrayNode)key).get(1))) {
    out.collect(new ArrayNode(((ArrayNode)key).get(1),((ArrayNode)key).get(0)),((BinarySparseMatrix)value).transpose());
  }
  out.collect(key,value);
}
Program: 55687
Project: 55687
Buggy source:
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),1,1);
  JsonStream input=sopremoModule.getInput(0);
  GenerateFullMatrix fullMatrix=new GenerateFullMatrix().withInputs(input);
  int itCount=3;
  ExtractRelatingBlocks xBlocks[]=new ExtractRelatingBlocks[itCount];
  ExtractNonRelatingBlocks abBlocks[]=new ExtractNonRelatingBlocks[itCount];
  TransformAKey[] a=new TransformAKey[itCount];
  TransformBKey[] b=new TransformBKey[itCount];
  TransformXKey[] x=new TransformXKey[itCount];
  BAndXMatch[] xb=new BAndXMatch[itCount];
  AMatch axb[]=new AMatch[itCount];
  UnionAll itOutput[]=new UnionAll[itCount];
  for (int i=0; i < itCount; i++) {
    JsonStream inputStream=i == 0 ? fullMatrix : itOutput[i - 1];
    xBlocks[i]=new ExtractRelatingBlocks().withInputs(inputStream);
    xBlocks[i].setIterationStep(i + 1);
    abBlocks[i]=new ExtractNonRelatingBlocks().withInputs(inputStream);
    abBlocks[i].setIterationStep(i + 1);
    a[i]=new TransformAKey().withInputs(abBlocks[i]);
    a[i].setIterationStep(i + 1);
    b[i]=new TransformBKey().withInputs(abBlocks[i]);
    b[i].setIterationStep(i + 1);
    x[i]=new TransformXKey().withInputs(xBlocks[i]);
    xb[i]=new BAndXMatch().withInputs(b[i],x[i]);
    axb[i]=new AMatch().withInputs(a[i],xb[i]);
    itOutput[i]=new UnionAll().withInputs(abBlocks[i],axb[i]);
  }
  sopremoModule.getOutput(0).setInput(0,itOutput[itCount - 1]);
  return sopremoModule;
}

Fixed version (ground truth):
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),1,1);
  JsonStream input=sopremoModule.getInput(0);
  int itCount=this.numberOfPartitions;
  ExtractRelatingBlocks xBlocks[]=new ExtractRelatingBlocks[itCount];
  ExtractNonRelatingBlocks abBlocks[]=new ExtractNonRelatingBlocks[itCount];
  TransformAKey[] a=new TransformAKey[itCount];
  TransformBKey[] b=new TransformBKey[itCount];
  TransformXKey[] x=new TransformXKey[itCount];
  BAndXMatch[] xb=new BAndXMatch[itCount];
  AMatch axb[]=new AMatch[itCount];
  UnionAll itOutput[]=new UnionAll[itCount];
  for (int i=0; i < itCount; i++) {
    JsonStream inputStream=i == 0 ? input : itOutput[i - 1];
    xBlocks[i]=new ExtractRelatingBlocks().withInputs(inputStream);
    xBlocks[i].setIterationStep(i);
    abBlocks[i]=new ExtractNonRelatingBlocks().withInputs(inputStream);
    abBlocks[i].setIterationStep(i);
    a[i]=new TransformAKey().withInputs(abBlocks[i]);
    a[i].setIterationStep(i);
    b[i]=new TransformBKey().withInputs(abBlocks[i]);
    b[i].setIterationStep(i);
    x[i]=new TransformXKey().withInputs(xBlocks[i]);
    xb[i]=new BAndXMatch().withInputs(b[i],x[i]);
    axb[i]=new AMatch().withInputs(a[i],xb[i]);
    itOutput[i]=new UnionAll().withInputs(abBlocks[i],axb[i]);
  }
  sopremoModule.getOutput(0).setInput(0,itOutput[itCount - 1]);
  return sopremoModule;
}
Program: 55688
Project: 55688
Buggy source:
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream input=sopremoModule.getInput(0);
  JsonStream nullInput=sopremoModule.getInput(1);
  final GenerateMatrix filledMatrix=new GenerateMatrix().withInputs(input,nullInput);
  final Phase1 phase1=new Phase1().withInputs(filledMatrix);
  final Phase2 phase2=new Phase2().withInputs(phase1,filledMatrix);
  final Phase3 phase3=new Phase3().withInputs(new UnionAll().withInputs(phase1,phase2));
  final EmitMatrix result=new EmitMatrix().withInputs(phase3);
  sopremoModule.getOutput(0).setInput(0,result);
  return sopremoModule;
}

Fixed version (ground truth):
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream input=sopremoModule.getInput(0);
  JsonStream nullInput=sopremoModule.getInput(1);
  final GenerateMatrix filledMatrix=new GenerateMatrix().withInputs(input,nullInput);
  filledMatrix.setNumberOfPartitions(this.numberOfPartitions);
  final Phase1 phase1=new Phase1().withInputs(filledMatrix);
  final Phase2 phase2=new Phase2().withInputs(phase1,filledMatrix);
  final Phase3 phase3=new Phase3().withInputs(new UnionAll().withInputs(phase1,phase2));
  phase3.setNumberOfPartitions(this.numberOfPartitions);
  final EmitMatrix result=new EmitMatrix().withInputs(phase3);
  sopremoModule.getOutput(0).setInput(0,result);
  return sopremoModule;
}
Program: 55689
Project: 55689
Buggy source:
/** 
 * Prints an error message and throws the given exception. If the exception is of the type  {@link ExceptionInChainedStubException} then the chain of contained exceptions is followeduntil an exception of a different type is found.
 * @param ex The exception to be thrown.
 * @param parent The parent task, whose information is included in the log message.
 * @throws Exception Always thrown.
 */
public static void logAndThrowException(Exception ex,AbstractInvokable parent) throws Exception {
  String taskName;
  if (ex instanceof ExceptionInChainedStubException) {
    do {
      ExceptionInChainedStubException cex=(ExceptionInChainedStubException)ex;
      taskName=cex.getTaskName();
      ex=cex.getWrappedException();
    }
 while (ex instanceof ExceptionInChainedStubException);
  }
 else {
    taskName=parent.getEnvironment().getTaskName();
  }
  if (LOG.isErrorEnabled())   LOG.error(constructLogString("String_Node_Str",taskName,parent));
  throw ex;
}

Fixed version (ground truth):
/** 
 * Prints an error message and throws the given exception. If the exception is of the type  {@link ExceptionInChainedStubException} then the chain of contained exceptions is followeduntil an exception of a different type is found.
 * @param ex The exception to be thrown.
 * @param parent The parent task, whose information is included in the log message.
 * @throws Exception Always thrown.
 */
public static void logAndThrowException(Exception ex,AbstractInvokable parent) throws Exception {
  String taskName;
  if (ex instanceof ExceptionInChainedStubException) {
    do {
      ExceptionInChainedStubException cex=(ExceptionInChainedStubException)ex;
      taskName=cex.getTaskName();
      ex=cex.getWrappedException();
    }
 while (ex instanceof ExceptionInChainedStubException);
  }
 else {
    taskName=parent.getEnvironment().getTaskName();
  }
  if (LOG.isErrorEnabled()) {
    LOG.error(constructLogString("String_Node_Str",taskName,parent));
    LOG.error(ex,ex);
  }
  throw ex;
}
Program: 55690
Project: 55690
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void accept(Visitor<Contract> visitor){
  boolean descend=visitor.preVisit(this);
  if (descend) {
    if (visitor.preVisit(this)) {
      for (      Contract c : this.input1) {
        c.accept(visitor);
      }
      for (      Contract c : this.input2) {
        c.accept(visitor);
      }
    }
    visitor.postVisit(this);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void accept(Visitor<Contract> visitor){
  boolean descend=visitor.preVisit(this);
  if (descend) {
    for (    Contract c : this.input1) {
      c.accept(visitor);
    }
    for (    Contract c : this.input2) {
      c.accept(visitor);
    }
    visitor.postVisit(this);
  }
}
Program: 55691
Project: 55691
Buggy source:
/** 
 * Constructs a new auto-completion combo box.
 * @param parent the parent composite
 * @param style the style of the combo box
 * @param suggestions a list of suggestions for the auto-completion
 */
public AutoCompletionCombo(final Composite parent,final int style,final List<String> suggestions){
  super(parent,style);
  this.suggestions=new ArrayList<String>(suggestions);
  Collections.sort(this.suggestions);
  setLayout(new FillLayout());
  this.combo=new Combo(this,style);
  this.combo.addKeyListener(this);
  for (  final String suggestion : this.suggestions) {
    this.combo.add(suggestion);
  }
}

Fixed version (ground truth):
/** 
 * Constructs a new auto-completion combo box.
 * @param parent the parent composite
 * @param style the style of the combo box
 * @param suggestions a list of suggestions for the auto-completion
 */
public AutoCompletionCombo(final Composite parent,final int style,final List<String> suggestions){
  super(parent,style);
  this.suggestions=new ArrayList<String>(suggestions);
  Collections.sort(this.suggestions);
  setLayout(new FillLayout());
  this.combo=new Combo(this,style);
  this.combo.addKeyListener(this);
  this.combo.addSelectionListener(this);
  for (  final String suggestion : this.suggestions) {
    this.combo.add(suggestion);
  }
}
Program: 55692
Project: 55692
Buggy source:
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream phase1=sopremoModule.getInput(0);
  JsonStream matrix=sopremoModule.getInput(1);
  final TransformDiagonal transDia=new TransformDiagonal().withInputs(phase1);
  final GenerateRows rows=new GenerateRows().withInputs(matrix);
  final ComputeBlockTuples computeRows=new ComputeBlockTuples().withInputs(transDia,rows);
  final ExtractMirroredMatrix mirroredMatrix=new ExtractMirroredMatrix().withInputs(computeRows);
  final FillMatrix fillMatrix=new FillMatrix().withInputs(computeRows,mirroredMatrix);
  sopremoModule.getOutput(0).setInput(0,fillMatrix);
  return sopremoModule;
}

Fixed version (ground truth):
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),2,1);
  JsonStream phase1=sopremoModule.getInput(0);
  JsonStream matrix=sopremoModule.getInput(1);
  final TransformDiagonal transDia=new TransformDiagonal().withInputs(phase1);
  final GenerateRows rows=new GenerateRows().withInputs(matrix);
  final ComputeBlockTuples computeRows=new ComputeBlockTuples().withInputs(transDia,rows);
  final GenerateColumns columns=new GenerateColumns().withInputs(computeRows);
  final ComputeBlockTuples computeTuples=new ComputeBlockTuples().withInputs(transDia,columns);
  sopremoModule.getOutput(0).setInput(0,computeTuples);
  return sopremoModule;
}
Program: 55693
Project: 55693
Buggy source:
@Override protected void match(JsonNode key,JsonNode value1,JsonNode value2,JsonCollector out){
  JsonNode oldKey=((ArrayNode)value2).get(0);
  TransitiveClosure.warshall((BinarySparseMatrix)value1,(BinarySparseMatrix)((ArrayNode)value2).get(1));
  out.collect(oldKey,((ArrayNode)value2).get(1));
}

Fixed version (ground truth):
@Override protected void match(JsonNode key,JsonNode value1,JsonNode value2,JsonCollector out){
  JsonNode oldKeyPrimary=key;
  JsonNode oldKeyCurrent=((ArrayNode)value2).get(0);
  BinarySparseMatrix current=(BinarySparseMatrix)((ArrayNode)value2).get(1);
  if (oldKeyPrimary.equals(((ArrayNode)oldKeyCurrent).get(1))) {
    current=current.transpose();
  }
  TransitiveClosure.warshall((BinarySparseMatrix)value1,current);
  if (oldKeyPrimary.equals(((ArrayNode)oldKeyCurrent).get(1))) {
    current=current.transpose();
  }
  out.collect(oldKeyCurrent,current);
}
Program: 55694
Project: 55694
Buggy source:
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),1,1);
  JsonStream input=sopremoModule.getInput(0);
  int itCount=3;
  TransformAKey[] a=new TransformAKey[itCount];
  TransformBKey[] b=new TransformBKey[itCount];
  TransformXKey[] x=new TransformXKey[itCount];
  BAndXMatch[] xb=new BAndXMatch[itCount];
  AMatch axb[]=new AMatch[itCount];
  for (int i=0; i < itCount; i++) {
    a[i]=new TransformAKey().withInputs(i == 0 ? input : axb[i - 1]);
    a[i].setIterationStep(i + 1);
    b[i]=new TransformBKey().withInputs(i == 0 ? input : axb[i - 1]);
    b[i].setIterationStep(i + 1);
    x[i]=new TransformXKey().withInputs(i == 0 ? input : axb[i - 1]);
    xb[i]=new BAndXMatch().withInputs(b[i],x[i]);
    axb[i]=new AMatch().withInputs(a[i],xb[i]);
  }
  sopremoModule.getOutput(0).setInput(0,axb[itCount - 1]);
  return sopremoModule;
}

Fixed version (ground truth):
@Override public SopremoModule asElementaryOperators(){
  final SopremoModule sopremoModule=new SopremoModule(this.getName(),1,1);
  JsonStream input=sopremoModule.getInput(0);
  int itCount=3;
  ExtractNonRelatingBlocks otherBlocks[]=new ExtractNonRelatingBlocks[itCount];
  TransformAKey[] a=new TransformAKey[itCount];
  TransformBKey[] b=new TransformBKey[itCount];
  TransformXKey[] x=new TransformXKey[itCount];
  BAndXMatch[] xb=new BAndXMatch[itCount];
  AMatch axb[]=new AMatch[itCount];
  UnionAll itOutput[]=new UnionAll[itCount];
  for (int i=0; i < itCount; i++) {
    JsonStream inputStream=i == 0 ? input : itOutput[i - 1];
    otherBlocks[i]=new ExtractNonRelatingBlocks().withInputs(inputStream);
    otherBlocks[i].setIterationStep(i + 1);
    a[i]=new TransformAKey().withInputs(inputStream);
    a[i].setIterationStep(i + 1);
    b[i]=new TransformBKey().withInputs(inputStream);
    b[i].setIterationStep(i + 1);
    x[i]=new TransformXKey().withInputs(inputStream);
    xb[i]=new BAndXMatch().withInputs(b[i],x[i]);
    axb[i]=new AMatch().withInputs(a[i],xb[i]);
    itOutput[i]=new UnionAll().withInputs(axb[i],otherBlocks[i]);
  }
  sopremoModule.getOutput(0).setInput(0,itOutput[itCount - 1]);
  return sopremoModule;
}