cette méthode est protected pour pouvoir être surchargée dans une classe définie par l'application
506506
protected void log(HttpServletRequest httpRequest, String requestName, long duration,
			boolean systemError, int responseSize) {
		if (!logEnabled) {
			return;
		}
		final String filterName = filterConfig.getFilterName();
		LOG.logHttpRequest(httpRequest, requestName, duration, systemError, responseSize,
				filterName);
	}
1184376
def fulfill(self, method, *args, **kwargs):

        

        return getattr(self.session, method)(*args, **kwargs)
91526
private void visitClass(final Class clazz) {
        Method[] methods = clazz.getDeclaredMethods();
        for (Method method : methods) {
            Class<?>[] exceptionTypes = method.getExceptionTypes();
            String[] exceptions = new String[exceptionTypes.length];
            for (int i = 0; i < exceptions.length; i++) {
                exceptions[i] = BytecodeHelper.getClassInternalName(exceptionTypes[i]);
            }
            // for each method defined in the class, generate the appropriate delegation bytecode
            visitMethod(method.getModifiers(),
                    method.getName(),
                    BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameterTypes()),
                    null,
                    exceptions);
        }
        Constructor[] constructors = clazz.getDeclaredConstructors();
        for (Constructor method : constructors) {
            Class<?>[] exceptionTypes = method.getExceptionTypes();
            String[] exceptions = new String[exceptionTypes.length];
            for (int i = 0; i < exceptions.length; i++) {
                exceptions[i] = BytecodeHelper.getClassInternalName(exceptionTypes[i]);
            }
            // for each method defined in the class, generate the appropriate delegation bytecode
            visitMethod(method.getModifiers(),
                    "<init>",
                    BytecodeHelper.getMethodDescriptor(Void.TYPE, method.getParameterTypes()),
                    null,
                    exceptions);
        }

        for (Class intf : clazz.getInterfaces()) {
            visitClass(intf);
        }
        Class superclass = clazz.getSuperclass();
        if (superclass != null) visitClass(superclass);

        // Ultimately, methods can be available in the closure map which are not defined by the superclass
        // nor the interfaces
        for (Map.Entry<String, Boolean> entry : delegatedClosures.entrySet()) {
            Boolean visited = entry.getValue();
            if (!visited) {
                String name = entry.getKey();
                if (!"*".equals(name)) {
                    // generate a new method
                    visitMethod(ACC_PUBLIC, name, "([Ljava/lang/Object;)Ljava/lang/Object;", null, null);
                }
            }
        }
    }
1256129
@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		final String methodName = method.getName();
		// != for perf (strings interned: != is ok)
		if ("include" != methodName && "forward" != methodName) { // NOPMD
			return method.invoke(requestDispatcher, args);
		}
		boolean systemError = false;
		try {
			final String pathWithoutParameters;
			final int indexOf = path.indexOf('?');
			if (indexOf != -1) {
				pathWithoutParameters = path.substring(0, indexOf);
			} else {
				pathWithoutParameters = path;
			}
			JSP_COUNTER.bindContextIncludingCpu(pathWithoutParameters);
			return method.invoke(requestDispatcher, args);
		} catch (final InvocationTargetException e) {
			if (e.getCause() instanceof Error) {
				// on catche Error pour avoir les erreurs systèmes
				// mais pas Exception qui sont fonctionnelles en général
				systemError = true;
			}
			throw e;
		} finally {
			// on enregistre la requête dans les statistiques
			JSP_COUNTER.addRequestForCurrentContext(systemError);
		}
	}
319945
private Object doPrivileged(final String methodName, final Class<?>[] clazz, Object[] params) {

        try {
            Method method = context.getClass().getMethod(methodName, clazz);
            return executeMethod(method, context, params);
        } catch (Exception ex) {
            try {
                handleException(ex);
            } catch (Throwable t) {
                handleThrowable(t);
                throw new RuntimeException(t.getMessage());
            }
            return null;
        } finally {
            params = null;
        }
    }
