Program: 91196
Project: 91196
Buggy source:
public boolean filter(Executable method) throws Exception {
  boolean found=false;
  boolean containsLambda=false;
  SymbolType[] inferredTypes=null;
  if (previousPredicate != null) {
    inferredTypes=previousPredicate.getInferredMethodArgs();
  }
  if (args != null && !args.isEmpty()) {
    Iterator<Expression> it=args.iterator();
    int i=0;
    while (it.hasNext() && !found) {
      SymbolType argType=null;
      if (inferredTypes != null) {
        argType=inferredTypes[i];
      }
      Expression current=it.next();
      if (current instanceof LambdaExpr || current instanceof MethodReferenceExpr) {
        containsLambda=true;
        Class<?> interfaceToInspect=null;
        if (params[i].isInterface()) {
          interfaceToInspect=params[i];
        }
 else         if (isVarArgs && i == params.length - 1) {
          Class<?> componentType=params[i].getComponentType();
          if (componentType.isInterface()) {
            interfaceToInspect=componentType;
          }
        }
        if (interfaceToInspect != null) {
          if (current instanceof LambdaExpr) {
            found=filter((LambdaExpr)current,interfaceToInspect,argType,method);
            if (found) {
              calculatedTypeArgs[i]=(SymbolType)current.getSymbolData();
            }
          }
 else {
            found=filter((MethodReferenceExpr)current,interfaceToInspect,argType,method);
            if (found) {
              calculatedTypeArgs[i]=(SymbolType)current.getSymbolData();
            }
          }
        }
      }
      if (i < params.length - 1) {
        i++;
      }
    }
  }
  return (found && containsLambda) || !containsLambda;
}

Fixed version (ground truth):
public boolean filter(Executable method) throws Exception {
  boolean found=false;
  boolean containsLambda=false;
  SymbolType[] inferredTypes=null;
  if (previousPredicate != null) {
    inferredTypes=previousPredicate.getInferredMethodArgs();
  }
  if (args != null && !args.isEmpty()) {
    Iterator<Expression> it=args.iterator();
    int i=0;
    java.lang.reflect.Type[] genericTypes=method.getGenericParameterTypes();
    while (it.hasNext() && !found) {
      SymbolType argType=null;
      if (inferredTypes != null) {
        argType=inferredTypes[i];
      }
      Expression current=it.next();
      if (current instanceof LambdaExpr || current instanceof MethodReferenceExpr) {
        containsLambda=true;
        Class<?> interfaceToInspect=null;
        if (params[i].isInterface()) {
          interfaceToInspect=params[i];
        }
 else         if (isVarArgs && i == params.length - 1) {
          Class<?> componentType=params[i].getComponentType();
          if (componentType.isInterface()) {
            interfaceToInspect=componentType;
          }
        }
        if (interfaceToInspect != null) {
          if (current instanceof LambdaExpr) {
            found=filter((LambdaExpr)current,interfaceToInspect,genericTypes[i],argType,method);
            if (found) {
              calculatedTypeArgs[i]=(SymbolType)current.getSymbolData();
            }
          }
 else {
            found=filter((MethodReferenceExpr)current,interfaceToInspect,genericTypes[i],argType,method);
            if (found) {
              calculatedTypeArgs[i]=(SymbolType)current.getSymbolData();
            }
          }
        }
      }
      if (i < params.length - 1) {
        i++;
      }
    }
  }
  return (found && containsLambda) || !containsLambda;
}