Program: 144014
Project: 144014
Buggy source:
@Override public boolean checkTerminationConditions(){
  if (currentIteration >= maximumNumberOfIterations) {
    return true;
  }
  if (super.checkTerminationConditions()) {
    if (currentIteration >= maximumNumberOfIterations || objective.getNumberOfFunctionEvaluations() >= maximumNumberOfFunctionEvaluations) {
      pointChange=currentPoint.sub(previousPoint).norm(VectorNorm.L2_FAST);
      pointConverged=pointChange <= pointChangeTolerance;
    }
    if (checkForPointConvergence && pointConverged) {
      if ((checkForObjectiveConvergence && objectiveConverged) || (checkForGradientConvergence && gradientConverged)) {
        return true;
      }
 else {
        numberOfIterationsWithNoPointChange++;
        if (numberOfIterationsWithNoPointChange < maximumNumberOfIterationsWithNoPointChange)         pointConverged=false;
 else         return true;
      }
    }
 else     if ((checkForObjectiveConvergence && objectiveConverged) || (checkForGradientConvergence && gradientConverged)) {
      return true;
    }
 else {
      numberOfIterationsWithNoPointChange=0;
    }
  }
  if (currentIteration > 0 && checkForPrimalAndDualResidualConvergence) {
    primalTolerance=absoluteTolerance + relativeTolerance * Math.max(Math.sqrt(primalToleranceAdder.doubleValue()),Math.sqrt(currentPoint.map(x -> x * x).multElementwise(variableCopiesCounts).sum()));
    dualTolerance=absoluteTolerance + relativeTolerance * Math.sqrt(dualToleranceAdder.doubleValue());
    primalResidualConverged=primalResidual <= primalTolerance;
    dualResidualConverged=dualResidual <= dualTolerance;
    return primalResidualConverged && dualResidualConverged;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean checkTerminationConditions(){
  if (currentIteration >= maximumNumberOfIterations) {
    return true;
  }
  if (super.checkTerminationConditions()) {
    if (currentIteration >= maximumNumberOfIterations || objective.getNumberOfFunctionEvaluations() >= maximumNumberOfFunctionEvaluations)     return true;
    if (checkForPointConvergence && pointConverged) {
      if ((checkForObjectiveConvergence && objectiveConverged) || (checkForGradientConvergence && gradientConverged)) {
        return true;
      }
 else {
        numberOfIterationsWithNoPointChange++;
        if (numberOfIterationsWithNoPointChange < maximumNumberOfIterationsWithNoPointChange)         pointConverged=false;
 else         return true;
      }
    }
 else     if ((checkForObjectiveConvergence && objectiveConverged) || (checkForGradientConvergence && gradientConverged)) {
      return true;
    }
 else {
      numberOfIterationsWithNoPointChange=0;
    }
  }
  if (currentIteration > 0 && checkForPrimalAndDualResidualConvergence) {
    primalTolerance=absoluteTolerance + relativeTolerance * Math.max(Math.sqrt(primalToleranceAdder.doubleValue()),Math.sqrt(currentPoint.map(x -> x * x).multElementwise(variableCopiesCounts).sum()));
    dualTolerance=absoluteTolerance + relativeTolerance * Math.sqrt(dualToleranceAdder.doubleValue());
    primalResidualConverged=primalResidual <= primalTolerance;
    dualResidualConverged=dualResidual <= dualTolerance;
    return primalResidualConverged && dualResidualConverged;
  }
 else {
    return false;
  }
}