Program: 131765
Project: 131765
Buggy source:
public RelaxedDmvSolution solveRelaxation(){
  try {
    runDWAlgo(cplex,mp);
    if (tempDir != null) {
      cplex.exportModel(new File(tempDir,"String_Node_Str").getAbsolutePath());
      cplex.writeSolution(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + cplex.getStatus());
    if (cplex.getStatus() != Status.Optimal) {
      return new RelaxedDmvSolution(null,null,null,LazyBranchAndBoundSolver.WORST_SCORE,cplex.getStatus());
    }
    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));
    double[][] 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,cplex.getStatus());
  }
 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 {
    runDWAlgo(cplex,mp);
    if (tempDir != null) {
      cplex.exportModel(new File(tempDir,"String_Node_Str").getAbsolutePath());
      cplex.writeSolution(new File(tempDir,"String_Node_Str").getAbsolutePath());
    }
    log.info("String_Node_Str" + cplex.getStatus());
    if (cplex.getStatus() != Status.Optimal) {
      return new RelaxedDmvSolution(null,null,null,LazyBranchAndBoundSolver.WORST_SCORE,cplex.getStatus());
    }
    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));
    double[][] 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,cplex.getStatus());
  }
 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);
  }
}