Buggy code:
public static Class [ ] getParameterTypes ( Method m ) { } public static Class [ ] findParameterTypes ( Class type , Method m ) { } static Class resolveType ( ParameterizedType param , TypeVariable var , TypeVariable [ ] declaredTypes ) { } static Class findType ( Type [ ] types , Class type ) { } public static Class [ ] getParameterTypes ( Constructor c ) { } public static SecurityManager getSecurityManager ( ) { } public static void setSecurityManager ( SecurityManager value ) { } public static Permission getPermission ( Method method ) { } public static Object invokeMethod ( Object target , Method method , Object [ ] argsArray ) throws IllegalAccessException , InvocationTargetException { } public static final Class getArgClass ( Object arg ) { } public static final boolean isTypeCompatible ( Object object , Class c ) { } public static boolean areArgsCompatible ( Object [ ] args , Class [ ] classes ) { } public static boolean areArgsCompatible ( Object [ ] args , Class [ ] classes , Method m ) { } public static final boolean isMoreSpecific ( Class [ ] classes1 , Class [ ] classes2 ) { } public static String getModifierString ( int modifiers ) { } public static Class classForName ( OgnlContext context , String className ) throws ClassNotFoundException { } public static boolean isInstance ( OgnlContext context , Object value , String className ) throws OgnlException { } public static Object getPrimitiveDefaultValue ( Class forClass ) { } public static Object getNumericDefaultValue ( Class forClass ) { } public static Object getConvertedType ( OgnlContext context , Object target , Member member , String propertyName , Object value , Class type ) { } public static boolean getConvertedTypes ( OgnlContext context , Object target , Member member , String propertyName , Class [ ] parameterTypes , Object [ ] args , Object [ ] newArgs ) { } public static Method getConvertedMethodAndArgs ( OgnlContext context , Object target , String propertyName , List methods , Object [ ] args , Object [ ] newArgs ) { } public static Constructor getConvertedConstructorAndArgs ( OgnlContext context , Object target , List constructors , Object [ ] args , Object [ ] newArgs ) { } public static Method getAppropriateMethod ( OgnlContext context , Object source , Object target , String propertyName , List methods , Object [ ] args , Object [ ] actualArgs ) { } public static Object callAppropriateMethod ( OgnlContext context , Object source , Object target , String methodName , String propertyName , List methods , Object [ ] args ) throws MethodFailedException { } public static Object callStaticMethod ( OgnlContext context , String className , String methodName , Object [ ] args ) throws OgnlException { } public static Object callMethod ( OgnlContext context , Object target , String methodName , String propertyName , Object [ ] args ) throws OgnlException { } public static Object callMethod ( OgnlContext context , Object target , String methodName , Object [ ] args ) throws OgnlException { } public static Object callConstructor ( OgnlContext context , String className , Object [ ] args ) throws OgnlException { } @ Deprecated public static final Object getMethodValue ( OgnlContext context , Object target , String propertyName ) throws IntrospectionException , IllegalAccessException , NoSuchMethodException , OgnlException { } public static final Object getMethodValue ( OgnlContext context , Object target , String propertyName , boolean checkAccessAndExistence ) throws IntrospectionException , IllegalAccessException , NoSuchMethodException , OgnlException { } @ Deprecated public static boolean setMethodValue ( OgnlContext context , Object target , String propertyName , Object value ) throws IntrospectionException , IllegalAccessException , NoSuchMethodException , OgnlException { } public static boolean setMethodValue ( OgnlContext context , Object target , String propertyName , Object value , boolean checkAccessAndExistence ) throws IntrospectionException , IllegalAccessException , NoSuchMethodException , OgnlException { } public static List getConstructors ( Class targetClass ) { } public static Map getMethods ( Class targetClass , boolean staticMethods ) { ClassCache cache = ( staticMethods ) ? OgnlRuntime . _staticMethodCache : OgnlRuntime . _instanceMethodCache ; Map result ; if ( ( result = ( ( Map ) ( cache . get ( targetClass ) ) ) ) == null ) { synchronized ( cache ) { if ( ( result = ( ( Map ) ( cache . get ( targetClass ) ) ) ) == null ) { result = new HashMap ( 23 ) ; for ( Class c = targetClass ; c != null ; c = c . getSuperclass ( ) ) { <START_BUG> Method [ ] ma = c . getDeclaredMethods ( ) ; <END_BUG> for ( int i = 0 , icount = ma . length ; i < icount ; i ++ ) { if ( ! ( OgnlRuntime . isMethodCallable ( ma [ i ] ) ) ) continue ; if ( ( Modifier . isStatic ( ma [ i ] . getModifiers ( ) ) ) == staticMethods ) { List ml = ( ( List ) ( result . get ( ma [ i ] . getName ( ) ) ) ) ; if ( ml == null ) result . put ( ma [ i ] . getName ( ) , ( ml = new ArrayList ( ) ) ) ; ml . add ( ma [ i ] ) ; } } } cache . put ( targetClass , result ) ; } } } return result ; } public static List getMethods ( Class targetClass , String name , boolean staticMethods ) { } public static Map getFields ( Class targetClass ) { } public static Field getField ( Class inClass , String name ) { } @ Deprecated public static Object getFieldValue ( OgnlContext context , Object target , String propertyName ) throws NoSuchFieldException { } public static Object getFieldValue ( OgnlContext context , Object target , String propertyName , boolean checkAccessAndExistence ) throws NoSuchFieldException { }

Fix:
Method [ ] ma = c . getMethods ( ) ;