Program: 131737
Project: 131737
Buggy source:
public RelaxedDmvSolution solveRelaxation(double incumbentScore){
  try {
    double upperBound=-incumbentScore;
    Pair<Status,Double> pair=runDWAlgo(cplex,mp,upperBound);
    Status status=pair.get1();
    double lowerBound=pair.get2();
    double objective=-lowerBound;
    assert(!Double.isNaN(objective));
    if (tempDir != null) {
      cplex.exportModel(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + status);
    if (!(status == Status.Optimal || status == Status.Feasible)) {
      return new RelaxedDmvSolution(null,null,null,objective,status);
    }
    if (tempDir != null) {
      cplex.writeSolution(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + lowerBound);
    log.info(String.format("String_Node_Str",mp.lambdaVars.size(),mp.numStoCons));
    optimalLogProbs=new double[idm.getNumConds()][];
    for (int c=0; c < idm.getNumConds(); c++) {
      optimalLogProbs[c]=cplex.getValues(mp.modelParamVars[c]);
    }
    double[][] fracRoots=new double[sentences.size()][];
    double[][][] fracParses=new double[sentences.size()][][];
    for (int s=0; s < sentences.size(); s++) {
      Sentence sentence=sentences.get(s);
      fracRoots[s]=new double[sentence.size()];
      fracParses[s]=new double[sentence.size()][sentence.size()];
    }
    for (    LambdaVar triple : mp.lambdaVars) {
      double frac=cplex.getValue(triple.lambdaVar);
      int s=triple.s;
      int[] parents=triple.parents;
      double[] fracRoot=fracRoots[s];
      double[][] fracParse=fracParses[s];
      for (int child=0; child < parents.length; child++) {
        int parent=parents[child];
        if (parent == WallDepTreeNode.WALL_POSITION) {
          fracRoot[child]+=frac;
        }
 else {
          fracParse[parent][child]+=frac;
        }
      }
    }
    return new RelaxedDmvSolution(Utilities.copyOf(optimalLogProbs),fracRoots,fracParses,objective,status);
  }
 catch (  IloException e) {
    if (e instanceof ilog.cplex.CpxException) {
      ilog.cplex.CpxException cpxe=(ilog.cplex.CpxException)e;
      System.err.println("String_Node_Str" + cpxe.getStatus());
      System.err.println("String_Node_Str" + cpxe.getMessage());
    }
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public RelaxedDmvSolution solveRelaxation(double incumbentScore){
  try {
    double upperBound=-incumbentScore;
    Pair<SimpleStatus,Double> pair=runDWAlgo(cplex,mp,upperBound);
    SimpleStatus status=pair.get1();
    double lowerBound=pair.get2();
    double objective=-lowerBound;
    assert(!Double.isNaN(objective));
    if (tempDir != null) {
      cplex.exportModel(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + status);
    if (!status.hasSolution()) {
      return new RelaxedDmvSolution(null,null,null,objective,status);
    }
    if (tempDir != null) {
      cplex.writeSolution(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + lowerBound);
    log.info(String.format("String_Node_Str",mp.lambdaVars.size(),mp.numStoCons));
    optimalLogProbs=new double[idm.getNumConds()][];
    for (int c=0; c < idm.getNumConds(); c++) {
      optimalLogProbs[c]=cplex.getValues(mp.modelParamVars[c]);
    }
    double[][] fracRoots=new double[sentences.size()][];
    double[][][] fracParses=new double[sentences.size()][][];
    for (int s=0; s < sentences.size(); s++) {
      Sentence sentence=sentences.get(s);
      fracRoots[s]=new double[sentence.size()];
      fracParses[s]=new double[sentence.size()][sentence.size()];
    }
    for (    LambdaVar triple : mp.lambdaVars) {
      double frac=cplex.getValue(triple.lambdaVar);
      int s=triple.s;
      int[] parents=triple.parents;
      double[] fracRoot=fracRoots[s];
      double[][] fracParse=fracParses[s];
      for (int child=0; child < parents.length; child++) {
        int parent=parents[child];
        if (parent == WallDepTreeNode.WALL_POSITION) {
          fracRoot[child]+=frac;
        }
 else {
          fracParse[parent][child]+=frac;
        }
      }
    }
    return new RelaxedDmvSolution(Utilities.copyOf(optimalLogProbs),fracRoots,fracParses,objective,status);
  }
 catch (  IloException e) {
    if (e instanceof ilog.cplex.CpxException) {
      ilog.cplex.CpxException cpxe=(ilog.cplex.CpxException)e;
      System.err.println("String_Node_Str" + cpxe.getStatus());
      System.err.println("String_Node_Str" + cpxe.getMessage());
    }
    throw new RuntimeException(e);
  }
}