Program: 45136
Project: 45136
Buggy source:
@Override public Plan getPlan(String... args) throws IllegalArgumentException {
  int noSubTasks=(args.length > 0 ? Integer.parseInt(args[0]) : -1);
  String dataInput=(args.length > 1 ? args[1] : "String_Node_Str");
  String dataOutput=(args.length > 2 ? args[2] : "String_Node_Str");
  DataSourceContract<PactString,FeatureList> source=new DataSourceContract<PactString,FeatureList>(NaiveBayesInputFormat.class,dataInput,"String_Node_Str");
  source.setDegreeOfParallelism(noSubTasks);
  MapContract<PactString,FeatureList,PactString,NormalizedTokenCountList> featureBaseMapper=new MapContract<PactString,FeatureList,PactString,NormalizedTokenCountList>(BayesFeatureMapper.Base.class);
  featureBaseMapper.setDegreeOfParallelism(noSubTasks);
  featureBaseMapper.setInput(source);
  MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble> featureCountMapper=new MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble>(BayesFeatureMapper.FeatureCount.class);
  featureCountMapper.setDegreeOfParallelism(noSubTasks);
  featureCountMapper.setInput(featureBaseMapper);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> featureCountReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesFeatureReducer.FeatureCount.class);
  featureCountReducer.setDegreeOfParallelism(noSubTasks);
  featureCountReducer.setInput(featureCountMapper);
  MapContract<PactString,NormalizedTokenCountList,PactString,PactInteger> labelCountMapper=new MapContract<PactString,NormalizedTokenCountList,PactString,PactInteger>(BayesFeatureMapper.LabelCount.class);
  labelCountMapper.setDegreeOfParallelism(noSubTasks);
  labelCountMapper.setInput(featureBaseMapper);
  ReduceContract<PactString,PactInteger,PactString,PactInteger> labelCountReducer=new ReduceContract<PactString,PactInteger,PactString,PactInteger>(BayesFeatureReducer.LabelCount.class);
  labelCountReducer.setDegreeOfParallelism(noSubTasks);
  labelCountReducer.setInput(labelCountMapper);
  MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble> featureTfMapper=new MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble>(BayesFeatureMapper.FeatureTf.class);
  featureTfMapper.setDegreeOfParallelism(noSubTasks);
  featureTfMapper.setInput(featureBaseMapper);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> featureTfReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesFeatureReducer.FeatureTf.class);
  featureTfReducer.setDegreeOfParallelism(noSubTasks);
  featureTfReducer.setInput(featureTfMapper);
  MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactInteger> dfMapper=new MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactInteger>(BayesFeatureMapper.DocumentFrequency.class);
  dfMapper.setDegreeOfParallelism(noSubTasks);
  dfMapper.setInput(featureBaseMapper);
  ReduceContract<LabelTokenPair,PactInteger,PactString,TokenCountPair> dfReducer=new ReduceContract<LabelTokenPair,PactInteger,PactString,TokenCountPair>(BayesFeatureReducer.DocumentFrequency.class);
  dfReducer.setDegreeOfParallelism(noSubTasks);
  dfReducer.setInput(dfMapper);
  MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactDouble> weightMapper=new MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactDouble>(BayesFeatureMapper.Weight.class);
  weightMapper.setDegreeOfParallelism(noSubTasks);
  weightMapper.setInput(featureBaseMapper);
  ReduceContract<LabelTokenPair,PactDouble,LabelTokenPair,PactDouble> weightReducer=new ReduceContract<LabelTokenPair,PactDouble,LabelTokenPair,PactDouble>(BayesFeatureReducer.Weight.class);
  weightReducer.setDegreeOfParallelism(noSubTasks);
  weightReducer.setInput(weightMapper);
  MapContract<PactString,PactInteger,PactInteger,PactInteger> overallWordCountMapper=new MapContract<PactString,PactInteger,PactInteger,PactInteger>(OverallWordCountMapper.class,"String_Node_Str");
  overallWordCountMapper.setDegreeOfParallelism(noSubTasks);
  overallWordCountMapper.setInput(featureCountReducer);
  ReduceContract<PactInteger,PactInteger,PactInteger,PactInteger> overallWordCountReducer=new ReduceContract<PactInteger,PactInteger,PactInteger,PactInteger>(OverallWordcountReducer.class,"String_Node_Str");
  overallWordCountReducer.setDegreeOfParallelism(noSubTasks);
  overallWordCountReducer.setInput(overallWordCountMapper);
  MatchContract<PactString,PactInteger,TokenCountPair,LabelTokenPair,PactDouble> weightCalculatorMatcher=new MatchContract<PactString,PactInteger,TokenCountPair,LabelTokenPair,PactDouble>(WeightCalculator.class,"String_Node_Str");
  weightCalculatorMatcher.setDegreeOfParallelism(noSubTasks);
  weightCalculatorMatcher.setFirstInput(labelCountReducer);
  weightCalculatorMatcher.setSecondInput(dfReducer);
  MatchContract<LabelTokenPair,PactDouble,PactDouble,LabelTokenPair,PactDouble> idfCalculatorMatcher=new MatchContract<LabelTokenPair,PactDouble,PactDouble,LabelTokenPair,PactDouble>(IdfCalculator.class,"String_Node_Str");
  idfCalculatorMatcher.setDegreeOfParallelism(noSubTasks);
  idfCalculatorMatcher.setFirstInput(weightCalculatorMatcher);
  idfCalculatorMatcher.setSecondInput(weightReducer);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> featureSummerMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesWeightMapper.FeatureSummer.class);
  featureSummerMapper.setDegreeOfParallelism(noSubTasks);
  featureSummerMapper.setInput(idfCalculatorMatcher);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> featureSummerReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesWeightReducer.Summer.class);
  featureSummerReducer.setDegreeOfParallelism(noSubTasks);
  featureSummerReducer.setInput(featureSummerMapper);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> labelSummerMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesWeightMapper.LabelSummer.class);
  labelSummerMapper.setDegreeOfParallelism(noSubTasks);
  labelSummerMapper.setInput(idfCalculatorMatcher);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> labelSummerReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesWeightReducer.Summer.class);
  labelSummerReducer.setDegreeOfParallelism(noSubTasks);
  labelSummerReducer.setInput(labelSummerMapper);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> totalSummerMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesWeightMapper.TotalSummer.class);
  totalSummerMapper.setDegreeOfParallelism(noSubTasks);
  totalSummerMapper.setInput(idfCalculatorMatcher);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> totalSummerReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesWeightReducer.Summer.class);
  totalSummerReducer.setDegreeOfParallelism(noSubTasks);
  totalSummerReducer.setInput(totalSummerMapper);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> tfidfTransformMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesThetaNormalizer.TfIdfTransform.class);
  tfidfTransformMapper.setDegreeOfParallelism(noSubTasks);
  tfidfTransformMapper.setInput(idfCalculatorMatcher);
  CrossContract<PactInteger,PactInteger,PactString,PactDouble,PactNull,ThetaNormalizerFactors> thetaFactorsSigmaVocab=new CrossContract<PactInteger,PactInteger,PactString,PactDouble,PactNull,ThetaNormalizerFactors>(BayesThetaNormalizer.ThetaFactorsVocabCountSigmaJSigmaK.class);
  thetaFactorsSigmaVocab.setDegreeOfParallelism(noSubTasks);
  thetaFactorsSigmaVocab.setFirstInput(overallWordCountReducer);
  thetaFactorsSigmaVocab.setSecondInput(totalSummerReducer);
  CrossContract<PactNull,ThetaNormalizerFactors,PactString,PactDouble,PactString,ThetaNormalizerFactors> thetaFactorsLabelWeights=new CrossContract<PactNull,ThetaNormalizerFactors,PactString,PactDouble,PactString,ThetaNormalizerFactors>(BayesThetaNormalizer.ThetaFactorsLabelWeights.class);
  thetaFactorsLabelWeights.setDegreeOfParallelism(noSubTasks);
  thetaFactorsLabelWeights.setFirstInput(thetaFactorsSigmaVocab);
  thetaFactorsLabelWeights.setSecondInput(labelSummerReducer);
  CoGroupContract<PactString,PactDouble,ThetaNormalizerFactors,PactString,PactDouble> thetaNormalizedLabels=new CoGroupContract<PactString,PactDouble,ThetaNormalizerFactors,PactString,PactDouble>(BayesThetaNormalizer.ThetaNormalize.class);
  thetaNormalizedLabels.setDegreeOfParallelism(noSubTasks);
  thetaNormalizedLabels.setFirstInput(thetaFactorsLabelWeights);
  thetaNormalizedLabels.setSecondInput(idfCalculatorMatcher);
  DataSinkContract<PactString,PactDouble> sink=new DataSinkContract<PactString,PactDouble>(StringDoubleOutFormat.class,dataOutput);
  sink.setInput(thetaNormalizedLabels);
  return new Plan(sink);
}

