Program: 131688
Project: 131688
Buggy source:
private Pair<RelaxStatus,Double> runSimplexAlgo(IloCplex cplex2,double upperBound) throws IloException {
  if (!isFeasible()) {
    return new Pair<RelaxStatus,Double>(RelaxStatus.Infeasible,INTERNAL_WORST_SCORE);
  }
  RelaxStatus status=RelaxStatus.Unknown;
  TDoubleArrayList cutIterLowerBounds=new TDoubleArrayList();
  TDoubleArrayList cutIterObjVals=new TDoubleArrayList();
  ArrayList<Status> cutIterStatuses=new ArrayList<Status>();
  WarmStart warmStart=null;
  cutIterLowerBounds.add(INTERNAL_BEST_SCORE);
  cplex.setParam(DoubleParam.ObjULim,upperBound);
  int cut;
  for (cut=0; ; ) {
    if (prm.tempDir != null) {
      cplex.exportModel(new File(prm.tempDir,"String_Node_Str").getAbsolutePath());
    }
    if (warmStart != null) {
      setWarmStart(warmStart);
    }
    simplexTimer.start();
    cplex.solve();
    simplexTimer.stop();
    status=RelaxStatus.getForLp(cplex.getStatus());
    double objVal;
    double lowerBound;
    if (status != RelaxStatus.Unknown) {
      log.trace("String_Node_Str" + cplex.getStatus());
      log.trace("String_Node_Str" + cplex.getCplexStatus());
      if (status == RelaxStatus.Infeasible) {
        return new Pair<RelaxStatus,Double>(status,INTERNAL_WORST_SCORE);
      }
      if (prm.tempDir != null) {
        cplex.writeSolution(new File(prm.tempDir,"String_Node_Str").getAbsolutePath());
      }
      warmStart=getWarmStart();
      objVal=cplex.getObjValue();
      log.trace("String_Node_Str" + objVal);
      double prevObjVal=cutIterObjVals.size() > 0 ? cutIterObjVals.get(cutIterObjVals.size() - 1) : INTERNAL_WORST_SCORE;
      if (objVal > prevObjVal + OBJ_VAL_DECREASE_TOLERANCE) {
        Status prevStatus=cutIterStatuses.size() > 0 ? cutIterStatuses.get(cutIterObjVals.size() - 1) : Status.Unknown;
        log.warn(String.format("String_Node_Str",prevObjVal,objVal,prevStatus,cplex.getStatus()));
      }
      lowerBound=objVal;
      if (cplex.getCplexStatus() == CplexStatus.AbortObjLim && lowerBound < upperBound) {
        log.warn(String.format("String_Node_Str",lowerBound,upperBound));
      }
    }
 else {
      objVal=INTERNAL_BEST_SCORE;
      lowerBound=INTERNAL_BEST_SCORE;
    }
    cutIterObjVals.add(objVal);
    cutIterStatuses.add(cplex.getStatus());
    cutIterLowerBounds.add(lowerBound);
    if (lowerBound >= upperBound) {
      status=RelaxStatus.Pruned;
      break;
    }
 else {
      status=RelaxStatus.Optimal;
      if (cut < prm.maxCutRounds) {
        log.debug(String.format("String_Node_Str",cut,cutIterObjVals));
        int numCutAdded=addCuts(cplex,cut);
        log.debug("String_Node_Str" + numCutAdded + "String_Node_Str"+ cut);
        if (numCutAdded == 0) {
          log.debug("String_Node_Str" + cut + "String_Node_Str");
          break;
        }
        cut++;
      }
 else {
        break;
      }
    }
  }
  double lowerBound=Vectors.max(cutIterLowerBounds.toNativeArray());
  log.debug("String_Node_Str" + cut);
  log.debug("String_Node_Str" + lowerBound);
  log.debug(String.format("String_Node_Str",cut,cutIterObjVals));
  log.debug("String_Node_Str" + cutIterLowerBounds);
  log.debug("String_Node_Str" + Time.totMs(simplexTimer) / numSolves);
  log.info(String.format("String_Node_Str",sto.getNumStoCons(),mp.origMatrix.getNrows(),mp.rlt.getRltMatrix().getNrows()));
  return new Pair<RelaxStatus,Double>(status,lowerBound);
}

