Program: 131555
Project: 131555
Buggy source:
public FgExamples getData(List<CoNLL09Sentence> sents){
  Alphabet<String> obsAlphabet=new Alphabet<String>();
  List<FeatureExtractor> featExts=new ArrayList<FeatureExtractor>();
  FgExamples data=new FgExamples(alphabet);
  for (int i=0; i < sents.size(); i++) {
    CoNLL09Sentence sent=sents.get(i);
    if (i % 1000 == 0 && i > 0) {
      log.debug("String_Node_Str" + i + "String_Node_Str");
    }
    SrlGraph srlGraph=sent.getSrlGraph();
    Set<Integer> knownPreds=getKnownPreds(srlGraph);
    SrlFactorGraph sfg=new SrlFactorGraph(prm.fgPrm,sent.size(),knownPreds,cs.roleStateNames);
    VarConfig trainConfig=getTrainAssignment(sent,srlGraph,sfg);
    FgExample ex=new FgExample(sfg,trainConfig);
    SentFeatureExtractor sentFeatExt=new SentFeatureExtractor(prm.fePrm,sent,cs,obsAlphabet);
    FeatureExtractor featExtractor=new SrlFeatureExtractor(prm.srlFePrm,sfg,alphabet,sentFeatExt);
    featExts.add(featExtractor);
    ex.cacheLatFeats(sfg,trainConfig,featExtractor);
    data.add(ex);
  }
  if (!prm.includeUnsupportedFeatures) {
    alphabet.stopGrowth();
  }
  for (int i=0; i < data.size(); i++) {
    if (i % 1000 == 0 && i > 0) {
      log.debug("String_Node_Str" + i + "String_Node_Str");
    }
    FgExample ex=data.get(i);
    CoNLL09Sentence sent=sents.get(i);
    SrlGraph srlGraph=sent.getSrlGraph();
    SrlFactorGraph sfg=(SrlFactorGraph)ex.getOriginalFactorGraph();
    VarConfig trainConfig=getTrainAssignment(sent,srlGraph,sfg);
    FeatureExtractor featExtractor=featExts.get(i);
    ex.cacheLatPredFeats(sfg,trainConfig,featExtractor);
  }
  log.info("String_Node_Str" + obsAlphabet.size());
  data.setSourceSentences(sents);
  return data;
}

Fixed version (ground truth):
public FgExamples getData(List<CoNLL09Sentence> sents){
  preprocess(sents);
  Alphabet<String> obsAlphabet=new Alphabet<String>();
  List<FeatureExtractor> featExts=new ArrayList<FeatureExtractor>();
  FgExamples data=new FgExamples(alphabet);
  for (int i=0; i < sents.size(); i++) {
    CoNLL09Sentence sent=sents.get(i);
    if (i % 1000 == 0 && i > 0) {
      log.debug("String_Node_Str" + i + "String_Node_Str");
    }
    SrlGraph srlGraph=sent.getSrlGraph();
    Set<Integer> knownPreds=getKnownPreds(srlGraph);
    SrlFactorGraph sfg=new SrlFactorGraph(prm.fgPrm,sent.size(),knownPreds,cs.roleStateNames);
    VarConfig trainConfig=getTrainAssignment(sent,srlGraph,sfg);
    FgExample ex=new FgExample(sfg,trainConfig);
    SentFeatureExtractor sentFeatExt=new SentFeatureExtractor(prm.fePrm,sent,cs,obsAlphabet);
    FeatureExtractor featExtractor=new SrlFeatureExtractor(prm.srlFePrm,sfg,alphabet,sentFeatExt);
    featExts.add(featExtractor);
    ex.cacheLatFeats(sfg,trainConfig,featExtractor);
    data.add(ex);
  }
  if (!prm.includeUnsupportedFeatures) {
    alphabet.stopGrowth();
  }
  for (int i=0; i < data.size(); i++) {
    if (i % 1000 == 0 && i > 0) {
      log.debug("String_Node_Str" + i + "String_Node_Str");
    }
    FgExample ex=data.get(i);
    CoNLL09Sentence sent=sents.get(i);
    SrlGraph srlGraph=sent.getSrlGraph();
    SrlFactorGraph sfg=(SrlFactorGraph)ex.getOriginalFactorGraph();
    VarConfig trainConfig=getTrainAssignment(sent,srlGraph,sfg);
    FeatureExtractor featExtractor=featExts.get(i);
    ex.cacheLatPredFeats(sfg,trainConfig,featExtractor);
  }
  log.info("String_Node_Str" + obsAlphabet.size());
  data.setSourceSentences(sents);
  return data;
}