Program: 61418
Project: 61418
Buggy source:
@Deprecated private List<Expression> combinePrimitives(List<Expression> toCombine,int previousSize,Object value){
  logger.debug("String_Node_Str" + toCombine.size() + "String_Node_Str");
  List<Expression> result=new ArrayList<>();
  if (nopolContext.isSortExpressions()) {
    Collections.sort(toCombine,Collections.reverseOrder());
  }
  executionTime=System.currentTimeMillis() - startTime;
  for (int i=0; i < toCombine.size() && executionTime <= maxTime; i++) {
    Expression expression=toCombine.get(i);
    if (expression.getValue().getType() == null || (!Number.class.isAssignableFrom(expression.getValue().getType()) && !Boolean.class.isAssignableFrom(expression.getValue().getType()))) {
      continue;
    }
    if (expression.getValue().getType() == null) {
      continue;
    }
    if (!expression.getValue().isPrimitive()) {
      continue;
    }
    for (int j=0; j < UnaryOperator.values().length; j++) {
      UnaryOperator operator=UnaryOperator.values()[j];
      if (value != null && operator.getReturnType() != value.getClass()) {
        continue;
      }
      if (!operator.getReturnType().isAssignableFrom(expression.getValue().getType())) {
        continue;
      }
      UnaryExpression unaryExpression=CombinationFactory.create(operator,expression,nopolContext);
      if (addExpressionIn(unaryExpression,result,value != null)) {
        if (callListener(unaryExpression) && nopolContext.isOnlyOneSynthesisResult()) {
          return result;
        }
      }
    }
    executionTime=System.currentTimeMillis() - startTime;
    for (int j=Math.max(i,previousSize); j < toCombine.size() && executionTime <= maxTime; j++) {
      if (i == j) {
        continue;
      }
      Expression expression1=toCombine.get(j);
      if (expression1.getValue().getType() == null || (!Number.class.isAssignableFrom(expression1.getValue().getType()) && !Boolean.class.isAssignableFrom(expression1.getValue().getType()))) {
        continue;
      }
      if (expression.getValue().isConstant() && expression1.getValue().isConstant()) {
        continue;
      }
      if (!expression1.getValue().isPrimitive()) {
        continue;
      }
      executionTime=System.currentTimeMillis() - startTime;
      for (int k=0; k < BinaryOperator.values().length && executionTime <= maxTime; k++) {
        BinaryOperator operator=BinaryOperator.values()[k];
        if (value != null && operator.getReturnType() != value.getClass()) {
          continue;
        }
        if (!operator.getParam1().isAssignableFrom(expression.getValue().getType()) || !operator.getParam2().isAssignableFrom(expression1.getValue().getType())) {
          continue;
        }
        List returnValue=combineExpressionOperator(expression,expression1,operator,value,result);
        if (returnValue != null) {
          return returnValue;
        }
        executionTime=System.currentTimeMillis() - startTime;
      }
      executionTime=System.currentTimeMillis() - startTime;
    }
    executionTime=System.currentTimeMillis() - startTime;
  }
  return result;
}

Fixed version (ground truth):
@Deprecated private List<Expression> combinePrimitives(List<Expression> toCombine,int previousSize,Object value){
  logger.debug("String_Node_Str" + toCombine.size() + "String_Node_Str");
  List<Expression> result=new ArrayList<>();
  if (nopolContext.isSortExpressions()) {
    Collections.sort(toCombine,Collections.reverseOrder());
  }
  executionTime=System.currentTimeMillis() - startTime;
  for (int i=0; i < toCombine.size() && executionTime <= maxTime; i++) {
    Expression expression=toCombine.get(i);
    if (expression.getValue().getType() == null || (!Number.class.isAssignableFrom(expression.getValue().getType()) && !Boolean.class.isAssignableFrom(expression.getValue().getType()))) {
      continue;
    }
    if (expression.getValue().getType() == null) {
      continue;
    }
    if (!expression.getValue().isPrimitive()) {
      continue;
    }
    for (int j=0; j < UnaryOperator.values().length; j++) {
      UnaryOperator operator=UnaryOperator.values()[j];
      if (value != null && operator.getReturnType() != value.getClass()) {
        continue;
      }
      if (!operator.getReturnType().isAssignableFrom(expression.getValue().getType())) {
        continue;
      }
      UnaryExpression unaryExpression=create(operator,expression,nopolContext);
      if (addExpressionIn(unaryExpression,result,value != null)) {
        if (callListener(unaryExpression) && nopolContext.isOnlyOneSynthesisResult()) {
          return result;
        }
      }
    }
    executionTime=System.currentTimeMillis() - startTime;
    for (int j=Math.max(i,previousSize); j < toCombine.size() && executionTime <= maxTime; j++) {
      if (i == j) {
        continue;
      }
      Expression expression1=toCombine.get(j);
      if (expression1.getValue().getType() == null || (!Number.class.isAssignableFrom(expression1.getValue().getType()) && !Boolean.class.isAssignableFrom(expression1.getValue().getType()))) {
        continue;
      }
      if (expression.getValue().isConstant() && expression1.getValue().isConstant()) {
        continue;
      }
      if (!expression1.getValue().isPrimitive()) {
        continue;
      }
      executionTime=System.currentTimeMillis() - startTime;
      for (int k=0; k < BinaryOperator.values().length && executionTime <= maxTime; k++) {
        BinaryOperator operator=BinaryOperator.values()[k];
        if (value != null && operator.getReturnType() != value.getClass()) {
          continue;
        }
        if (!operator.getParam1().isAssignableFrom(expression.getValue().getType()) || !operator.getParam2().isAssignableFrom(expression1.getValue().getType())) {
          continue;
        }
        List returnValue=combineExpressionOperator(expression,expression1,operator,value,result);
        if (returnValue != null) {
          return returnValue;
        }
        executionTime=System.currentTimeMillis() - startTime;
      }
      executionTime=System.currentTimeMillis() - startTime;
    }
    executionTime=System.currentTimeMillis() - startTime;
  }
  return result;
}