Program: 55246
Project: 55246
Buggy source:
public static void main(String[] args) throws Exception {
  int degreeOfParallelism=2;
  int numSubTasksPerInstance=degreeOfParallelism;
  String pageWithRankInputPath="String_Node_Str" + PlayConstants.PLAY_DIR + "String_Node_Str";
  String transitionMatrixInputPath="String_Node_Str" + PlayConstants.PLAY_DIR + "String_Node_Str";
  String outputPath="String_Node_Str";
  String confPath=PlayConstants.PLAY_DIR + "String_Node_Str";
  int memoryPerTask=25;
  int memoryForMatch=memoryPerTask;
  int numIterations=5;
  if (args.length == 9) {
    degreeOfParallelism=Integer.parseInt(args[0]);
    numSubTasksPerInstance=Integer.parseInt(args[1]);
    pageWithRankInputPath=args[2];
    transitionMatrixInputPath=args[3];
    outputPath=args[4];
    confPath=args[5];
    memoryPerTask=Integer.parseInt(args[6]);
    memoryForMatch=Integer.parseInt(args[7]);
    numIterations=Integer.parseInt(args[8]);
  }
  JobGraph jobGraph=new JobGraph("String_Node_Str");
  JobInputVertex pageWithRankInput=JobGraphUtils.createInput(PageWithRankInputFormat.class,pageWithRankInputPath,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig pageWithRankInputConfig=new TaskConfig(pageWithRankInput.getConfiguration());
  pageWithRankInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(pageWithRankInputConfig.getConfigForOutputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  JobInputVertex transitionMatrixInput=JobGraphUtils.createInput(RowPartitionedTransitionMatrixInputFormat.class,transitionMatrixInputPath,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig transitionMatrixInputConfig=new TaskConfig(transitionMatrixInput.getConfiguration());
  transitionMatrixInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(transitionMatrixInputConfig.getConfigForOutputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  JobTaskVertex head=JobGraphUtils.createTask(IterationHeadPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig headConfig=new TaskConfig(head.getConfiguration());
  headConfig.setDriver(MapDriver.class);
  headConfig.setStubClass(IdentityMap.class);
  headConfig.setMemorySize(memoryPerTask * JobGraphUtils.MEGABYTE);
  headConfig.setBackChannelMemoryFraction(0.8f);
  JobTaskVertex intermediate=JobGraphUtils.createTask(IterationIntermediatePactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig intermediateConfig=new TaskConfig(intermediate.getConfiguration());
  intermediateConfig.setDriver(RepeatableHashjoinMatchDriverWithCachedBuildside.class);
  intermediateConfig.setStubClass(DotProductRowMatch.class);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForInputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForInputParameters(1),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  intermediateConfig.setMemorySize(memoryForMatch * JobGraphUtils.MEGABYTE);
  intermediateConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForOutputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  JobTaskVertex tail=JobGraphUtils.createTask(IterationTailPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig tailConfig=new TaskConfig(tail.getConfiguration());
  tailConfig.setLocalStrategy(TaskConfig.LocalStrategy.COMBININGSORT);
  tailConfig.setDriver(ReduceDriver.class);
  tailConfig.setStubClass(DotProductReducer.class);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(tailConfig.getConfigForInputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  tailConfig.setMemorySize(memoryPerTask * JobGraphUtils.MEGABYTE);
  tailConfig.setNumFilehandles(10);
  JobOutputVertex sync=JobGraphUtils.createSync(jobGraph,degreeOfParallelism);
  TaskConfig syncConfig=new TaskConfig(sync.getConfiguration());
  syncConfig.setNumberOfIterations(numIterations);
  JobOutputVertex output=JobGraphUtils.createFileOutput(jobGraph,"String_Node_Str",degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig outputConfig=new TaskConfig(output.getConfiguration());
  outputConfig.setStubClass(PageWithRankOutFormat.class);
  outputConfig.setStubParameter(FileOutputFormat.FILE_PARAMETER_KEY,outputPath);
  JobOutputVertex fakeTailOutput=JobGraphUtils.createFakeOutput(jobGraph,"String_Node_Str",degreeOfParallelism,numSubTasksPerInstance);
  JobGraphUtils.connect(pageWithRankInput,head,ChannelType.NETWORK,DistributionPattern.BIPARTITE,ShipStrategyType.PARTITION_HASH);
  JobGraphUtils.connect(head,intermediate,ChannelType.NETWORK,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(transitionMatrixInput,intermediate,ChannelType.NETWORK,DistributionPattern.BIPARTITE,ShipStrategyType.PARTITION_HASH);
  intermediateConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,1);
  JobGraphUtils.connect(head,sync,ChannelType.NETWORK,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(head,output,ChannelType.INMEMORY,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(tail,fakeTailOutput,ChannelType.INMEMORY,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(intermediate,tail,ChannelType.NETWORK,DistributionPattern.BIPARTITE,ShipStrategyType.PARTITION_HASH);
  tailConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,degreeOfParallelism);
  fakeTailOutput.setVertexToShareInstancesWith(tail);
  tail.setVertexToShareInstancesWith(head);
  pageWithRankInput.setVertexToShareInstancesWith(head);
  transitionMatrixInput.setVertexToShareInstancesWith(head);
  intermediate.setVertexToShareInstancesWith(head);
  output.setVertexToShareInstancesWith(head);
  sync.setVertexToShareInstancesWith(head);
  GlobalConfiguration.loadConfiguration(confPath);
  Configuration conf=GlobalConfiguration.getConfiguration();
  JobGraphUtils.submit(jobGraph,conf);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  int degreeOfParallelism=2;
  int numSubTasksPerInstance=degreeOfParallelism;
  String pageWithRankInputPath="String_Node_Str" + PlayConstants.PLAY_DIR + "String_Node_Str";
  String transitionMatrixInputPath="String_Node_Str" + PlayConstants.PLAY_DIR + "String_Node_Str";
  String outputPath="String_Node_Str";
  String confPath=PlayConstants.PLAY_DIR + "String_Node_Str";
  int memoryPerTask=25;
  int memoryForMatch=memoryPerTask;
  int numIterations=5;
  long numVertices=4;
  if (args.length == 10) {
    degreeOfParallelism=Integer.parseInt(args[0]);
    numSubTasksPerInstance=Integer.parseInt(args[1]);
    pageWithRankInputPath=args[2];
    transitionMatrixInputPath=args[3];
    outputPath=args[4];
    confPath=args[5];
    memoryPerTask=Integer.parseInt(args[6]);
    memoryForMatch=Integer.parseInt(args[7]);
    numIterations=Integer.parseInt(args[8]);
    numVertices=Long.parseLong(args[9]);
  }
  JobGraph jobGraph=new JobGraph("String_Node_Str");
  JobInputVertex pageWithRankInput=JobGraphUtils.createInput(PageWithRankInputFormat.class,pageWithRankInputPath,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig pageWithRankInputConfig=new TaskConfig(pageWithRankInput.getConfiguration());
  pageWithRankInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(pageWithRankInputConfig.getConfigForOutputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  JobInputVertex transitionMatrixInput=JobGraphUtils.createInput(RowPartitionedTransitionMatrixInputFormat.class,transitionMatrixInputPath,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig transitionMatrixInputConfig=new TaskConfig(transitionMatrixInput.getConfiguration());
  transitionMatrixInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(transitionMatrixInputConfig.getConfigForOutputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  JobTaskVertex head=JobGraphUtils.createTask(IterationHeadPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig headConfig=new TaskConfig(head.getConfiguration());
  headConfig.setDriver(MapDriver.class);
  headConfig.setStubClass(IdentityMap.class);
  headConfig.setMemorySize(memoryPerTask * JobGraphUtils.MEGABYTE);
  headConfig.setBackChannelMemoryFraction(0.8f);
  JobTaskVertex intermediate=JobGraphUtils.createTask(IterationIntermediatePactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig intermediateConfig=new TaskConfig(intermediate.getConfiguration());
  intermediateConfig.setDriver(RepeatableHashjoinMatchDriverWithCachedBuildside.class);
  intermediateConfig.setStubClass(DotProductRowMatch.class);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForInputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForInputParameters(1),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  intermediateConfig.setMemorySize(memoryForMatch * JobGraphUtils.MEGABYTE);
  intermediateConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class,0);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForOutputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  JobTaskVertex tail=JobGraphUtils.createTask(IterationTailPactTask.class,"String_Node_Str",jobGraph,degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig tailConfig=new TaskConfig(tail.getConfiguration());
  tailConfig.setLocalStrategy(TaskConfig.LocalStrategy.COMBININGSORT);
  tailConfig.setDriver(ReduceDriver.class);
  tailConfig.setStubClass(DotProductReducer.class);
  PactRecordComparatorFactory.writeComparatorSetupToConfig(tailConfig.getConfigForInputParameters(0),new int[]{0},new Class[]{PactLong.class},new boolean[]{true});
  tailConfig.setMemorySize(memoryPerTask * JobGraphUtils.MEGABYTE);
  tailConfig.setNumFilehandles(10);
  tailConfig.setStubParameter("String_Node_Str",String.valueOf(numVertices));
  JobOutputVertex sync=JobGraphUtils.createSync(jobGraph,degreeOfParallelism);
  TaskConfig syncConfig=new TaskConfig(sync.getConfiguration());
  syncConfig.setNumberOfIterations(numIterations);
  JobOutputVertex output=JobGraphUtils.createFileOutput(jobGraph,"String_Node_Str",degreeOfParallelism,numSubTasksPerInstance);
  TaskConfig outputConfig=new TaskConfig(output.getConfiguration());
  outputConfig.setStubClass(PageWithRankOutFormat.class);
  outputConfig.setStubParameter(FileOutputFormat.FILE_PARAMETER_KEY,outputPath);
  JobOutputVertex fakeTailOutput=JobGraphUtils.createFakeOutput(jobGraph,"String_Node_Str",degreeOfParallelism,numSubTasksPerInstance);
  JobGraphUtils.connect(pageWithRankInput,head,ChannelType.NETWORK,DistributionPattern.BIPARTITE,ShipStrategyType.PARTITION_HASH);
  JobGraphUtils.connect(head,intermediate,ChannelType.NETWORK,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(transitionMatrixInput,intermediate,ChannelType.NETWORK,DistributionPattern.BIPARTITE,ShipStrategyType.PARTITION_HASH);
  intermediateConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,1);
  JobGraphUtils.connect(head,sync,ChannelType.NETWORK,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(head,output,ChannelType.INMEMORY,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(tail,fakeTailOutput,ChannelType.INMEMORY,DistributionPattern.POINTWISE,ShipStrategyType.FORWARD);
  JobGraphUtils.connect(intermediate,tail,ChannelType.NETWORK,DistributionPattern.BIPARTITE,ShipStrategyType.PARTITION_HASH);
  tailConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0,degreeOfParallelism);
  fakeTailOutput.setVertexToShareInstancesWith(tail);
  tail.setVertexToShareInstancesWith(head);
  pageWithRankInput.setVertexToShareInstancesWith(head);
  transitionMatrixInput.setVertexToShareInstancesWith(head);
  intermediate.setVertexToShareInstancesWith(head);
  output.setVertexToShareInstancesWith(head);
  sync.setVertexToShareInstancesWith(head);
  GlobalConfiguration.loadConfiguration(confPath);
  Configuration conf=GlobalConfiguration.getConfiguration();
  JobGraphUtils.submit(jobGraph,conf);
}