Program: 131652
Project: 131652
Buggy source:
private Pair<RelaxStatus,Double> runSimplexAlgo(IloCplex cplex2,double upperBound,int depth) throws IloException {
  if (!isFeasible()) {
    return new Pair<RelaxStatus,Double>(RelaxStatus.Infeasible,INTERNAL_WORST_SCORE);
  }
  int maxCutRounds=(depth == 0) ? prm.rootMaxCutRounds : prm.maxCutRounds;
  RelaxStatus status=RelaxStatus.Unknown;
  TDoubleArrayList cutIterLowerBounds=new TDoubleArrayList();
  ArrayList<Status> cutIterStatuses=new ArrayList<Status>();
  WarmStart warmStart=null;
  cutIterLowerBounds.add(INTERNAL_BEST_SCORE);
  int totalSimplexIterations=0;
  cplex.setParam(DoubleParam.ObjULim,upperBound);
  Timer timer=new Timer();
  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);
    log.trace("String_Node_Str" + cplex.getStatus());
    log.trace("String_Node_Str" + cplex.getCplexStatus());
    log.debug("String_Node_Str" + cplex.isDualFeasible());
    log.debug("String_Node_Str" + cplex.isPrimalFeasible());
    double lowerBound;
    if (status == RelaxStatus.Unknown) {
      log.debug("String_Node_Str" + cplex.getObjValue());
      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());
    totalSimplexIterations+=cplex.getNiterations();
    log.debug(String.format("String_Node_Str",cut,cutIterLowerBounds));
    timer.stop();
    if (status == RelaxStatus.Unknown || status == RelaxStatus.Infeasible || status == RelaxStatus.Pruned || timer.totSec() > prm.timeoutSeconds) {
      break;
    }
 else     if (cut < 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" + simplexTimer.totMs() / numSolves);
  log.debug("String_Node_Str" + totalSimplexIterations);
  int origCons=mp.origMatrix.getNrows() - sto.getNumStoCons();
  log.info(String.format("String_Node_Str",sto.getNumStoCons(),origCons,mp.rlt.getRltMatrix().getNrows()));
  return new Pair<RelaxStatus,Double>(status,lowerBound);
}

Fixed version (ground truth):
private Triple<RelaxStatus,Double,WarmStart> runSimplexAlgo(IloCplex cplex2,double upperBound,int depth) throws IloException {
  if (!isFeasible()) {
    return new Triple<RelaxStatus,Double,WarmStart>(RelaxStatus.Infeasible,INTERNAL_WORST_SCORE,null);
  }
  int maxCutRounds=(depth == 0) ? prm.rootMaxCutRounds : prm.maxCutRounds;
  RelaxStatus status=RelaxStatus.Unknown;
  TDoubleArrayList cutIterLowerBounds=new TDoubleArrayList();
  ArrayList<Status> cutIterStatuses=new ArrayList<Status>();
  WarmStart warmStart=null;
  cutIterLowerBounds.add(INTERNAL_BEST_SCORE);
  int totalSimplexIterations=0;
  cplex.setParam(DoubleParam.ObjULim,upperBound);
  Timer timer=new Timer();
  int cut;
  for (cut=0; ; ) {
    timer.start();
    if (prm.tempDir != null) {
      cplex.exportModel(new File(prm.tempDir,"String_Node_Str").getAbsolutePath());
    }
    simplexTimer.start();
    cplex.solve();
    simplexTimer.stop();
    status=RelaxStatus.getForLp(cplex);
    log.debug("String_Node_Str" + cplex.getStatus());
    log.debug("String_Node_Str" + cplex.getCplexStatus());
    log.debug("String_Node_Str" + cplex.isDualFeasible());
    log.debug("String_Node_Str" + cplex.isPrimalFeasible());
    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());
    totalSimplexIterations+=cplex.getNiterations();
    log.debug(String.format("String_Node_Str",cut,cutIterLowerBounds));
    timer.stop();
    if (status == RelaxStatus.Unknown || status == RelaxStatus.Infeasible || status == RelaxStatus.Pruned || timer.totSec() > prm.timeoutSeconds) {
      break;
    }
 else     if (cut < 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" + switchTimer.totMs() / numSolves);
  log.debug("String_Node_Str" + simplexTimer.totMs() / numSolves);
  log.debug("String_Node_Str" + totalSimplexIterations);
  int origCons=mp.origMatrix.getNrows() - sto.getNumStoCons();
  log.info(String.format("String_Node_Str",sto.getNumStoCons(),origCons,mp.rlt.getRltMatrix().getNrows()));
  return new Triple<RelaxStatus,Double,WarmStart>(status,lowerBound,warmStart);
}