code: public int getNumArguments(InvokeInstruction ins, ConstantPoolGen cpg) {
          SignatureParser parser = new SignatureParser(ins.getSignature(cpg));
          return parser.getNumParameters();
      }
docs: Get the number of arguments passed to given method invocation.
  
  @param ins
  the method invocation instruction
  @param cpg
  the ConstantPoolGen for the class containing the method
  @return number of arguments; note that this excludes the object instance
  for instance methods