Program: 131752
Project: 131752
Buggy source:
public RelaxedDmvSolution solveRelaxation(){
  try {
    Status status=runDWAlgo(cplex,mp);
    if (tempDir != null) {
      cplex.exportModel(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + status);
    if (status != Status.Optimal) {
      return new RelaxedDmvSolution(null,null,null,LazyBranchAndBoundSolver.WORST_SCORE,status);
    }
    if (tempDir != null) {
      cplex.writeSolution(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + cplex.getObjValue());
    log.info(String.format("String_Node_Str",mp.lambdaVars.size(),mp.numStoCons));
    double objective=-cplex.getObjValue();
    assert(!Double.isNaN(objective));
    assert(Utilities.lte(objective,0.0,1e-7));
    logProbs=new double[idm.getNumConds()][];
    for (int c=0; c < idm.getNumConds(); c++) {
      logProbs[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(logProbs,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(){
  try {
    Status status=runDWAlgo(cplex,mp);
    if (tempDir != null) {
      cplex.exportModel(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + status);
    if (status != Status.Optimal) {
      return new RelaxedDmvSolution(null,null,null,LazyBranchAndBoundSolver.WORST_SCORE,status);
    }
    if (tempDir != null) {
      cplex.writeSolution(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + cplex.getObjValue());
    log.info(String.format("String_Node_Str",mp.lambdaVars.size(),mp.numStoCons));
    double objective=-cplex.getObjValue();
    assert(!Double.isNaN(objective));
    assert(Utilities.lte(objective,0.0,1e-7));
    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);
  }
}