Program: 55366
Project: 55366
Buggy source:
/** 
 * Private utility method that generates a candidate Cross node, given fixed shipping strategies and a fixed local strategy.
 * @param target The list to put the alternatives in.
 * @param subPlan1 The subPlan for the first input.
 * @param subPlan2 The subPlan for the second input.
 * @param ss1 The shipping strategy for the first input.
 * @param ss2 The shipping strategy for the second input.
 * @param ls The local strategy.
 * @param outGp The global properties of the data that goes to the user function.
 * @param outLp The local properties of the data that goes to the user function.
 * @param estimator The cost estimator.
 */
private void createCrossAlternative(List<OptimizerNode> target,OptimizerNode subPlan1,OptimizerNode subPlan2,ShipStrategy ss1,ShipStrategy ss2,LocalStrategy ls,boolean keepFirstOrder,boolean keepSecondOrder,CostEstimator estimator){
  GlobalProperties gp;
  LocalProperties lp;
  gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan1,this,ss1);
  lp=PactConnection.getLocalPropertiesAfterConnection(subPlan1,this,ss1);
  if (keepFirstOrder == false) {
    gp.setOrdering(null);
    lp.setOrdering(null);
  }
  CrossNode n=new CrossNode(this,subPlan1,subPlan2,input1,input2,gp,lp);
  n.input1.setShipStrategy(ss1);
  n.input2.setShipStrategy(ss2);
  n.setLocalStrategy(ls);
  n.getGlobalProperties().filterByNodesConstantSet(this,0);
  n.getLocalProperties().filterByNodesConstantSet(this,0);
  estimator.costOperator(n);
  target.add(n);
  gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan2,this,ss2);
  lp=PactConnection.getLocalPropertiesAfterConnection(subPlan2,this,ss2);
  if (keepSecondOrder == false) {
    gp.setOrdering(null);
    lp.setOrdering(null);
  }
  n=new CrossNode(this,subPlan1,subPlan2,input1,input2,gp,lp);
  n.input1.setShipStrategy(ss1);
  n.input2.setShipStrategy(ss2);
  n.setLocalStrategy(ls);
  n.getGlobalProperties().filterByNodesConstantSet(this,1);
  n.getLocalProperties().filterByNodesConstantSet(this,1);
  estimator.costOperator(n);
  target.add(n);
}

Fixed version (ground truth):
/** 
 * Private utility method that generates a candidate Cross node, given fixed shipping strategies and a fixed local strategy.
 * @param target The list to put the alternatives in.
 * @param subPlan1 The subPlan for the first input.
 * @param subPlan2 The subPlan for the second input.
 * @param ss1 The shipping strategy for the first input.
 * @param ss2 The shipping strategy for the second input.
 * @param ls The local strategy.
 * @param outGp The global properties of the data that goes to the user function.
 * @param outLp The local properties of the data that goes to the user function.
 * @param estimator The cost estimator.
 */
private void createCrossAlternative(List<OptimizerNode> target,OptimizerNode subPlan1,OptimizerNode subPlan2,ShipStrategy ss1,ShipStrategy ss2,LocalStrategy ls,boolean keepFirstOrder,boolean keepSecondOrder,CostEstimator estimator){
  GlobalProperties gp;
  LocalProperties lp;
  gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan1,this,0,ss1);
  lp=PactConnection.getLocalPropertiesAfterConnection(subPlan1,this,ss1);
  if (keepFirstOrder == false) {
    gp.setOrdering(null);
    lp.setOrdering(null);
  }
  CrossNode n=new CrossNode(this,subPlan1,subPlan2,input1,input2,gp,lp);
  n.input1.setShipStrategy(ss1);
  n.input2.setShipStrategy(ss2);
  n.setLocalStrategy(ls);
  n.getGlobalProperties().filterByNodesConstantSet(this,0);
  n.getLocalProperties().filterByNodesConstantSet(this,0);
  estimator.costOperator(n);
  target.add(n);
  gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan2,this,1,ss2);
  lp=PactConnection.getLocalPropertiesAfterConnection(subPlan2,this,ss2);
  if (keepSecondOrder == false) {
    gp.setOrdering(null);
    lp.setOrdering(null);
  }
  n=new CrossNode(this,subPlan1,subPlan2,input1,input2,gp,lp);
  n.input1.setShipStrategy(ss1);
  n.input2.setShipStrategy(ss2);
  n.setLocalStrategy(ls);
  n.getGlobalProperties().filterByNodesConstantSet(this,1);
  n.getLocalProperties().filterByNodesConstantSet(this,1);
  estimator.costOperator(n);
  target.add(n);
}