573665
function(className) {
        var cls = _classes[className];
        if (!cls) {
            var k, name,
            def = window["TFW::" + className];
            if (!def) {
                throw new Error(
                    "[TFW3] This class has not been defined: \"" + className + "\"!\n"
                        + "Did you forget to include it?"
                );
            }
            // Création de la classe à partir de sa définition.
            cls = function () {};
            var superclass = TFW3Object;
            if (def.superclass) {
                superclass = loadClass(def.superclass);
            }
            // Héritage
            cls.prototype = new superclass();
            // Eviter que le constructeur de cette classe soit celui de la super classe.
            cls.prototype.constructor = cls;
            // Définition de l'attribut $parent pour accéder aux méthodes parentes.
            cls.prototype.$parent = superclass.prototype;
            // Multilangues.
            if (typeof def.lang === "object") {
                cls.prototype.$lang = def.lang;
                for (k in def.lang) {
                    cls.prototype.$defLang = k;
                    break;
                }
            } else {
                cls.prototype.$lang = superclass.prototype.$lang || {};
                cls.prototype.$defLang = superclass.prototype.$defLang || "en";
            }
            // Conserver le nom de la super classe.
            cls.prototype.$superclass = superclass.prototype.$classname;
            // Conserver le nom de la classe.
            cls.prototype.$classname = className;
            // Les noms des signals.
            cls.prototype.$signals = def.signals;
            // Est-ce un singleton ?
            cls.prototype.$singleton = def.singleton;
            // Espace réservé aux membres statiques de la classe.
            var staticVars = {className: className};
            _statics[className] = staticVars;
            cls.prototype.$static = staticVars;
            // Valeurs par défaut des attributs.
            if (def.attributes) {
                for (k in def.attributes) {
                    cls.prototype["_" + k] = def.attributes[k];
                }
            }
            // Déclaration du constructeur.
            cls.prototype.$init = def.init;
            // Définition des méthodes liées aux signaux.
            if (def.signals) {
                for (i in def.signals) {
                    declareSignal(
                        cls,
                        def.signals[i]
                    );
                }
            }
            // Assigner toutes les méthodes.
            for (name in def.functions) {
                if (def.superclass && cls.prototype[name]) {
                    // This is an ovveride.
                    cls.prototype[def.superclass + "$" + name] = cls.prototype[name];
                }
                cls.prototype[name] = def.functions[name];
            }

            // Mise en cache de la classe.
            _classes[className] = cls;
            // Appel d'un éventuel constructeur de classe.
            if (typeof def.classInit === "function") {
                def.classInit(staticVars);
            }
        }
        return cls;
    }
76234
def allow(cls, action, **kwargs):
        
        return cls.create(action, exclude=False, **kwargs)
17166
@Override
    public void sawOpcode(int seen) {
        String attributeName = null;
        boolean sawGetAttribute = false;
        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEINTERFACE) {
                String clsName = getClassConstantOperand();
                if ("javax/servlet/http/HttpSession".equals(clsName)) {
                    String methodName = getNameConstantOperand();
                    if ("getAttribute".equals(methodName)) {
                        if (stack.getStackDepth() > 0) {
                            OpcodeStack.Item item = stack.getStackItem(0);
                            Object con = item.getConstant();
                            if (con instanceof String) {
                                attributeName = (String) con;
                                sawGetAttribute = true;
                            }
                        }
                    } else if ("setAttribute".equals(methodName) && (stack.getStackDepth() > 1)) {
                        OpcodeStack.Item item = stack.getStackItem(1);
                        Object con = item.getConstant();
                        if (con instanceof String) {
                            attributeName = (String) con;
                            changedAttributes.remove(attributeName);
                        }
                    }
                }
            } else if (OpcodeUtils.isALoad(seen)) {
                int reg = RegisterUtils.getALoadReg(this, seen);
                attributeName = savedAttributes.get(Integer.valueOf(reg));
                sawGetAttribute = attributeName != null;
            } else if ((((seen >= Const.ASTORE_0) && (seen <= Const.ASTORE_3)) || (seen == Const.ASTORE)) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                attributeName = (String) item.getUserValue();
                int reg = RegisterUtils.getAStoreReg(this, seen);
                savedAttributes.put(Integer.valueOf(reg), attributeName);
            }

            if ((seen == Const.INVOKEINTERFACE) || (seen == Const.INVOKEVIRTUAL)) {
                String methodName = getNameConstantOperand();
                Matcher m = modifyingNames.matcher(methodName);
                if (m.matches()) {
                    String signature = getSigConstantOperand();
                    int numArgs = SignatureUtils.getNumParameters(signature);
                    if (stack.getStackDepth() > numArgs) {
                        OpcodeStack.Item item = stack.getStackItem(numArgs);
                        attributeName = (String) item.getUserValue();
                        if (attributeName != null) {
                            changedAttributes.put(attributeName, Integer.valueOf(getPC()));
                        }
                    }
                }
            } else if ((seen >= Const.IASTORE) && (seen <= Const.SASTORE) && (stack.getStackDepth() > 2)) {
                OpcodeStack.Item item = stack.getStackItem(2);
                attributeName = (String) item.getUserValue();
                if (attributeName != null) {
                    changedAttributes.put(attributeName, Integer.valueOf(getPC()));
                }
            }
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (sawGetAttribute && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(attributeName);
            }
        }
    }
150487
function invokeGuardedCallback(name, func, a) {
  try {
    func(a);
  } catch (x) {
    if (caughtError === null) {
      caughtError = x;
    }
  }
}
1264053
private Object doPrivileged(final String methodName, final Object[] params) {
        try{
            return invokeMethod(context, methodName, params);
        }catch(Throwable t){
            throw new RuntimeException(t.getMessage(), t);
        }
    }
830847
private Function wrapValueMethod(Method method) {
    return c -> {
      try {
        return method.invoke(this, c);
      } catch (InvocationTargetException e) {
        throw new CommandException(e);
      } catch (IllegalAccessException e) {
        throw new AssertionError(e);
      }
    };
  }
