Program: 52685
Project: 52685
Buggy source:
public _PerceptronAmbiguityResolver train(Path trainFile,Path devFile) throws IOException {
  FeatureExtractor extractor=new FeatureExtractor();
  Decoder decoder=new Decoder(averagedWeights,extractor);
  DataSet trainingSet=com.google.common.io.Files.readLines(trainFile.toFile(),Charsets.UTF_8,new DataSetLoader());
  int numExamples=0;
  for (int i=0; i < 4; i++) {
    Log.info("String_Node_Str" + i);
    for (    SentenceData sentence : trainingSet) {
      numExamples++;
      ParseResult result=decoder.bestPath(sentence);
      if (numExamples % 500 == 0) {
        Log.info("String_Node_Str",numExamples);
      }
      if (sentence.correctParse.equals(result.bestParse)) {
        continue;
      }
      IntValueMap<String> correctFeatures=extractor.extractFromSentence(sentence.correctParse);
      IntValueMap<String> bestFeatures=extractor.extractFromSentence(result.bestParse);
      updateModel(correctFeatures,bestFeatures,numExamples);
    }
    for (    String key : averagedWeights) {
      updateAverageWeights(numExamples,key);
    }
    Log.info("String_Node_Str");
    _PerceptronAmbiguityResolver disambiguator=new _PerceptronAmbiguityResolver(averagedWeights,extractor);
    disambiguator.test(devFile.toFile());
  }
  return new _PerceptronAmbiguityResolver(averagedWeights,extractor);
}

Fixed version (ground truth):
public _PerceptronAmbiguityResolver train(Path trainFile,Path devFile) throws IOException {
  FeatureExtractor extractor=new FeatureExtractor();
  Decoder decoder=new Decoder(averagedWeights,extractor);
  DataSet trainingSet=com.google.common.io.Files.readLines(trainFile.toFile(),Charsets.UTF_8,new DataSetLoader());
  int numExamples=0;
  for (int i=0; i < 4; i++) {
    Log.info("String_Node_Str" + i);
    for (    SentenceData sentence : trainingSet) {
      if (sentence.size() == 0) {
        continue;
      }
      numExamples++;
      ParseResult result=decoder.bestPath(sentence);
      if (numExamples % 500 == 0) {
        Log.info("String_Node_Str",numExamples);
      }
      if (sentence.correctParse.equals(result.bestParse)) {
        continue;
      }
      if (sentence.correctParse.size() != result.bestParse.size()) {
        throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + sentence.correctParse + "String_Node_Str"+ result.bestParse);
      }
      IntValueMap<String> correctFeatures=extractor.extractFromSentence(sentence.correctParse);
      IntValueMap<String> bestFeatures=extractor.extractFromSentence(result.bestParse);
      updateModel(correctFeatures,bestFeatures,numExamples);
    }
    for (    String feat : averagedWeights) {
      int featureCount=counts.get(feat);
      float updatedWeight=(averagedWeights.get(feat) * featureCount + (numExamples - featureCount) * weights.get(feat)) / numExamples;
      averagedWeights.put(feat,updatedWeight);
      counts.put(feat,numExamples);
    }
    Log.info("String_Node_Str");
    _PerceptronAmbiguityResolver disambiguator=new _PerceptronAmbiguityResolver(averagedWeights,extractor);
    disambiguator.test(devFile.toFile());
  }
  return new _PerceptronAmbiguityResolver(averagedWeights,extractor);
}