d416391 added entire method.
19372
private void registerServant(BusinessRemoteWrapper wrapper, int i)
    {
        // synchronized on the remote Wrapper to set the isRemoteRegistered flag
        synchronized (wrapper)
        {
            if (!ivBusinessRemoteRegistered[i])
            {
                try
                {
                    if (!isZOS)
                    {
                        // Since there may be multiple remote interfaces per bean
                        // type, a unique WrapperId must be formed by combining the
                        // BeanId with specific remote interface information. d419704
                        WrapperId wrapperId = new WrapperId
                                        (wrapper.beanId.getByteArrayBytes(),
                                                        wrapper.bmd.ivBusinessRemoteInterfaceClasses[i].getName(),
                                                        i);

                        // Servant registration must be performed with the application classloader
                        // in force.  This is especially needed for JITDeploy since
                        // the JIT pluggin will be on the application classloader.
                        // Without the JIT pluggin the classloader will not trigger
                        // JITDeploy to create the stub.  //d521388
                        Object originalLoader = ThreadContextAccessor.UNCHANGED;
                        try
                        {
                            if (ivBMD != null) // EJBFactories have no BMD.   d529446
                            {
                                originalLoader = EJBThreadData.svThreadContextAccessor.pushContextClassLoaderForUnprivileged(ivBMD.classLoader); //PK83186

                                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                {
                                    if (originalLoader != ThreadContextAccessor.UNCHANGED)
                                    {
                                        Tr.debug(tc, "registerServant : old ClassLoader = " + originalLoader);
                                        Tr.debug(tc, "registerServant : new ClassLoader = " + ivBMD.classLoader);
                                    }
                                    else
                                    {
                                        Tr.debug(tc, "registerServant : current ClassLoader = " + ivBMD.classLoader);
                                    }
                                }
                            }
                            wrapper.container.getEJBRuntime().registerServant(wrapperId, wrapper);
                        } finally
                        {
                            EJBThreadData.svThreadContextAccessor.popContextClassLoaderForUnprivileged(originalLoader);
                        } // finally

                    } // if( !isZOS )

                    ivBusinessRemoteRegistered[i] = true;
                } catch (Throwable ex)
                {
                    FFDCFilter.processException(ex, CLASS_NAME + ".registerServant", "439", this);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    {
                        Tr.event(tc, "Failed to register wrapper instance", new Object[] { wrapper, ex });
                    }
                }

            } // if ( ! ivBusinessRemoteRegistered[i] )

        } //synchronized( wrapper )

    }
814272
void addInvokes(MethodDescriptor methodDescriptor, final Integer lineNumber, MethodDescriptor invokedMethodDescriptor) {
        InvokesDescriptor invokesDescriptor = scannerContext.getStore().create(methodDescriptor, InvokesDescriptor.class, invokedMethodDescriptor);
        invokesDescriptor.setLineNumber(lineNumber);
    }
66502
function appendMethods(list, addition) {
  for (var i = 0; i < addition.length; i++) {
    var method = addition[i];
    if (list.indexOf(method) === -1) {
      list.push(method);
    }
  }
}
400332
public void doAddNew() throws DBException
    {
        if (this.lockOnDBTrxType(null, DBConstants.ADD_TYPE, false))  // ADD_TYPE = Add new; Should I do the unlock in my code?
            this.unlockIfLocked(this.getRecord(), null);    // Release any locks
    }
1160500
public MethodNode addSyntheticMethod(String name,
                                         int modifiers,
                                         ClassNode returnType,
                                         Parameter[] parameters,
                                         ClassNode[] exceptions,
                                         Statement code) {
        MethodNode answer = addMethod(name, modifiers|ACC_SYNTHETIC, returnType, parameters, exceptions, code);
        answer.setSynthetic(true);
        return answer;
    }
941856
public void doAdd(Record record) throws DBException
    {
        m_LastModifiedBookmark = null;
        try   {
            BaseBuffer buffer = (BaseBuffer)m_dataSource;
            Object data = buffer.getPhysicalData();
            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                m_LastModifiedBookmark = m_tableRemote.add(data, this.getRecord().getOpenMode());
            }
        } catch (Exception ex) {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
1036644
def AddMethod(self, function, name=None):
        
        method = MethodWrapper(self, function, name)
        self.added_methods.append(method)
918873
def restore_original_new_method(klass)
      klass.define_singleton_method :new do |*args, &block|
        Throttling.original_new_method(klass).bind(klass).call *args, &block
      end
    end
725866
@Nonnull
    public BugInstance addClassAndMethod(JavaClass javaClass, Method method) {
        addClass(javaClass.getClassName());
        addMethod(javaClass, method);

        if (!MemberUtils.isUserGenerated(method)) {
            foundInAutogeneratedMethod();
        }
        return this;
    }
1226904
def add_included_hook
      with_hook_context do |context|
        mod.define_singleton_method :included do |object|
          Builder.pending << object unless context.finalize?
          context.modules.each { |mod| object.send(:include, mod) }
          object.define_singleton_method(:attribute, context.attribute_method)
        end
      end
    end
638220
public final void addCall(final MCAMethod found, final int line) {
        calls.add(new MCAMethodCall(found, className, methodName, methodDescr, source, line));
    }
1357659
public AnnotatedTypeBuilder<X> addToMethod(Method method, Annotation annotation) {
       if (methods.get(method) == null) {
           methods.put(method, new AnnotationBuilder());
       }
       methods.get(method).add(annotation);
       return this;
   }
1058778
public void addMethodLine(String className, String methodName, String methodSignature, SourceLineRange range) {
        methodLineMap.put(new MethodDescriptor(className, methodName, methodSignature), range);
    }
1099150
public static void registerImplementation(Class<? extends ActionBarSherlock> implementationClass) {
        if (!implementationClass.isAnnotationPresent(Implementation.class)) {
            throw new IllegalArgumentException("Class " + implementationClass.getSimpleName() + " is not annotated with @Implementation");
        } else if (IMPLEMENTATIONS.containsValue(implementationClass)) {
            if (DEBUG) Log.w(TAG, "Class " + implementationClass.getSimpleName() + " already registered");
            return;
        }

        Implementation impl = implementationClass.getAnnotation(Implementation.class);
        if (DEBUG) Log.i(TAG, "Registering " + implementationClass.getSimpleName() + " with qualifier " + impl);
        IMPLEMENTATIONS.put(impl, implementationClass);
    }
1184677
public void addMethodInfo(final MethodInfo methodInfo) {
        ArgUtils.notNull(methodInfo, "methodInfo");
        
        removeMethodInfo(methodInfo.getMethodName());
        this.methodInfos.add(methodInfo);
    }
794893
private static void renameMethod(ClassNode buildee, MethodNode mNode, String newName) {
        buildee.addMethod(newName, mNode.getModifiers(), mNode.getReturnType(), mNode.getParameters(), mNode.getExceptions(), mNode.getCode());
        buildee.removeMethod(mNode);
    }
442434
def _add_method_dunders(self, method):
        
        try:
            method.__module__ = self._cls.__module__
        except AttributeError:
            pass

        try:
            method.__qualname__ = ".".join(
                (self._cls.__qualname__, method.__name__)
            )
        except AttributeError:
            pass

        return method