Program: 55192
Project: 55192
Buggy source:
/** 
 * Simple Job: Map -> Reduce -> Map -> Reduce. All functions preserve all fields (hence all properties). Increases DOP between 2nd map and 2nd reduce, so the hash partitioning from 1st reduce is not reusable. Expected to re-establish partitioning between map and reduce (hash).
 */
@Test public void checkPropertyHandlingWithIncreasingGlobalParallelism2(){
  final int degOfPar=defaultParallelism;
  FileDataSource source=new FileDataSource(DummyInputFormat.class,IN_FILE_1,"String_Node_Str");
  source.setDegreeOfParallelism(degOfPar);
  MapContract map1=MapContract.builder(IdentityMap.class).name("String_Node_Str").build();
  map1.setDegreeOfParallelism(degOfPar);
  map1.setInput(source);
  ReduceContract reduce1=ReduceContract.builder(IdentityReduce.class,PactInteger.class,0).name("String_Node_Str").build();
  reduce1.setDegreeOfParallelism(degOfPar);
  reduce1.setInput(map1);
  MapContract map2=MapContract.builder(IdentityMap.class).name("String_Node_Str").build();
  map2.setDegreeOfParallelism(degOfPar);
  map2.setInput(reduce1);
  ReduceContract reduce2=ReduceContract.builder(IdentityReduce.class,PactInteger.class,0).name("String_Node_Str").build();
  reduce2.setDegreeOfParallelism(degOfPar * 2);
  reduce2.setInput(map2);
  FileDataSink sink=new FileDataSink(DummyOutputFormat.class,OUT_FILE_1,"String_Node_Str");
  sink.setDegreeOfParallelism(degOfPar * 2);
  sink.setInput(reduce2);
  Plan plan=new Plan(sink,"String_Node_Str");
  OptimizedPlan oPlan=compile(plan);
  SinkPlanNode sinkNode=oPlan.getDataSinks().iterator().next();
  SingleInputPlanNode red2Node=(SingleInputPlanNode)sinkNode.getPredecessor();
  SingleInputPlanNode map2Node=(SingleInputPlanNode)red2Node.getPredecessor();
  ShipStrategyType mapIn=map2Node.getInput().getShipStrategy();
  ShipStrategyType reduceIn=red2Node.getInput().getShipStrategy();
  Assert.assertEquals("String_Node_Str",ShipStrategyType.FORWARD,mapIn);
  Assert.assertEquals("String_Node_Str",ShipStrategyType.PARTITION_HASH,reduceIn);
}

Fixed version (ground truth):
/** 
 * Simple Job: Map -> Reduce -> Map -> Reduce. All functions preserve all fields (hence all properties). Increases DOP between 2nd map and 2nd reduce, so the hash partitioning from 1st reduce is not reusable. Expected to re-establish partitioning between map and reduce (hash).
 */
@Test public void checkPropertyHandlingWithIncreasingGlobalParallelism2(){
  final int degOfPar=DEFAULT_PARALLELISM;
  FileDataSource source=new FileDataSource(DummyInputFormat.class,IN_FILE_1,"String_Node_Str");
  source.setDegreeOfParallelism(degOfPar);
  MapContract map1=MapContract.builder(IdentityMap.class).name("String_Node_Str").build();
  map1.setDegreeOfParallelism(degOfPar);
  map1.setInput(source);
  ReduceContract reduce1=ReduceContract.builder(IdentityReduce.class,PactInteger.class,0).name("String_Node_Str").build();
  reduce1.setDegreeOfParallelism(degOfPar);
  reduce1.setInput(map1);
  MapContract map2=MapContract.builder(IdentityMap.class).name("String_Node_Str").build();
  map2.setDegreeOfParallelism(degOfPar);
  map2.setInput(reduce1);
  ReduceContract reduce2=ReduceContract.builder(IdentityReduce.class,PactInteger.class,0).name("String_Node_Str").build();
  reduce2.setDegreeOfParallelism(degOfPar * 2);
  reduce2.setInput(map2);
  FileDataSink sink=new FileDataSink(DummyOutputFormat.class,OUT_FILE_1,"String_Node_Str");
  sink.setDegreeOfParallelism(degOfPar * 2);
  sink.setInput(reduce2);
  Plan plan=new Plan(sink,"String_Node_Str");
  OptimizedPlan oPlan=compile(plan);
  SinkPlanNode sinkNode=oPlan.getDataSinks().iterator().next();
  SingleInputPlanNode red2Node=(SingleInputPlanNode)sinkNode.getPredecessor();
  SingleInputPlanNode map2Node=(SingleInputPlanNode)red2Node.getPredecessor();
  ShipStrategyType mapIn=map2Node.getInput().getShipStrategy();
  ShipStrategyType reduceIn=red2Node.getInput().getShipStrategy();
  Assert.assertEquals("String_Node_Str",ShipStrategyType.FORWARD,mapIn);
  Assert.assertEquals("String_Node_Str",ShipStrategyType.PARTITION_HASH,reduceIn);
}