Program: 131675
Project: 131675
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(),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);
}

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();
  ArrayList<Status> cutIterStatuses=new ArrayList<Status>();
  WarmStart warmStart=null;
  cutIterLowerBounds.add(INTERNAL_BEST_SCORE);
  cplex.setParam(DoubleParam.ObjULim,upperBound);
  Stopwatch timer=new Stopwatch();
  int cut;
  for (cut=0; ; ) {
    timer.start();
    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());
    log.trace("String_Node_Str" + cplex.getStatus());
    log.trace("String_Node_Str" + cplex.getCplexStatus());
    double lowerBound;
    if (status == RelaxStatus.Unknown) {
      lowerBound=INTERNAL_BEST_SCORE;
    }
 else     if (status == RelaxStatus.Infeasible) {
      lowerBound=INTERNAL_WORST_SCORE;
    }
 else {
      if (prm.tempDir != null) {
        cplex.writeSolution(new File(prm.tempDir,"String_Node_Str").getAbsolutePath());
      }
      warmStart=getWarmStart();
      lowerBound=cplex.getObjValue();
      log.trace("String_Node_Str" + lowerBound);
      double prevLowerBound=cutIterLowerBounds.size() > 0 ? cutIterLowerBounds.get(cutIterLowerBounds.size() - 1) : INTERNAL_WORST_SCORE;
      if (!Utilities.lte(prevLowerBound,lowerBound,prm.OBJ_VAL_DECREASE_TOLERANCE)) {
        Status prevStatus=cutIterStatuses.size() > 0 ? cutIterStatuses.get(cutIterLowerBounds.size() - 1) : Status.Unknown;
        log.warn(String.format("String_Node_Str",prevLowerBound,lowerBound,prevStatus,cplex.getStatus()));
      }
      if (cplex.getCplexStatus() == CplexStatus.AbortObjLim && lowerBound < upperBound) {
        log.warn(String.format("String_Node_Str",lowerBound,upperBound));
      }
    }
    if (lowerBound >= upperBound) {
      status=RelaxStatus.Pruned;
    }
    cutIterLowerBounds.add(lowerBound);
    cutIterStatuses.add(cplex.getStatus());
    log.debug(String.format("String_Node_Str",cut,cutIterLowerBounds));
    timer.stop();
    if (status == RelaxStatus.Unknown || status == RelaxStatus.Infeasible || status == RelaxStatus.Pruned || Time.totSec(timer) > prm.timeoutSeconds) {
      break;
    }
 else     if (cut < prm.maxCutRounds) {
      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,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);
}