Program: 131729
Project: 131729
Buggy source:
private MasterProblem buildModel(IloMPModeler cplex,DmvSolution initFeasSol) throws IloException {
  mp=new MasterProblem();
  int numConds=idm.getNumConds();
  mp.objective=cplex.addMinimize();
  mp.objVars=new IloNumVar[numConds][];
  for (int c=0; c < numConds; c++) {
    int numParams=idm.getNumParams(c);
    mp.objVars[c]=new IloNumVar[numParams];
    for (int m=0; m < numParams; m++) {
      mp.objVars[c][m]=cplex.numVar(-Double.MAX_VALUE,Double.MAX_VALUE,String.format("String_Node_Str",c,m));
      cplex.setLinearCoef(mp.objective,-1.0,mp.objVars[c][m]);
    }
  }
  mp.couplConsLower=new IloRange[numConds][];
  mp.couplConsUpper=new IloRange[numConds][];
  for (int c=0; c < numConds; c++) {
    int numParams=idm.getNumParams(c);
    mp.couplConsLower[c]=new IloRange[numParams];
    mp.couplConsUpper[c]=new IloRange[numParams];
    for (int m=0; m < numParams; m++) {
      String name;
      IloNumVar slackVarLower=cplex.numVar(-Double.MAX_VALUE,0.0,String.format("String_Node_Str",c,m));
      name=String.format("String_Node_Str",c,m);
      double maxFreqCm=idm.getTotalMaxFreqCm(c,m);
      IloNumExpr rhsLower=cplex.diff(slackVarLower,mp.objVars[c][m]);
      mp.couplConsLower[c][m]=cplex.eq(maxFreqCm * bounds.getLb(c,m),rhsLower,name);
      IloNumVar slackVarUpper=cplex.numVar(-Double.MAX_VALUE,0.0,String.format("String_Node_Str",c,m));
      name=String.format("String_Node_Str",c,m);
      IloNumExpr rhsUpper=cplex.sum(cplex.prod(-1.0,mp.objVars[c][m]),slackVarUpper);
      mp.couplConsUpper[c][m]=cplex.eq(0.0,rhsUpper,name);
    }
  }
  mp.lpMatrix=cplex.addLPMatrix("String_Node_Str");
  for (int c=0; c < numConds; c++) {
    mp.lpMatrix.addRows(mp.couplConsLower[c]);
  }
  for (int c=0; c < numConds; c++) {
    mp.lpMatrix.addRows(mp.couplConsUpper[c]);
  }
  mp.lambdaSumCons=new IloRange[sentences.size()];
  mp.lambdaVars=new ArrayList<LambdaVar>();
  mp.lambdaVarSet=new HashSet<LambdaVar>();
  for (int s=0; s < sentences.size(); s++) {
    DepTree tree=initFeasSol.getTreebank().get(s);
    addLambdaVar(s,tree);
  }
  mp.gammaVars=new ArrayList<GammaVar>();
  double[][] initLogProbs=initFeasSol.getLogProbs();
  for (int c=0; c < numConds; c++) {
    double[] params=Vectors.getExp(initLogProbs[c]);
    params=projections.getProjectedParams(bounds,c,params);
    if (params == null) {
      throw new IllegalStateException("String_Node_Str");
    }
    initLogProbs[c]=Vectors.getLog(params);
  }
  addGammaVar(initLogProbs);
  return mp;
}

Fixed version (ground truth):
private MasterProblem buildModel(IloMPModeler cplex,DmvSolution initFeasSol) throws IloException {
  mp=new MasterProblem();
  int numConds=idm.getNumConds();
  mp.objective=cplex.addMinimize();
  mp.objVars=new IloNumVar[numConds][];
  for (int c=0; c < numConds; c++) {
    int numParams=idm.getNumParams(c);
    mp.objVars[c]=new IloNumVar[numParams];
    for (int m=0; m < numParams; m++) {
      mp.objVars[c][m]=cplex.numVar(-Double.MAX_VALUE,Double.MAX_VALUE,String.format("String_Node_Str",c,m));
      cplex.setLinearCoef(mp.objective,-1.0,mp.objVars[c][m]);
    }
  }
  mp.couplConsLower=new IloRange[numConds][];
  mp.couplConsUpper=new IloRange[numConds][];
  for (int c=0; c < numConds; c++) {
    int numParams=idm.getNumParams(c);
    mp.couplConsLower[c]=new IloRange[numParams];
    mp.couplConsUpper[c]=new IloRange[numParams];
    for (int m=0; m < numParams; m++) {
      String name;
      IloNumVar slackVarLower=cplex.numVar(-Double.MAX_VALUE,0.0,String.format("String_Node_Str",c,m));
      name=String.format("String_Node_Str",c,m);
      double maxFreqCm=idm.getTotalMaxFreqCm(c,m);
      IloNumExpr rhsLower=cplex.diff(slackVarLower,mp.objVars[c][m]);
      mp.couplConsLower[c][m]=cplex.eq(maxFreqCm * bounds.getLb(c,m),rhsLower,name);
      IloNumVar slackVarUpper=cplex.numVar(-Double.MAX_VALUE,0.0,String.format("String_Node_Str",c,m));
      name=String.format("String_Node_Str",c,m);
      IloNumExpr rhsUpper=cplex.sum(cplex.prod(-1.0,mp.objVars[c][m]),slackVarUpper);
      mp.couplConsUpper[c][m]=cplex.eq(0.0,rhsUpper,name);
    }
  }
  mp.lpMatrix=cplex.addLPMatrix("String_Node_Str");
  for (int c=0; c < numConds; c++) {
    mp.lpMatrix.addRows(mp.couplConsLower[c]);
  }
  for (int c=0; c < numConds; c++) {
    mp.lpMatrix.addRows(mp.couplConsUpper[c]);
  }
  mp.lambdaSumCons=new IloRange[sentences.size()];
  mp.lambdaVars=new ArrayList<LambdaVar>();
  mp.lambdaVarSet=new HashSet<LambdaVar>();
  addFeasibleSolution(initFeasSol);
  return mp;
}