Private static methods
196652
function match(mapEntry, request, route) {
    var keys = [];

    var m = pathToRegexpService.pathToRegexp(mapEntry.path, keys).exec(request.url);

    if (!m) {
      return false;
    }

    if (mapEntry.method != request.method) {
      return false;
    }

    route.params = {};
    route.path = m[0];
    route.handler = mapEntry.handler;

    // Assign url parameters to the request.
    for (var i = 1; i < m.length; i++) {
      var key = keys[i - 1];
      var prop = key.name;
      var val = decodeParam(m[i]);

      if (val !== undefined || !(hasOwnProperty.call(route.params, prop))) {
        route.params[prop] = val;
      }
    }

    request.params = route.params;
    return true;
  }
307151
static Method checkTimeMethod(Method timeMethod) throws InvalidBenchmarkException {
    checkArgument(isTimeMethod(timeMethod));
    Class<?>[] parameterTypes = timeMethod.getParameterTypes();
    if (!Arrays.equals(parameterTypes, new Class<?>[] {int.class})
        && !Arrays.equals(parameterTypes, new Class<?>[] {long.class})) {
      throw new InvalidBenchmarkException(
          "Microbenchmark methods must accept a single int parameter: " + timeMethod.getName());
    }

    // Static technically doesn't hurt anything, but it's just the completely wrong idea
    if (Util.isStatic(timeMethod)) {
      throw new InvalidBenchmarkException(
          "Microbenchmark methods must not be static: " + timeMethod.getName());
    }
    return timeMethod;
  }
1032788
public static function init(): void
    {
        if (static::$adapters === null) {
        	static::$randomNumber = rand(100000, 999999);

        	// set the "who"
            static::resetWho();

            static::$adapters = [];
            $configs = Application::getConfig('application')->get('log', []);

            $count = 0;
            foreach ($configs as $index => $config) {
                $enabled = $config['enabled'] && is_array($config['options']['log']) && count($config['options']['log']) > 0;

                // TODO: Register module if needed

                if ($enabled) {
                    if (!isset($config['adapter_class'])) {
                        throw new ConfigException("Logger[{$index}] defined in application config is missing adapter_class key");
                    }

                    // if the config is enabled, then make new instance
                    $adapter = $config['adapter_class'];

                    static::$adapters[$count] = new $adapter($config['options']);

                    // Log class must be instance of AbstractLogAdapter
                    if (!(static::$adapters[$count] instanceof AbstractLogAdapter)) {
                        throw new Exception("Log adapter {$adapter} must extend AbstractLogAdapter");
                    }

                    static::$enabledAdapters[$config['adapter_class']] = true;

                    foreach ($config['options']['log'] as $level) {
                        static::$enabledLevels[$level] = true;
                    }

                    $count++;
                }
            }
        }
    }
881748
public static Object callStaticMethod(Class staticClass, String methodName, Object[] values) throws PageException {
	if (values == null) values = new Object[0];

	MethodParameterPair mp;
	try {
	    mp = getMethodParameterPairIgnoreCase(staticClass, methodName, values);
	}
	catch (NoSuchMethodException e) {
	    throw Caster.toPageException(e);
	}

	try {
	    return mp.getMethod().invoke(null, mp.getParameters());
	}
	catch (InvocationTargetException e) {
	    Throwable target = e.getTargetException();
	    if (target instanceof PageException) throw (PageException) target;
	    throw Caster.toPageException(e.getTargetException());
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}
    }
806305
static function __static()
	{

		DOMXPathNavigator::$nodeTypeMap = array(
			XML_ELEMENT_NODE => XPathNodeType::Element,
			XML_ATTRIBUTE_NODE => XPathNodeType::Attribute,
			XML_TEXT_NODE => XPathNodeType::Text,
			// XML_CDATA_SECTION_NODE => 4,
			// XML_ENTITY_REF_NODE => 5,
			// XML_ENTITY_NODE => 6,
			XML_PI_NODE => XPathNodeType::ProcessingInstruction,
			XML_COMMENT_NODE => XPathNodeType::Comment,
			XML_DOCUMENT_NODE => XPathNodeType::Root,
			// XML_DOCUMENT_TYPE_NODE => XPathNodeType::Element, // .NET does not consider this an element
			// XML_DOCUMENT_FRAG_NODE => 11,
			XML_NOTATION_NODE => 12,
			// XML_HTML_DOCUMENT_NODE => 13,
			// XML_DTD_NODE => 14,
			XML_ELEMENT_DECL_NODE => XPathNodeType::Element,
			XML_ATTRIBUTE_DECL_NODE => XPathNodeType::Attribute,
			// XML_ENTITY_DECL_NODE => 17,
			XML_NAMESPACE_DECL_NODE => XPathNodeType::NamespaceURI,
		);

	}
