Program: 131597
Project: 131597
Buggy source:
public void run() throws ParseException, IOException {
  DmvModel model=null;
  Alphabet<Label> alphabet;
  DmvModel goldModel=null;
  if (modelIn != null) {
    log.info("String_Node_Str" + modelIn);
    model=(DmvModel)Files.deserialize(modelIn);
    alphabet=model.getTagAlphabet();
  }
 else {
    alphabet=new Alphabet<Label>();
  }
  if (trainType != null && train != null) {
    if (model != null) {
      log.error("String_Node_Str");
      throw new ParseException("String_Node_Str" + "String_Node_Str");
    }
    DepTreebank trainTreebank=getData(alphabet,trainType,train,"String_Node_Str");
    DmvTrainCorpus trainCorpus=new DmvTrainCorpus(trainTreebank,propSupervised);
    log.info("String_Node_Str" + trainCorpus.getNumUnlabeled());
    log.info("String_Node_Str" + trainCorpus.getNumLabeled());
    if (printSentences != null) {
      printSentences(trainCorpus.getSentences(),printSentences);
    }
    if (relaxOnly) {
      runRelaxOnly(goldModel,trainTreebank,trainCorpus);
      return;
    }
    log.info("String_Node_Str");
    Trainer trainer=TrainerFactory.getTrainer(trainTreebank,goldModel);
    if (trainer instanceof BnBDmvTrainer) {
      BnBDmvTrainer bnb=(BnBDmvTrainer)trainer;
      bnb.init(trainCorpus);
      updateBounds(trainCorpus,bnb.getRootRelaxation(),trainTreebank,goldModel);
      bnb.train();
    }
 else {
      trainer.train(trainCorpus);
    }
    model=(DmvModel)trainer.getModel();
    evalAndWrite(model,trainTreebank,"String_Node_Str",trainOut,trainType);
  }
  if (modelOut != null) {
    log.info("String_Node_Str" + modelOut);
    Files.serialize(model,modelOut);
  }
  if (printModel != null) {
    log.info("String_Node_Str" + printModel);
    Writer writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(printModel),"String_Node_Str"));
    writer.write("String_Node_Str");
    writer.write(model.toString());
    writer.close();
  }
  if (test != null && testType != null) {
    alphabet.stopGrowth();
    log.info("String_Node_Str" + test);
    DepTreebank testTreebank=getData(alphabet,testType,test,"String_Node_Str");
    evalAndWrite(model,testTreebank,"String_Node_Str",testOut,testType);
  }
}

Fixed version (ground truth):
public void run() throws ParseException, IOException {
  DmvModel model=null;
  Alphabet<Label> alphabet;
  DmvModel goldModel=null;
  if (modelIn != null) {
    log.info("String_Node_Str" + modelIn);
    model=(DmvModel)Files.deserialize(modelIn);
    alphabet=model.getTagAlphabet();
  }
 else {
    alphabet=new Alphabet<Label>();
  }
  if (trainType != null && train != null) {
    if (model != null) {
      log.error("String_Node_Str");
      throw new ParseException("String_Node_Str" + "String_Node_Str");
    }
    DepTreebank trainTreebank=getData(alphabet,trainType,train,DepTreebankReader.maxSentenceLength,"String_Node_Str");
    DmvTrainCorpus trainCorpus=new DmvTrainCorpus(trainTreebank,propSupervised);
    log.info("String_Node_Str" + trainCorpus.getNumUnlabeled());
    log.info("String_Node_Str" + trainCorpus.getNumLabeled());
    if (printSentences != null) {
      printSentences(trainCorpus.getSentences(),printSentences);
    }
    if (relaxOnly) {
      runRelaxOnly(goldModel,trainTreebank,trainCorpus);
      return;
    }
    log.info("String_Node_Str");
    Trainer trainer=TrainerFactory.getTrainer(trainTreebank,goldModel);
    if (trainer instanceof BnBDmvTrainer) {
      BnBDmvTrainer bnb=(BnBDmvTrainer)trainer;
      bnb.init(trainCorpus);
      updateBounds(trainCorpus,bnb.getRootRelaxation(),trainTreebank,goldModel);
      bnb.train();
    }
 else {
      trainer.train(trainCorpus);
    }
    model=(DmvModel)trainer.getModel();
    evalAndWrite(model,trainTreebank,"String_Node_Str",trainOut,trainType);
  }
  if (modelOut != null) {
    log.info("String_Node_Str" + modelOut);
    Files.serialize(model,modelOut);
  }
  if (printModel != null) {
    log.info("String_Node_Str" + printModel);
    Writer writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(printModel),"String_Node_Str"));
    writer.write("String_Node_Str");
    writer.write(model.toString());
    writer.close();
  }
  if (test != null && testType != null) {
    alphabet.stopGrowth();
    log.info("String_Node_Str" + test);
    DepTreebank testTreebank=getData(alphabet,testType,test,maxSentenceLengthTest,"String_Node_Str");
    evalAndWrite(model,testTreebank,"String_Node_Str",testOut,testType);
  }
}