code: private static int addMethod(ConstPool cPool, CtMethod method) {
          // addMethodrefInfo is a safe add, if constant already present it return the existing value without adding.
          return cPool.addMethodrefInfo( cPool.getThisClassInfo(), method.getName(), method.getSignature() );
      }
docs: Add Method to ConstPool. If method was not in the ConstPool will add and return index, otherwise will return index of already existing entry of constpool