Program: 131803
Project: 131803
Buggy source:
public void run(CommandLine cmd) throws ParseException {
  log.info("String_Node_Str");
  String trainPath=cmd.getOptionValue("String_Node_Str");
  Treebank treebank=new MemoryTreebank();
  CategoryWordTag.suppressTerminalDetails=true;
  treebank.loadPath(trainPath);
  final HeadFinder chf=new CollinsHeadFinder();
  treebank.apply(new TreeVisitor(){
    public void visitTree(    Tree pt){
      pt.percolateHeads(chf);
    }
  }
);
  DepTreebank depTreebank;
  if (cmd.hasOption("String_Node_Str") || cmd.hasOption("String_Node_Str")) {
    DepTreebank depTreebankTmp=new DepTreebank(treebank);
    depTreebank=new DepTreebank();
    int maxSentenceLength=Integer.MAX_VALUE;
    if (cmd.hasOption("String_Node_Str")) {
      maxSentenceLength=Integer.valueOf(cmd.getOptionValue("String_Node_Str"));
    }
    int maxNumSentences=Integer.MAX_VALUE;
    if (cmd.hasOption("String_Node_Str")) {
      maxNumSentences=Integer.valueOf(cmd.getOptionValue("String_Node_Str"));
    }
    for (    DepTree tree : depTreebankTmp) {
      if (depTreebank.size() > maxNumSentences) {
        break;
      }
      int len=tree.getNodes().size();
      if (len <= maxSentenceLength) {
        depTreebank.add(tree);
      }
    }
  }
 else {
    depTreebank=new DepTreebank(treebank);
  }
  log.info("String_Node_Str" + depTreebank.size());
  SentenceCollection sentences=new SentenceCollection(depTreebank);
  log.info("String_Node_Str");
  Trainer model=TrainerFactory.getModel(cmd);
  model.train(sentences);
  log.info("String_Node_Str");
  PrintWriter pw=new PrintWriter(System.out);
  if (cmd.hasOption("String_Node_Str")) {
    Evaluator pwEval=new DependencyParserEvaluator();
    pwEval.evaluate(model);
    pwEval.print(pw);
  }
}

Fixed version (ground truth):
public void run(CommandLine cmd) throws ParseException {
  log.info("String_Node_Str");
  String trainPath=cmd.getOptionValue("String_Node_Str");
  Treebank treebank=new MemoryTreebank();
  CategoryWordTag.suppressTerminalDetails=true;
  treebank.loadPath(trainPath);
  final HeadFinder chf=new CollinsHeadFinder();
  treebank.apply(new TreeVisitor(){
    public void visitTree(    Tree pt){
      pt.percolateHeads(chf);
    }
  }
);
  DepTreebank depTreebank;
  if (cmd.hasOption("String_Node_Str") || cmd.hasOption("String_Node_Str")) {
    DepTreebank depTreebankTmp=new DepTreebank(treebank);
    depTreebank=new DepTreebank();
    int maxSentenceLength=Integer.MAX_VALUE;
    if (cmd.hasOption("String_Node_Str")) {
      maxSentenceLength=Integer.valueOf(cmd.getOptionValue("String_Node_Str"));
    }
    int maxNumSentences=Integer.MAX_VALUE;
    if (cmd.hasOption("String_Node_Str")) {
      maxNumSentences=Integer.valueOf(cmd.getOptionValue("String_Node_Str"));
    }
    for (    DepTree tree : depTreebankTmp) {
      if (depTreebank.size() >= maxNumSentences) {
        break;
      }
      int len=tree.getNodes().size();
      if (len <= maxSentenceLength) {
        depTreebank.add(tree);
      }
    }
  }
 else {
    depTreebank=new DepTreebank(treebank);
  }
  log.info("String_Node_Str" + depTreebank.size());
  SentenceCollection sentences=depTreebank.getSentences();
  log.info("String_Node_Str");
  Trainer trainer=TrainerFactory.getModel(cmd);
  trainer.train(sentences);
  ViterbiParser parser=((ViterbiTrainer)trainer).getParser();
  Model model=trainer.getModel();
  log.info("String_Node_Str");
  Evaluator pwEval=new DependencyParserEvaluator(parser,depTreebank);
  pwEval.evaluate(model);
  pwEval.print();
}