Fixed version (ground truth):
private Pair<RelaxStatus,Double> runSimplexAlgo(IloCplex cplex2,double upperBound) throws IloException {
  if (!isFeasible()) {
    return new Pair<RelaxStatus,Double>(RelaxStatus.Infeasible,INTERNAL_WORST_SCORE);
  }
  RelaxStatus status=RelaxStatus.Unknown;
  TDoubleArrayList cutIterLowerBounds=new TDoubleArrayList();
  TDoubleArrayList cutIterObjVals=new TDoubleArrayList();
  ArrayList<Status> cutIterStatuses=new ArrayList<Status>();
  WarmStart warmStart=null;
  cutIterLowerBounds.add(INTERNAL_BEST_SCORE);
  cplex.setParam(DoubleParam.ObjULim,upperBound);
  int cut;
  for (cut=0; ; ) {
    if (prm.tempDir != null) {
      cplex.exportModel(new File(prm.tempDir,"String_Node_Str").getAbsolutePath());
    }
    if (warmStart != null) {
      setWarmStart(warmStart);
    }
    simplexTimer.start();
    cplex.solve();
    simplexTimer.stop();
    status=RelaxStatus.getForLp(cplex.getStatus(),cplex.getCplexStatus());
    double objVal;
    double lowerBound;
    if (status == RelaxStatus.Unknown) {
      objVal=INTERNAL_BEST_SCORE;
      lowerBound=INTERNAL_BEST_SCORE;
    }
 else {
      log.trace("String_Node_Str" + cplex.getStatus());
      log.trace("String_Node_Str" + cplex.getCplexStatus());
      if (status == RelaxStatus.Infeasible) {
        return new Pair<RelaxStatus,Double>(status,INTERNAL_WORST_SCORE);
      }
      if (prm.tempDir != null) {
        cplex.writeSolution(new File(prm.tempDir,"String_Node_Str").getAbsolutePath());
      }
      warmStart=getWarmStart();
      objVal=cplex.getObjValue();
      log.trace("String_Node_Str" + objVal);
      double prevObjVal=cutIterObjVals.size() > 0 ? cutIterObjVals.get(cutIterObjVals.size() - 1) : INTERNAL_WORST_SCORE;
      if (objVal > prevObjVal + OBJ_VAL_DECREASE_TOLERANCE) {
        Status prevStatus=cutIterStatuses.size() > 0 ? cutIterStatuses.get(cutIterObjVals.size() - 1) : Status.Unknown;
        log.warn(String.format("String_Node_Str",prevObjVal,objVal,prevStatus,cplex.getStatus()));
      }
      lowerBound=objVal;
      if (cplex.getCplexStatus() == CplexStatus.AbortObjLim && lowerBound < upperBound) {
        log.warn(String.format("String_Node_Str",lowerBound,upperBound));
      }
    }
    cutIterObjVals.add(objVal);
    cutIterStatuses.add(cplex.getStatus());
    cutIterLowerBounds.add(lowerBound);
    if (lowerBound >= upperBound) {
      status=RelaxStatus.Pruned;
      break;
    }
 else {
      status=RelaxStatus.Optimal;
      if (cut < prm.maxCutRounds) {
        log.debug(String.format("String_Node_Str",cut,cutIterObjVals));
        int numCutAdded=addCuts(cplex,cut);
        log.debug("String_Node_Str" + numCutAdded + "String_Node_Str"+ cut);
        if (numCutAdded == 0) {
          log.debug("String_Node_Str" + cut + "String_Node_Str");
          break;
        }
        cut++;
      }
 else {
        break;
      }
    }
  }
  double lowerBound=Vectors.max(cutIterLowerBounds.toNativeArray());
  log.debug("String_Node_Str" + cut);
  log.debug("String_Node_Str" + lowerBound);
  log.debug(String.format("String_Node_Str",cut,cutIterObjVals));
  log.debug("String_Node_Str" + cutIterLowerBounds);
  log.debug("String_Node_Str" + cutIterStatuses);
  log.debug("String_Node_Str" + Time.totMs(simplexTimer) / numSolves);
  log.info(String.format("String_Node_Str",sto.getNumStoCons(),mp.origMatrix.getNrows(),mp.rlt.getRltMatrix().getNrows()));
  return new Pair<RelaxStatus,Double>(status,lowerBound);
}