Program: 55378
Project: 55378
Buggy source:
public static void main(String[] args) throws Exception {
  int degreeOfParallelism=2;
  JobGraph jobGraph=new JobGraph("String_Node_Str");
  JobInputVertex pageWithRankInput=JobGraphUtils.createInput(PageWithRankInputFormat.class,"String_Node_Str","String_Node_Str",jobGraph,degreeOfParallelism);
  JobInputVertex transitionMatrixInput=JobGraphUtils.createInput(TransitionMatrixInputFormat.class,"String_Node_Str","String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig transitionMatrixInputConfig=new TaskConfig(transitionMatrixInput.getConfiguration());
  transitionMatrixInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(transitionMatrixInput.getConfiguration(),"String_Node_Str",new int[]{1},new Class[]{PactLong.class});
  JobTaskVertex head=JobGraphUtils.createTask(BulkIterationHeadPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig headConfig=new TaskConfig(head.getConfiguration());
  headConfig.setDriver(MapDriver.class);
  headConfig.setStubClass(IdentityMap.class);
  headConfig.setMemorySize(3 * JobGraphUtils.MEGABYTE);
  headConfig.setBackChannelMemoryFraction(0.8f);
  headConfig.setNumberOfIterations(1);
  JobTaskVertex intermediate=JobGraphUtils.createTask(BulkIterationIntermediatePactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig intermediateConfig=new TaskConfig(intermediate.getConfiguration());
  intermediateConfig.setDriver(MatchDriver.class);
  intermediateConfig.setStubClass(DotProductMatch.class);
  intermediateConfig.setLocalStrategy(TaskConfig.LocalStrategy.HYBRIDHASH_FIRST);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfiguration(),"String_Node_Str",new int[]{0},new Class[]{PactLong.class});
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfiguration(),"String_Node_Str",new int[]{0},new Class[]{PactLong.class});
  intermediateConfig.setMemorySize(20 * JobGraphUtils.MEGABYTE);
  intermediateConfig.setGateCached(1);
  intermediateConfig.setInputGateCacheMemoryFraction(0.5f);
  JobTaskVertex tail=JobGraphUtils.createTask(BulkIterationTailPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig tailConfig=new TaskConfig(tail.getConfiguration());
  tailConfig.setLocalStrategy(TaskConfig.LocalStrategy.SORT);
  tailConfig.setDriver(ReduceDriver.class);
  tailConfig.setStubClass(DotProductReducer.class);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(tail.getConfiguration(),"String_Node_Str",new int[]{0},new Class[]{PactLong.class});
  tailConfig.setMemorySize(3 * JobGraphUtils.MEGABYTE);
  tailConfig.setNumFilehandles(2);
  JobTaskVertex sync=JobGraphUtils.createSingletonTask(BulkIterationSynchronizationPactTask.class,"String_Node_Str",jobGraph);
  TaskConfig syncConfig=new TaskConfig(sync.getConfiguration());
  syncConfig.setDriver(MapDriver.class);
  syncConfig.setStubClass(EmptyMapStub.class);
  JobOutputVertex output=JobGraphUtils.createFileOutput(jobGraph,"String_Node_Str",degreeOfParallelism);
  TaskConfig outputConfig=new TaskConfig(output.getConfiguration());
  outputConfig.setStubClass(PageWithRankOutFormat.class);
  outputConfig.setStubParameter(FileOutputFormat.FILE_PARAMETER_KEY,"String_Node_Str");
  JobOutputVertex fakeTailOutput=JobGraphUtils.createFakeOutput(jobGraph,"String_Node_Str",degreeOfParallelism);
  JobOutputVertex fakeSyncOutput=JobGraphUtils.createSingletonFakeOutput(jobGraph,"String_Node_Str");
  JobGraphUtils.connectLocal(pageWithRankInput,head);
  JobGraphUtils.connectNetwork(head,intermediate,DistributionPattern.BIPARTITE,ShipStrategy.BROADCAST);
  JobGraphUtils.connectLocal(transitionMatrixInput,intermediate,DistributionPattern.BIPARTITE,ShipStrategy.PARTITION_HASH);
  intermediateConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,degreeOfParallelism);
  JobGraphUtils.connectLocal(intermediate,tail,DistributionPattern.POINTWISE,ShipStrategy.FORWARD);
  tailConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,1);
  JobGraphUtils.connectLocal(head,sync);
  syncConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,degreeOfParallelism);
  JobGraphUtils.connectLocal(head,output);
  JobGraphUtils.connectLocal(tail,fakeTailOutput);
  JobGraphUtils.connectLocal(sync,fakeSyncOutput);
  fakeTailOutput.setVertexToShareInstancesWith(tail);
  tail.setVertexToShareInstancesWith(head);
  pageWithRankInput.setVertexToShareInstancesWith(head);
  transitionMatrixInput.setVertexToShareInstancesWith(head);
  intermediate.setVertexToShareInstancesWith(head);
  output.setVertexToShareInstancesWith(head);
  sync.setVertexToShareInstancesWith(head);
  fakeSyncOutput.setVertexToShareInstancesWith(sync);
  GlobalConfiguration.loadConfiguration("String_Node_Str");
  Configuration conf=GlobalConfiguration.getConfiguration();
  JobGraphUtils.submit(jobGraph,conf);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  int degreeOfParallelism=2;
  JobGraph jobGraph=new JobGraph("String_Node_Str");
  JobInputVertex pageWithRankInput=JobGraphUtils.createInput(PageWithRankInputFormat.class,"String_Node_Str","String_Node_Str",jobGraph,degreeOfParallelism);
  JobInputVertex transitionMatrixInput=JobGraphUtils.createInput(TransitionMatrixInputFormat.class,"String_Node_Str","String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig transitionMatrixInputConfig=new TaskConfig(transitionMatrixInput.getConfiguration());
  transitionMatrixInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(transitionMatrixInput.getConfiguration(),"String_Node_Str",new int[]{1},new Class[]{PactLong.class});
  JobTaskVertex head=JobGraphUtils.createTask(BulkIterationHeadPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig headConfig=new TaskConfig(head.getConfiguration());
  headConfig.setDriver(MapDriver.class);
  headConfig.setStubClass(IdentityMap.class);
  headConfig.setMemorySize(3 * JobGraphUtils.MEGABYTE);
  headConfig.setBackChannelMemoryFraction(0.8f);
  headConfig.setNumberOfIterations(1);
  JobTaskVertex intermediate=JobGraphUtils.createTask(BulkIterationIntermediatePactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig intermediateConfig=new TaskConfig(intermediate.getConfiguration());
  intermediateConfig.setDriver(MatchDriver.class);
  intermediateConfig.setStubClass(DotProductMatch.class);
  intermediateConfig.setLocalStrategy(TaskConfig.LocalStrategy.HYBRIDHASH_FIRST);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfiguration(),"String_Node_Str",new int[]{0},new Class[]{PactLong.class});
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfiguration(),"String_Node_Str",new int[]{0},new Class[]{PactLong.class});
  intermediateConfig.setMemorySize(20 * JobGraphUtils.MEGABYTE);
  intermediateConfig.setGateCached(1);
  intermediateConfig.setInputGateCacheMemoryFraction(0.5f);
  JobTaskVertex tail=JobGraphUtils.createTask(BulkIterationTailPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism);
  TaskConfig tailConfig=new TaskConfig(tail.getConfiguration());
  tailConfig.setLocalStrategy(TaskConfig.LocalStrategy.SORT);
  tailConfig.setDriver(ReduceDriver.class);
  tailConfig.setStubClass(DotProductReducer.class);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(tail.getConfiguration(),"String_Node_Str",new int[]{0},new Class[]{PactLong.class});
  tailConfig.setMemorySize(3 * JobGraphUtils.MEGABYTE);
  tailConfig.setNumFilehandles(2);
  JobTaskVertex sync=JobGraphUtils.createSingletonTask(BulkIterationSynchronizationPactTask.class,"String_Node_Str",jobGraph);
  TaskConfig syncConfig=new TaskConfig(sync.getConfiguration());
  syncConfig.setDriver(MapDriver.class);
  syncConfig.setStubClass(EmptyMapStub.class);
  JobOutputVertex output=JobGraphUtils.createFileOutput(jobGraph,"String_Node_Str",degreeOfParallelism);
  TaskConfig outputConfig=new TaskConfig(output.getConfiguration());
  outputConfig.setStubClass(PageWithRankOutFormat.class);
  outputConfig.setStubParameter(FileOutputFormat.FILE_PARAMETER_KEY,"String_Node_Str");
  JobOutputVertex fakeTailOutput=JobGraphUtils.createFakeOutput(jobGraph,"String_Node_Str",degreeOfParallelism);
  JobOutputVertex fakeSyncOutput=JobGraphUtils.createSingletonFakeOutput(jobGraph,"String_Node_Str");
  JobGraphUtils.connectLocal(pageWithRankInput,head);
  JobGraphUtils.connectLocal(head,intermediate,DistributionPattern.BIPARTITE,ShipStrategy.BROADCAST);
  JobGraphUtils.connectLocal(transitionMatrixInput,intermediate,DistributionPattern.BIPARTITE,ShipStrategy.PARTITION_HASH);
  intermediateConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,degreeOfParallelism);
  JobGraphUtils.connectLocal(intermediate,tail,DistributionPattern.POINTWISE,ShipStrategy.FORWARD);
  tailConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,1);
  JobGraphUtils.connectLocal(head,sync);
  syncConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,degreeOfParallelism);
  JobGraphUtils.connectLocal(head,output);
  JobGraphUtils.connectLocal(tail,fakeTailOutput);
  JobGraphUtils.connectLocal(sync,fakeSyncOutput);
  fakeTailOutput.setVertexToShareInstancesWith(tail);
  tail.setVertexToShareInstancesWith(head);
  pageWithRankInput.setVertexToShareInstancesWith(head);
  transitionMatrixInput.setVertexToShareInstancesWith(head);
  intermediate.setVertexToShareInstancesWith(head);
  output.setVertexToShareInstancesWith(head);
  sync.setVertexToShareInstancesWith(head);
  fakeSyncOutput.setVertexToShareInstancesWith(sync);
  GlobalConfiguration.loadConfiguration("String_Node_Str");
  Configuration conf=GlobalConfiguration.getConfiguration();
  JobGraphUtils.submit(jobGraph,conf);
}