Program: 144042
Project: 144042
Buggy source:
@Override public void performIterationUpdates(){
  previousPoint=currentPoint;
  Vector variableCopiesSum=Vectors.build(currentPoint.size(),currentPoint.type());
  List<Callable<Object>> subProblemTasks=new ArrayList<>();
  for (int subProblemIndex=0; subProblemIndex < objective.getNumberOfTerms(); subProblemIndex++) {
    int[] variableIndexes=objective.getTermVariables(subProblemIndex);
    final int currentSubProblemIndex=subProblemIndex;
    subProblemTasks.add(Executors.callable(() -> processSubProblem(currentSubProblemIndex,variableIndexes,variableCopiesSum)));
  }
  final int numberOfObjectiveTerms=objective.getNumberOfTerms();
  for (int constraintIndex=0; constraintIndex < constraints.size(); constraintIndex++) {
    int[] variableIndexes=constraintsVariablesIndexes.get(constraintIndex);
    final int currentConstraintIndex=constraintIndex;
    subProblemTasks.add(Executors.callable(() -> processConstraint(currentConstraintIndex,variableIndexes,variableCopiesSum,numberOfObjectiveTerms)));
  }
  try {
    taskExecutor.invokeAll(subProblemTasks);
  }
 catch (  InterruptedException e) {
    logger.error("String_Node_Str");
  }
  currentPoint=variableCopiesSum.divElementwise(variableCopiesCounts);
  for (int variableIndex=0; variableIndex < currentPoint.size(); variableIndex++)   if (currentPoint.get(variableIndex) < 0)   currentPoint.set(variableIndex,0);
 else   if (currentPoint.get(variableIndex) > 1)   currentPoint.set(variableIndex,1);
  if (penaltyParameterSettingMethod == PenaltyParameterSettingMethod.ADAPTIVE) {
    primalResidualSquared=0;
    for (int subProblemIndex=0; subProblemIndex < objective.getNumberOfTerms(); subProblemIndex++) {
      primalResidualSquared+=variableCopies.get(subProblemIndex).sub(currentPoint.get(objective.getTermVariables(subProblemIndex))).norm(VectorNorm.L2_SQUARED);
    }
    for (int constraintIndex=0; constraintIndex < constraints.size(); constraintIndex++) {
      primalResidualSquared+=variableCopies.get(objective.getNumberOfTerms() + constraintIndex).sub(currentPoint.get(constraintsVariablesIndexes.get(constraintIndex))).norm(VectorNorm.L2_SQUARED);
    }
    dualResidualSquared=objective.getNumberOfTerms() * penaltyParameter * penaltyParameter* currentPoint.sub(previousPoint).norm(VectorNorm.L2_SQUARED);
    penaltyParameterSettingMethod.updatePenaltyParameter(this);
  }
  if (checkForObjectiveConvergence || logObjectiveValue) {
    previousObjectiveValue=currentObjectiveValue;
    currentObjectiveValue=objective.getValue(currentPoint);
  }
  if (checkForGradientConvergence || logGradientNorm) {
    previousGradient=currentGradient;
    try {
      currentGradient=objective.getGradient(currentPoint);
    }
 catch (    NonSmoothFunctionException e) {
      throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void performIterationUpdates(){
  previousPoint=currentPoint;
  Vector variableCopiesSum=Vectors.build(currentPoint.size(),currentPoint.type());
  List<Callable<Object>> subProblemTasks=new ArrayList<>();
  for (int subProblemIndex=0; subProblemIndex < objective.getNumberOfTerms(); subProblemIndex++) {
    int[] variableIndexes=objective.getTermVariables(subProblemIndex);
    final int currentSubProblemIndex=subProblemIndex;
    subProblemTasks.add(Executors.callable(() -> processSubProblem(currentSubProblemIndex,variableIndexes,variableCopiesSum)));
  }
  final int numberOfObjectiveTerms=objective.getNumberOfTerms();
  for (int constraintIndex=0; constraintIndex < constraints.size(); constraintIndex++) {
    int[] variableIndexes=constraintsVariablesIndexes.get(constraintIndex);
    final int currentConstraintIndex=constraintIndex;
    subProblemTasks.add(Executors.callable(() -> processConstraint(currentConstraintIndex,variableIndexes,variableCopiesSum,numberOfObjectiveTerms)));
  }
  try {
    taskExecutor.invokeAll(subProblemTasks);
  }
 catch (  InterruptedException e) {
    logger.error("String_Node_Str");
  }
  currentPoint=variableCopiesSum.divElementwise(variableCopiesCounts);
  for (int variableIndex=0; variableIndex < currentPoint.size(); variableIndex++)   if (currentPoint.get(variableIndex) < 0)   currentPoint.set(variableIndex,0);
 else   if (currentPoint.get(variableIndex) > 1)   currentPoint.set(variableIndex,1);
  if (penaltyParameterSettingMethod == PenaltyParameterSettingMethod.ADAPTIVE || checkForPrimalAndDualResidualConvergence) {
    primalResidual=Math.sqrt(primalResidualSquaredTerms.sum());
    dualResidual=penaltyParameter * Math.sqrt(currentPoint.sub(previousPoint).map(x -> x * x).multElementwise(variableCopiesCounts).sum());
    if (penaltyParameterSettingMethod == PenaltyParameterSettingMethod.ADAPTIVE)     penaltyParameterSettingMethod.updatePenaltyParameter(this);
  }
  if (checkForObjectiveConvergence || logObjectiveValue) {
    previousObjectiveValue=currentObjectiveValue;
    currentObjectiveValue=objective.getValue(currentPoint);
  }
  if (checkForGradientConvergence || logGradientNorm) {
    previousGradient=currentGradient;
    try {
      currentGradient=objective.getGradient(currentPoint);
    }
 catch (    NonSmoothFunctionException e) {
      throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
    }
  }
}