Program: 52665
Project: 52665
Buggy source:
ParseResult bestPath(List<WordAnalysis> sentence){
  if (sentence.size() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ActiveList<Hypothesis> currentList=new ActiveList<>();
  currentList.add(new Hypothesis(sentenceBegin,sentenceBegin,null,0));
  for (  WordAnalysis analysisData : sentence) {
    ActiveList<Hypothesis> nextList=new ActiveList<>();
    for (    SingleAnalysis analysis : analysisData) {
      for (      Hypothesis h : currentList) {
        SingleAnalysis[] trigram={h.prev,h.current,analysis};
        IntValueMap<String> features=extractor.extractFromTrigram(trigram);
        float trigramScore=0;
        for (        String key : features) {
          trigramScore+=(model.get(key) * features.get(key));
        }
        Hypothesis newHyp=new Hypothesis(h.current,analysis,h,h.score + trigramScore);
        nextList.add(newHyp);
      }
    }
    currentList=nextList;
  }
  for (  Hypothesis h : currentList) {
    SingleAnalysis[] trigram={h.prev,h.current,sentenceEnd};
    IntValueMap<String> features=extractor.extractFromTrigram(trigram);
    float trigramScore=0;
    for (    String key : features) {
      trigramScore+=(model.get(key) * features.get(key));
    }
    h.score+=trigramScore;
  }
  Hypothesis best=currentList.getBest();
  float bestScore=best.score;
  List<SingleAnalysis> result=Lists.newArrayList();
  while (best.previous != null) {
    result.add(best.current);
    best=best.previous;
  }
  Collections.reverse(result);
  return new ParseResult(result,bestScore);
}

Fixed version (ground truth):
ParseResult bestPath(List<WordAnalysis> sentence){
  if (sentence.size() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ActiveList<Hypothesis> currentList=new ActiveList<>();
  currentList.add(new Hypothesis(sentenceBegin,sentenceBegin,null,0));
  for (  WordAnalysis analysisData : sentence) {
    ActiveList<Hypothesis> nextList=new ActiveList<>();
    List<SingleAnalysis> analyses=analysisData.getAnalysisResults();
    if (analyses.size() == 0) {
      analyses.add(SingleAnalysis.unknown(analysisData.getInput()));
    }
    for (    SingleAnalysis analysis : analysisData) {
      for (      Hypothesis h : currentList) {
        SingleAnalysis[] trigram={h.prev,h.current,analysis};
        IntValueMap<String> features=extractor.extractFromTrigram(trigram);
        float trigramScore=0;
        for (        String key : features) {
          trigramScore+=(model.get(key) * features.get(key));
        }
        Hypothesis newHyp=new Hypothesis(h.current,analysis,h,h.score + trigramScore);
        nextList.add(newHyp);
      }
    }
    currentList=nextList;
  }
  for (  Hypothesis h : currentList) {
    SingleAnalysis[] trigram={h.prev,h.current,sentenceEnd};
    IntValueMap<String> features=extractor.extractFromTrigram(trigram);
    float trigramScore=0;
    for (    String key : features) {
      trigramScore+=(model.get(key) * features.get(key));
    }
    h.score+=trigramScore;
  }
  Hypothesis best=currentList.getBest();
  float bestScore=best.score;
  List<SingleAnalysis> result=Lists.newArrayList();
  while (best.previous != null) {
    result.add(best.current);
    best=best.previous;
  }
  Collections.reverse(result);
  return new ParseResult(result,bestScore);
}