Program: 56214
Project: 56214
Buggy source:
/** 
 * Assembles the Plan of the All-2-All Shortest Paths example Pact program. The program computes one iteration of the All-2-All Shortest Paths algorithm. For the first iteration, two input formats can be chosen: 1) RDF triples with foaf:knows predicates 2) Text-serialized paths (see PathInFormat and PathOutFormat) To choose 1) set the forth parameter to "true". If set to "false" 2) will be used.
 */
@Override public Plan getPlan(String... args){
  if (args.length != 4) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int noSubTasks=Integer.parseInt(args[0]);
  String paths=args[1];
  String output=args[2];
  boolean rdfInput=Boolean.parseBoolean(args[3]);
  DataSourceContract<NodePair,Path> pathsInput;
  if (rdfInput) {
    pathsInput=new DataSourceContract<NodePair,Path>(RDFTripleInFormat.class,paths);
  }
 else {
    pathsInput=new DataSourceContract<NodePair,Path>(PathInFormat.class,paths);
  }
  pathsInput.setFormatParameter("String_Node_Str","String_Node_Str");
  pathsInput.setDegreeOfParallelism(noSubTasks);
  MapContract<NodePair,Path,PactString,Path> pathStarts=new MapContract<NodePair,Path,PactString,Path>(ProjectPathStart.class,"String_Node_Str");
  pathStarts.setDegreeOfParallelism(noSubTasks);
  MapContract<NodePair,Path,PactString,Path> pathEnds=new MapContract<NodePair,Path,PactString,Path>(ProjectPathEnd.class,"String_Node_Str");
  pathEnds.setDegreeOfParallelism(noSubTasks);
  MatchContract<PactString,Path,Path,NodePair,Path> concatPaths=new MatchContract<PactString,Path,Path,NodePair,Path>(ConcatPaths.class,"String_Node_Str");
  concatPaths.setDegreeOfParallelism(noSubTasks);
  CoGroupContract<NodePair,Path,Path,PactNull,Path> findShortestPaths=new CoGroupContract<NodePair,Path,Path,PactNull,Path>(FindShortestPath.class,"String_Node_Str");
  findShortestPaths.setDegreeOfParallelism(noSubTasks);
  DataSinkContract<PactNull,Path> result=new DataSinkContract<PactNull,Path>(PathOutFormat.class,output);
  result.setDegreeOfParallelism(noSubTasks);
  result.setInput(findShortestPaths);
  findShortestPaths.setFirstInput(pathsInput);
  findShortestPaths.setSecondInput(concatPaths);
  concatPaths.setFirstInput(pathStarts);
  pathStarts.setInput(pathsInput);
  concatPaths.setSecondInput(pathEnds);
  pathEnds.setInput(pathsInput);
  return new Plan(result,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Assembles the Plan of the All-2-All Shortest Paths example Pact program. The program computes one iteration of the All-2-All Shortest Paths algorithm. For the first iteration, two input formats can be chosen: 1) RDF triples with foaf:knows predicates 2) Text-serialized paths (see PathInFormat and PathOutFormat) To choose 1) set the forth parameter to "true". If set to "false" 2) will be used.
 */
@Override public Plan getPlan(String... args){
  int noSubTasks=(args.length > 0 ? Integer.parseInt(args[0]) : 1);
  String paths=(args.length > 1 ? args[1] : "String_Node_Str");
  String output=(args.length > 2 ? args[2] : "String_Node_Str");
  boolean rdfInput=(args.length > 3 ? Boolean.parseBoolean(args[3]) : false);
  DataSourceContract<NodePair,Path> pathsInput;
  if (rdfInput) {
    pathsInput=new DataSourceContract<NodePair,Path>(RDFTripleInFormat.class,paths);
  }
 else {
    pathsInput=new DataSourceContract<NodePair,Path>(PathInFormat.class,paths);
  }
  pathsInput.setFormatParameter("String_Node_Str","String_Node_Str");
  pathsInput.setDegreeOfParallelism(noSubTasks);
  MapContract<NodePair,Path,PactString,Path> pathStarts=new MapContract<NodePair,Path,PactString,Path>(ProjectPathStart.class,"String_Node_Str");
  pathStarts.setDegreeOfParallelism(noSubTasks);
  MapContract<NodePair,Path,PactString,Path> pathEnds=new MapContract<NodePair,Path,PactString,Path>(ProjectPathEnd.class,"String_Node_Str");
  pathEnds.setDegreeOfParallelism(noSubTasks);
  MatchContract<PactString,Path,Path,NodePair,Path> concatPaths=new MatchContract<PactString,Path,Path,NodePair,Path>(ConcatPaths.class,"String_Node_Str");
  concatPaths.setDegreeOfParallelism(noSubTasks);
  CoGroupContract<NodePair,Path,Path,PactNull,Path> findShortestPaths=new CoGroupContract<NodePair,Path,Path,PactNull,Path>(FindShortestPath.class,"String_Node_Str");
  findShortestPaths.setDegreeOfParallelism(noSubTasks);
  DataSinkContract<PactNull,Path> result=new DataSinkContract<PactNull,Path>(PathOutFormat.class,output);
  result.setDegreeOfParallelism(noSubTasks);
  result.setInput(findShortestPaths);
  findShortestPaths.setFirstInput(pathsInput);
  findShortestPaths.setSecondInput(concatPaths);
  concatPaths.setFirstInput(pathStarts);
  pathStarts.setInput(pathsInput);
  concatPaths.setSecondInput(pathEnds);
  pathEnds.setInput(pathsInput);
  return new Plan(result,"String_Node_Str");
}