157559
private void visit(ReturnValueRestrictionDescr descr) {

        ReturnValueRestriction restriction = new ReturnValueRestriction(pattern);

        restriction.setPatternIsNot(pattern.isPatternNot());
        restriction.setFieldPath(field.getPath());
        restriction.setOperator(Operator.determineOperator(descr.getEvaluator(),
                descr.isNegated()));
        restriction.setClassMethodName(descr.getClassMethodName());
        restriction.setContent(descr.getContent());
        restriction.setDeclarations(descr.getDeclarations());
        restriction.setOrderNumber(orderNumber);
        restriction.setParentPath(pattern.getPath());
        restriction.setParentType(pattern.getVerifierComponentType());

        data.add(restriction);
        solvers.addPatternComponent(restriction);

    }
152220
def require(self, lock, guard_func, *guard_args, **guard_kw):
        
        def decorator(f):
            @wraps(f)
            def wrapper(*args, **kw):
                if self.granted(lock):
                    self.msg('Granted {}'.format(lock))
                    return f(*args, **kw)
                if guard_func(*guard_args, **guard_kw) and self.acquire(lock):
                    return f(*args, **kw)
                return None
            return wrapper
        return decorator
1230225
private function storeWrapperClass(): void
  {
    $code = $this->codeStore->getCode();

    switch ($this->wrapperClassType)
    {
      case 'static':
        // Nothing to do.
        break;

      case 'non static':
        $code = NonStatic::nonStatic($code);
        break;

      default:
        throw new FallenException('wrapper class type', $this->wrapperClassType);
    }

    $this->writeTwoPhases($this->wrapperFilename, $code);
  }
937972
def __store_callable(self, o, method_name, member):
        
        self.__store__['callables'][method_name] = eval( "o." + method_name )
        self.__store__['callables'][method_name[0].lower() + method_name[1:]] = eval( "o." + method_name )
        ret_val = self.__wrap( method_name )
        self.__store__[ method_name ] = ret_val
        self.__store__[ method_name[0].lower() + method_name[1:] ] = ret_val
380820
@Override
    protected void createForwardingMethodBody(ClassMethod classMethod, final MethodInformation methodInfo, ClassMethod staticConstructor) {
        final Method method = methodInfo.getMethod();
        // we can only use bytecode based invocation for some methods
        // at the moment we restrict it solely to public methods with public
        // return and parameter types
        boolean bytecodeInvocationAllowed = Modifier.isPublic(method.getModifiers()) && Modifier.isPublic(method.getReturnType().getModifiers());
        for (Class<?> paramType : method.getParameterTypes()) {
            if (!Modifier.isPublic(paramType.getModifiers())) {
                bytecodeInvocationAllowed = false;
                break;
            }
        }
        if (!bytecodeInvocationAllowed) {
            createInterceptorBody(classMethod, methodInfo, staticConstructor);
            return;
        }

        // create a new interceptor invocation context whenever we invoke a method on a client proxy
        // we use a try-catch block in order to make sure that endInterceptorContext() is invoked regardless whether
        // the method has succeeded or not

        new RunWithinInterceptionDecorationContextGenerator(classMethod, this) {

            @Override
            void doWork(CodeAttribute b, ClassMethod classMethod) {
                loadBeanInstance(classMethod.getClassFile(), methodInfo, b);
                //now we should have the target bean instance on top of the stack
                // we need to dup it so we still have it to compare to the return value
                b.dup();

                //lets create the method invocation
                String methodDescriptor = methodInfo.getDescriptor();
                b.loadMethodParameters();
                if (method.getDeclaringClass().isInterface()) {
                    b.invokeinterface(methodInfo.getDeclaringClass(), methodInfo.getName(), methodDescriptor);
                } else {
                    b.invokevirtual(methodInfo.getDeclaringClass(), methodInfo.getName(), methodDescriptor);
                }
            }

            @Override
            void doReturn(CodeAttribute b, ClassMethod classMethod) {
                // assumes doWork() result is on top of the stack
                // if this method returns a primitive we just return
                if (method.getReturnType().isPrimitive()) {
                    b.returnInstruction();
                } else {
                    // otherwise we have to check that the proxy is not returning 'this;
                    // now we need to check if the proxy has return 'this' and if so return
                    // an
                    // instance of the proxy.
                    // currently we have result, beanInstance on the stack.
                    b.dupX1();
                    // now we have result, beanInstance, result
                    // we need to compare result and beanInstance

                    // first we need to build up the inner conditional that just returns
                    // the
                    // result
                    final BranchEnd returnInstruction = b.ifAcmpeq();
                    b.returnInstruction();
                    b.branchEnd(returnInstruction);

                    // now add the case where the proxy returns 'this';
                    b.aload(0);
                    b.checkcast(methodInfo.getMethod().getReturnType().getName());
                    b.returnInstruction();
                }
            }
        }.runStartIfNotEmpty();
    }
424083
def _wrap_public_method(self, attr):
        
        def wrapper(*args, **kwargs):
            return getattr(self.connection, attr)(*args, **kwargs)
        return wrapper