357823
static JMethod getter(FieldOutline fieldOutline) {
        final JDefinedClass theClass = fieldOutline.parent().implClass;
        final String publicName = fieldOutline.getPropertyInfo().getName(true);
        final JMethod getgetter = theClass.getMethod("get" + publicName, NONE);
        if (getgetter != null) {
            return getgetter;
        } else {
            final JMethod isgetter = theClass
                    .getMethod("is" + publicName, NONE);
            if (isgetter != null) {
                return isgetter;
            } else {
                return null;
            }
        }
    }
1096964
public void importStatic(String name) throws ELException {
        int i = name.lastIndexOf('.');
        if (i <= 0) {
            throw new ELException(
                "The name " + name + " is not a full static member name");
        }
        String memberName = name.substring(i+1);
        String className = name.substring(0, i);
        staticNameMap.put(memberName, className);
    }
114395
@Override
    public void visitGETSTATIC(GETSTATIC obj) {
        if (getNumWordsProduced(obj) != 1) {
            super.visitGETSTATIC(obj);
            return;
        }

        if (checkForKnownValue(obj)) {
            return;
        }
        XField field = XFactory.createXField(obj, cpg);
        if (field.isFinal()) {
            Item summary = AnalysisContext.currentAnalysisContext().getFieldSummary().getSummary(field);
            if (summary.isNull()) {
                produce(IsNullValue.nullValue());
                return;
            }
        }
        if ("java.util.logging.Level".equals(field.getClassName()) && "SEVERE".equals(field.getName())
                || "org.apache.log4j.Level".equals(field.getClassName())
                && ("ERROR".equals(field.getName()) || "FATAL".equals(field.getName()))) {
            getFrame().toExceptionValues();
        }

        if (field.getName().startsWith("class$")) {
            produce(IsNullValue.nonNullValue());
            return;
        }
        NullnessAnnotation annotation = AnalysisContext.currentAnalysisContext().getNullnessAnnotationDatabase()
                .getResolvedAnnotation(field, false);
        if (annotation == NullnessAnnotation.NONNULL) {
            modelNormalInstruction(obj, getNumWordsConsumed(obj), 0);
            produce(IsNullValue.nonNullValue());
        } else if (annotation == NullnessAnnotation.CHECK_FOR_NULL) {
            modelNormalInstruction(obj, getNumWordsConsumed(obj), 0);
            produce(IsNullValue.nullOnSimplePathValue().markInformationAsComingFromFieldValue(field));
        } else {

            super.visitGETSTATIC(obj);
        }
    }
1335602
private Method findFromStringMethod(Class<?> cls, String methodName) {
        Method m;
        try {
            m = cls.getMethod(methodName, String.class);
        } catch (NoSuchMethodException ex) {
            try {
                m = cls.getMethod(methodName, CharSequence.class);
            } catch (NoSuchMethodException ex2) {
                throw new IllegalArgumentException("Method not found", ex2);
            }
        }
        if (Modifier.isStatic(m.getModifiers()) == false) {
            throw new IllegalArgumentException("Method must be static: " + methodName);
        }
        return m;
    }
1313459
void init() throws MpJwtProcessingException {
        String methodName = "init";
        if (tc.isDebugEnabled()) {
            Tr.entry(tc, methodName);
        }
        setUpJsseHelper();
        if (this.jsseHelper == null) {
            if (tc.isDebugEnabled()) {
                Tr.exit(tc, methodName);
            }
            return;
        }
        Properties sslProps = null;
        try {
            sslProps = getSslPropertiesFromJsseHelper();
        } catch (Exception e) {
            String msg = Tr.formatMessage(tc, "ERROR_LOADING_SSL_PROPS", new Object[] { e.getLocalizedMessage() });
            Tr.error(tc, msg);
            throw new MpJwtProcessingException(msg, e);
        }
        setKeystoreAndTruststoreNames(sslProps);
        if (tc.isDebugEnabled()) {
            Tr.exit(tc, methodName);
        }
    }
1088936
public void setStaticMembers(java.util.Collection<String> staticMembers) {
        if (staticMembers == null) {
            this.staticMembers = null;
            return;
        }

        this.staticMembers = new com.amazonaws.internal.SdkInternalList<String>(staticMembers);
    }
