code: static Method findMatchingMethod(Map<String, List<Method>> methodsByName, com.ibm.ws.javaee.dd.ejb.Method me) {
          List<Method> methods = methodsByName.get(me.getMethodName());
          if (methods == null) {
              return null;
          }
  
          List<String> meParms = me.getMethodParamList();
          if (meParms == null) {
              return methods.get(0);
          }
  
          for (Method method : methods) {
              if (DDUtil.methodParamsMatch(meParms, method.getParameterTypes())) {
                  return method;
              }
          }
  
          return null;
      }
docs: Finds the first matching method in a map of method name to list of methods.