Fixed version (ground truth):
@Override public Plan getPlan(String... args) throws IllegalArgumentException {
  int noSubTasks=(args.length > 0 ? Integer.parseInt(args[0]) : -1);
  String dataInput=(args.length > 1 ? args[1] : "String_Node_Str");
  String dataOutput=(args.length > 2 ? args[2] : "String_Node_Str");
  DataSourceContract<PactString,FeatureList> source=new DataSourceContract<PactString,FeatureList>(NaiveBayesInputFormat.class,dataInput,"String_Node_Str");
  source.setDegreeOfParallelism(noSubTasks);
  MapContract<PactString,FeatureList,PactString,NormalizedTokenCountList> featureBaseMapper=new MapContract<PactString,FeatureList,PactString,NormalizedTokenCountList>(BayesFeatureMapper.Base.class);
  featureBaseMapper.setDegreeOfParallelism(noSubTasks);
  featureBaseMapper.setInput(source);
  MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble> featureCountMapper=new MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble>(BayesFeatureMapper.FeatureCount.class);
  featureCountMapper.setDegreeOfParallelism(noSubTasks);
  featureCountMapper.setInput(featureBaseMapper);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> featureCountReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesFeatureReducer.FeatureCount.class);
  featureCountReducer.setDegreeOfParallelism(noSubTasks);
  featureCountReducer.setInput(featureCountMapper);
  MapContract<PactString,NormalizedTokenCountList,PactString,PactInteger> labelCountMapper=new MapContract<PactString,NormalizedTokenCountList,PactString,PactInteger>(BayesFeatureMapper.LabelCount.class);
  labelCountMapper.setDegreeOfParallelism(noSubTasks);
  labelCountMapper.setInput(featureBaseMapper);
  ReduceContract<PactString,PactInteger,PactString,PactInteger> labelCountReducer=new ReduceContract<PactString,PactInteger,PactString,PactInteger>(BayesFeatureReducer.LabelCount.class);
  labelCountReducer.setDegreeOfParallelism(noSubTasks);
  labelCountReducer.setInput(labelCountMapper);
  MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble> featureTfMapper=new MapContract<PactString,NormalizedTokenCountList,PactString,PactDouble>(BayesFeatureMapper.FeatureTf.class);
  featureTfMapper.setDegreeOfParallelism(noSubTasks);
  featureTfMapper.setInput(featureBaseMapper);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> featureTfReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesFeatureReducer.FeatureTf.class);
  featureTfReducer.setDegreeOfParallelism(noSubTasks);
  featureTfReducer.setInput(featureTfMapper);
  MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactInteger> dfMapper=new MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactInteger>(BayesFeatureMapper.DocumentFrequency.class);
  dfMapper.setDegreeOfParallelism(noSubTasks);
  dfMapper.setInput(featureBaseMapper);
  ReduceContract<LabelTokenPair,PactInteger,PactString,TokenCountPair> dfReducer=new ReduceContract<LabelTokenPair,PactInteger,PactString,TokenCountPair>(BayesFeatureReducer.DocumentFrequency.class);
  dfReducer.setDegreeOfParallelism(noSubTasks);
  dfReducer.setInput(dfMapper);
  MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactDouble> weightMapper=new MapContract<PactString,NormalizedTokenCountList,LabelTokenPair,PactDouble>(BayesFeatureMapper.Weight.class);
  weightMapper.setDegreeOfParallelism(noSubTasks);
  weightMapper.setInput(featureBaseMapper);
  ReduceContract<LabelTokenPair,PactDouble,LabelTokenPair,PactDouble> weightReducer=new ReduceContract<LabelTokenPair,PactDouble,LabelTokenPair,PactDouble>(BayesFeatureReducer.Weight.class);
  weightReducer.setDegreeOfParallelism(noSubTasks);
  weightReducer.setInput(weightMapper);
  MapContract<PactString,PactDouble,PactInteger,PactInteger> overallWordCountMapper=new MapContract<PactString,PactDouble,PactInteger,PactInteger>(OverallWordCountMapper.class,"String_Node_Str");
  overallWordCountMapper.setDegreeOfParallelism(noSubTasks);
  overallWordCountMapper.setInput(featureCountReducer);
  ReduceContract<PactInteger,PactInteger,PactInteger,PactInteger> overallWordCountReducer=new ReduceContract<PactInteger,PactInteger,PactInteger,PactInteger>(OverallWordcountReducer.class,"String_Node_Str");
  overallWordCountReducer.setDegreeOfParallelism(noSubTasks);
  overallWordCountReducer.setInput(overallWordCountMapper);
  MatchContract<PactString,PactInteger,TokenCountPair,LabelTokenPair,PactDouble> weightCalculatorMatcher=new MatchContract<PactString,PactInteger,TokenCountPair,LabelTokenPair,PactDouble>(WeightCalculator.class,"String_Node_Str");
  weightCalculatorMatcher.setDegreeOfParallelism(noSubTasks);
  weightCalculatorMatcher.setFirstInput(labelCountReducer);
  weightCalculatorMatcher.setSecondInput(dfReducer);
  MatchContract<LabelTokenPair,PactDouble,PactDouble,LabelTokenPair,PactDouble> idfCalculatorMatcher=new MatchContract<LabelTokenPair,PactDouble,PactDouble,LabelTokenPair,PactDouble>(IdfCalculator.class,"String_Node_Str");
  idfCalculatorMatcher.setDegreeOfParallelism(noSubTasks);
  idfCalculatorMatcher.setFirstInput(weightCalculatorMatcher);
  idfCalculatorMatcher.setSecondInput(weightReducer);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> featureSummerMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesWeightMapper.FeatureSummer.class);
  featureSummerMapper.setDegreeOfParallelism(noSubTasks);
  featureSummerMapper.setInput(idfCalculatorMatcher);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> featureSummerReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesWeightReducer.Summer.class);
  featureSummerReducer.setDegreeOfParallelism(noSubTasks);
  featureSummerReducer.setInput(featureSummerMapper);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> labelSummerMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesWeightMapper.LabelSummer.class);
  labelSummerMapper.setDegreeOfParallelism(noSubTasks);
  labelSummerMapper.setInput(idfCalculatorMatcher);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> labelSummerReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesWeightReducer.Summer.class);
  labelSummerReducer.setDegreeOfParallelism(noSubTasks);
  labelSummerReducer.setInput(labelSummerMapper);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> totalSummerMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesWeightMapper.TotalSummer.class);
  totalSummerMapper.setDegreeOfParallelism(noSubTasks);
  totalSummerMapper.setInput(idfCalculatorMatcher);
  ReduceContract<PactString,PactDouble,PactString,PactDouble> totalSummerReducer=new ReduceContract<PactString,PactDouble,PactString,PactDouble>(BayesWeightReducer.Summer.class);
  totalSummerReducer.setDegreeOfParallelism(noSubTasks);
  totalSummerReducer.setInput(totalSummerMapper);
  MapContract<LabelTokenPair,PactDouble,PactString,PactDouble> tfidfTransformMapper=new MapContract<LabelTokenPair,PactDouble,PactString,PactDouble>(BayesThetaNormalizer.TfIdfTransform.class);
  tfidfTransformMapper.setDegreeOfParallelism(noSubTasks);
  tfidfTransformMapper.setInput(idfCalculatorMatcher);
  CrossContract<PactInteger,PactInteger,PactString,PactDouble,PactNull,ThetaNormalizerFactors> thetaFactorsSigmaVocab=new CrossContract<PactInteger,PactInteger,PactString,PactDouble,PactNull,ThetaNormalizerFactors>(BayesThetaNormalizer.ThetaFactorsVocabCountSigmaJSigmaK.class);
  thetaFactorsSigmaVocab.setDegreeOfParallelism(noSubTasks);
  thetaFactorsSigmaVocab.setFirstInput(overallWordCountReducer);
  thetaFactorsSigmaVocab.setSecondInput(totalSummerReducer);
  CrossContract<PactNull,ThetaNormalizerFactors,PactString,PactDouble,PactString,ThetaNormalizerFactors> thetaFactorsLabelWeights=new CrossContract<PactNull,ThetaNormalizerFactors,PactString,PactDouble,PactString,ThetaNormalizerFactors>(BayesThetaNormalizer.ThetaFactorsLabelWeights.class);
  thetaFactorsLabelWeights.setDegreeOfParallelism(noSubTasks);
  thetaFactorsLabelWeights.setFirstInput(thetaFactorsSigmaVocab);
  thetaFactorsLabelWeights.setSecondInput(labelSummerReducer);
  CoGroupContract<PactString,PactDouble,ThetaNormalizerFactors,PactString,PactDouble> thetaNormalizedLabels=new CoGroupContract<PactString,PactDouble,ThetaNormalizerFactors,PactString,PactDouble>(BayesThetaNormalizer.ThetaNormalize.class);
  thetaNormalizedLabels.setDegreeOfParallelism(noSubTasks);
  thetaNormalizedLabels.setFirstInput(tfidfTransformMapper);
  thetaNormalizedLabels.setSecondInput(thetaFactorsLabelWeights);
  DataSinkContract<PactString,PactDouble> sink=new DataSinkContract<PactString,PactDouble>(StringDoubleOutFormat.class,dataOutput);
  sink.setInput(thetaNormalizedLabels);
  return new Plan(sink);
}