143776
static Method getPublicMethod(Method pMethod) {
        if (pMethod == null) {
            return null;
        }

        // See if the method is already available from a public class
        Class cl = pMethod.getDeclaringClass();
        if (Modifier.isPublic(cl.getModifiers())) {
            return pMethod;
        }

        // Otherwise, try to find a public class that declares the method
        Method ret = getPublicMethod(cl, pMethod);
        if (ret != null) {
            return ret;
        } else {
            return pMethod;
        }
    }
784770
function StaticWriter(size) {
  if (!(this instanceof StaticWriter))
    return new StaticWriter(size);

  this.data = size ? Buffer.allocUnsafe(size) : EMPTY;
  this.offset = 0;
}
520189
public static function __static()
	{
		Types::$NullType					= Type::FromNameAndTypeCode( Type::null_, TypeCode::Null_ );
		Types::$ArrayType					= Type::FromNameAndTypeCode( Type::assocArray, TypeCode::AssocArray );
		Types::$BoolType					= Type::FromNameAndTypeCode( Type::bool, TypeCode::Boolean );
		Types::$BooleanType					= Types::$BoolType;
		Types::$ByteType					= Type::FromNameAndTypeCode( Type::byte, TypeCode::Int32 );
		Types::$CharType					= Type::FromNameAndTypeCode( Type::char, TypeCode::String );
		Types::$DateTimeIntervalType		= Type::FromNameAndTypeCode( Type::dateTimeInterval, TypeCode::DateTimeInterval );
		Types::$DateTimeValueType			= Type::FromNameAndTypeCode( DateTimeValue::$CLASSNAME, TypeCode::DateTime );
		Types::$DateValueType				= Type::FromNameAndTypeCode( DateValue::$CLASSNAME, TypeCode::DateTime );
		Types::$DayTimeDurationValueType	= Type::FromNameAndTypeCode( DayTimeDurationValue::$CLASSNAME, TypeCode::DateTimeInterval );
		// Types::$DecimalType				= Type::FromNameAndTypeCode( Type::decimal, TypeCode::Float );
		Types::$DecimalType					= Type::FromNameAndTypeCode( DecimalValue::$CLASSNAME, TypeCode::Decimal );
		Types::$DurationValueType			= Type::FromNameAndTypeCode( DurationValue::$CLASSNAME, TypeCode::DateTimeInterval );
		Types::$FloatType					= Type::FromNameAndTypeCode( Type::float, TypeCode::Float );
		Types::$DoubleType					= Type::FromNameAndTypeCode( Type::double, TypeCode::Float );
		// Types::$DoubleType					= Types::$FloatType;
		Types::$Int16Type					= Type::FromNameAndTypeCode( Type::int16, TypeCode::Int32 );
		Types::$Int32Type					= Type::FromNameAndTypeCode( Type::int32, TypeCode::Int32 );
		Types::$Int64Type					= Type::FromNameAndTypeCode( Type::int64, TypeCode::Int32 );
		Types::$IntType						= Types::$Int32Type;
		Types::$IntegerType					= Type::FromNameAndTypeCode( Integer::$CLASSNAME, TypeCode::Float );
		// Types::$LongType					= Types::$Int64Type;
		Types::$LongType					= Type::FromNameAndTypeCode( Long::$CLASSNAME, TypeCode::Int64 );
		Types::$ObjectType					= Type::FromNameAndTypeCode( Type::object, TypeCode::Object );
		Types::$SByteType					= Type::FromNameAndTypeCode( Type::sbyte, TypeCode::Int32 );
		Types::$ShortType					= Types::$Int16Type;
		Types::$StringType					= Type::FromNameAndTypeCode( Type::string, TypeCode::String );
		Types::$TimeValueType				= Type::FromNameAndTypeCode( "lyquidity\XPath2\Value\TimeValue", TypeCode::DateTime );
		Types::$UInt16Type					= Type::FromNameAndTypeCode( Type::uint16, TypeCode::Int32 );
		Types::$UInt32Type					= Type::FromNameAndTypeCode( Type::uint32, TypeCode::Int32 );
		Types::$UInt64Type					= Type::FromNameAndTypeCode( Type::uint64, TypeCode::Int32 );

		Types::$AnyUriValueType				= Type::FromNameAndTypeCode( AnyUriValue::$CLASSNAME, TypeCode::Object );
		Types::$Base64BinaryValueType		= Type::FromNameAndTypeCode( Base64BinaryValue::$CLASSNAME, TypeCode::Object );
		Types::$ENTITIESValueType			= Type::FromNameAndTypeCode( ENTITIESValue::$CLASSNAME, TypeCode::Object );
		Types::$GDayValueType				= Type::FromNameAndTypeCode( GDayValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GMonthValueType				= Type::FromNameAndTypeCode( GMonthValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GMonthDayValueType			= Type::FromNameAndTypeCode( GMonthDayValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GYearMonthValueType			= Type::FromNameAndTypeCode( GYearMonthValue::$CLASSNAME, TypeCode::DateTime );
		Types::$GYearValueType				= Type::FromNameAndTypeCode( GYearValue::$CLASSNAME, TypeCode::DateTime );
		Types::$HexBinaryValueType			= Type::FromNameAndTypeCode( HexBinaryValue::$CLASSNAME, TypeCode::Object );
		Types::$IDREFSValueType				= Type::FromNameAndTypeCode( IDREFSValue::$CLASSNAME, TypeCode::Object );
		Types::$NMTOKENSValueType			= Type::FromNameAndTypeCode( NMTOKENSValue::$CLASSNAME, TypeCode::Object );
		Types::$QNameValueType				= Type::FromNameAndTypeCode( QNameValue::$CLASSNAME, TypeCode::Object );
		Types::$UntypedAtomicType			= Type::FromNameAndTypeCode( UntypedAtomic::$CLASSNAME, TypeCode::Object );
		Types::$YearMonthDurationValueType	= Type::FromNameAndTypeCode( YearMonthDurationValue::$CLASSNAME, TypeCode::DateTimeInterval );
		Types::$UNION						= Type::FromNameAndTypeCode( Type::union, TypeCode::UNION );
	}
812046
public void define() {
		staticInitializer = null;
		haveLookedForStaticInitializer = false;
		// DEFAULT METHODS - remove the if
		if (!typeDescriptor.isInterface()) {
			try {
				dispatcherClass = reloadableType.typeRegistry.defineClass(dispatcherName, dispatcher, false);
			}
			catch (RuntimeException t) {
				// TODO check for something strange.  something to do with the file detection misbehaving, see the same file attempted to be reloaded twice...
				if (t.getMessage().indexOf("duplicate class definition") == -1) {
					throw t;
				}
				else {
					t.printStackTrace();
				}
			}
		}
		try {
			executorClass = reloadableType.typeRegistry.defineClass(executorName, executor, false);
		}
		catch (RuntimeException t) {
			// TODO check for something strange.  something to do with the file detection misbehaving, see the same file attempted to be reloaded twice...
			if (t.getMessage().indexOf("duplicate class definition") == -1) {
				throw t;
			}
			else {
				t.printStackTrace();
			}
		}
		// DEFAULT METHODS - remove the if
		if (!typeDescriptor.isInterface()) {
			try {
				dispatcherInstance = dispatcherClass.newInstance();
			}
			catch (InstantiationException e) {
				throw new RuntimeException("Unable to build dispatcher class instance", e);
			}
			catch (IllegalAccessException e) {
				throw new RuntimeException("Unable to build dispatcher class instance", e);
			}
		}
	}
823081
static <J> MethodId<J> MethodId(String name) {
		for (Method m : JavacTreeMaker.class.getDeclaredMethods()) {
			if (m.getName().equals(name)) {
				@SuppressWarnings("unchecked") Class<J> r = (Class<J>) m.getReturnType();
				Class<?>[] p = m.getParameterTypes();
				return new MethodId<J>(TreeMaker.class, name, r, p);
			}
		}
		
		throw new InternalError("Not found: " + name);
	}
131815
private void addHandlerInitializerMethod(ClassFile proxyClassType, ClassMethod staticConstructor) throws Exception {
        ClassMethod classMethod = proxyClassType.addMethod(AccessFlag.PRIVATE, INIT_MH_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_OBJECT);
        final CodeAttribute b = classMethod.getCodeAttribute();
        b.aload(0);
        StaticMethodInformation methodInfo = new StaticMethodInformation(INIT_MH_METHOD_NAME, new Class[] { Object.class }, void.class,
                classMethod.getClassFile().getName());
        invokeMethodHandler(classMethod, methodInfo, false, DEFAULT_METHOD_RESOLVER, staticConstructor);
        b.checkcast(MethodHandler.class);
        b.putfield(classMethod.getClassFile().getName(), METHOD_HANDLER_FIELD_NAME, DescriptorUtils.makeDescriptor(MethodHandler.class));
        b.returnInstruction();
        BeanLogger.LOG.createdMethodHandlerInitializerForDecoratorProxy(getBeanType());

    }