Program: 55193
Project: 55193
Buggy source:
/** 
 * Simple Job: Map -> Reduce -> Map -> Reduce. All functions preserve all fields (hence all properties). Increases DOP between 1st reduce and 2nd map, such that more tasks are on one instance. Expected to re-establish partitioning between map and reduce via a local hash.
 */
@Test public void checkPropertyHandlingWithIncreasingLocalParallelism(){
  final int degOfPar=2 * 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 reduceIn=red2Node.getInput().getShipStrategy();
  Assert.assertEquals("String_Node_Str",ShipStrategyType.PARTITION_LOCAL_HASH,mapIn);
  Assert.assertEquals("String_Node_Str",ShipStrategyType.FORWARD,reduceIn);
}

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, such that more tasks are on one instance. Expected to re-establish partitioning between map and reduce via a local hash.
 */
@Test public void checkPropertyHandlingWithIncreasingLocalParallelism(){
  final int degOfPar=2 * 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 reduceIn=red2Node.getInput().getShipStrategy();
  Assert.assertEquals("String_Node_Str",ShipStrategyType.PARTITION_LOCAL_HASH,mapIn);
  Assert.assertEquals("String_Node_Str",ShipStrategyType.FORWARD,reduceIn);
}