Program: 55194
Project: 55194
Buggy source:
/** 
 * Simple Job: Map -> Reduce -> Map -> Reduce. All functions preserve all fields (hence all properties). Increases DOP between 1st reduce and 2nd map, so the hash partitioning from 1st reduce is not reusable. Expected to re-establish partitioning between reduce and map, via hash, because random is a full network transit as well.
 */
@Test public void checkPropertyHandlingWithIncreasingGlobalParallelism1(){
  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 * 2);
  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 redIn=red2Node.getInput().getShipStrategy();
  Assert.assertEquals("String_Node_Str",ShipStrategyType.PARTITION_HASH,mapIn);
  Assert.assertEquals("String_Node_Str",ShipStrategyType.FORWARD,redIn);
}

Fixed version (ground truth):
/** 
 * Simple Job: Map -> Reduce -> Map -> Reduce. All functions preserve all fields (hence all properties). Increases DOP between 1st reduce and 2nd map, so the hash partitioning from 1st reduce is not reusable. Expected to re-establish partitioning between reduce and map, via hash, because random is a full network transit as well.
 */
@Test public void checkPropertyHandlingWithIncreasingGlobalParallelism1(){
  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 * 2);
  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 redIn=red2Node.getInput().getShipStrategy();
  Assert.assertEquals("String_Node_Str",ShipStrategyType.PARTITION_HASH,mapIn);
  Assert.assertEquals("String_Node_Str",ShipStrategyType.FORWARD,redIn);
}