Buggy code:
public class ScenariosForSpringSecurity extends ExpressionTestCase { public void testScenario01_Roles ( ) throws Exception { } public void testScenario02_ComparingNames ( ) throws Exception { } public void testScenario03_Arithmetic ( ) throws Exception { } public void testScenario04_ControllingWhichMethodsRun ( ) throws Exception { } static class Person { private String n ; Person ( String n ) { } public String [ ] getRoles ( ) { } public boolean hasAnyRole ( String ... roles ) { } public boolean hasRole ( String role ) { } public boolean hasIpAddress ( String ipaddr ) { } public String getName ( ) { } } static class Manager extends ScenariosForSpringSecurity . Person { Manager ( String n ) { } public String [ ] getRoles ( ) { } } static class Teller extends ScenariosForSpringSecurity . Person { Teller ( String n ) { } public String [ ] getRoles ( ) { } } static class Supervisor extends ScenariosForSpringSecurity . Person { Supervisor ( String n ) { } public String [ ] getRoles ( ) { } } static class SecurityPrincipalAccessor implements PropertyAccessor { static class Principal { public String name = "Andy" ; } public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } public Class < ? > [ ] getSpecificTargetClasses ( ) { } } static class PersonAccessor implements PropertyAccessor { ScenariosForSpringSecurity . Person activePerson ; void setPerson ( ScenariosForSpringSecurity . Person p ) { } public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } public Class < ? > [ ] getSpecificTargetClasses ( ) { } } static class MyMethodResolver implements MethodResolver { static class HasRoleExecutor implements MethodExecutor { TypeConverter tc ; public HasRoleExecutor ( TypeConverter typeConverter ) { } public TypedValue execute ( EvaluationContext context , Object target , Object ... arguments ) throws AccessException { try { Method m = ScenariosForSpringSecurity . MyMethodResolver . HasRoleExecutor . class . getMethod ( "hasRole" , String [ ] . class ) ; Object [ ] args = arguments ; if ( args != null ) { <START_BUG> ReflectionHelper . convertArguments ( m . getParameterTypes ( ) , m . isVarArgs ( ) , tc , args ) ; <END_BUG> } if ( m . isVarArgs ( ) ) { args = ReflectionHelper . setupArgumentsForVarargsInvocation ( m . getParameterTypes ( ) , args ) ; } return new TypedValue ( m . invoke ( null , args ) , new org . springframework . core . convert . TypeDescriptor ( new MethodParameter ( m , ( - 1 ) ) ) ) ; } catch ( Exception ex ) { throw new AccessException ( "Problem<seq2seq4repair_space>invoking<seq2seq4repair_space>hasRole" , ex ) ; } } public static boolean hasRole ( String ... strings ) { } } public MethodExecutor resolve ( EvaluationContext context , Object targetObject , String name , Class < ? > [ ] arguments ) throws AccessException { } } }

Fix:
ReflectionHelper . convertAllArguments ( m . getParameterTypes ( ) , m . isVarArgs ( ) , tc , args ) ;