code: public static List<AbstractInsnNode> findInvocationsOf(InsnList insnList, Method expectedMethod) {
          Validate.notNull(insnList);
          Validate.notNull(expectedMethod);
  
          List<AbstractInsnNode> ret = new ArrayList<>();
          
          Type expectedMethodDesc = Type.getType(expectedMethod);
          Type expectedMethodOwner = Type.getType(expectedMethod.getDeclaringClass());
          String expectedMethodName = expectedMethod.getName();
          
          Iterator<AbstractInsnNode> it = insnList.iterator();
          while (it.hasNext()) {
              AbstractInsnNode instructionNode = it.next();
              
              Type methodDesc;
              Type methodOwner;
              String methodName;
              if (instructionNode instanceof MethodInsnNode) {
                  MethodInsnNode methodInsnNode = (MethodInsnNode) instructionNode;
                  methodDesc = Type.getType(methodInsnNode.desc);
                  methodOwner = Type.getObjectType(methodInsnNode.owner);
                  methodName = expectedMethod.getName();
              } else {
                  continue;
              }
  
              if (methodDesc.equals(expectedMethodDesc) && methodOwner.equals(expectedMethodOwner) && methodName.equals(expectedMethodName)) {
                  ret.add(instructionNode);
              }
          }
  
          return ret;
      }
docs: Find invocations of a certain method.
  @param insnList instruction list to search through
  @param expectedMethod type of method being invoked
  @return list of invocations (may be nodes of type {@link MethodInsnNode} or {@link InvokeDynamicInsnNode})
  @throws NullPointerException if any argument is {@code null}
  @throws NullPointerException if {@code expectedMethodType} isn't of sort {@link Type#METHOD}