Program: 57864
Project: 57864
Buggy source:
@Test public void invokeMethod(){
  assertNull(ReflectionUtil.invokeMethod(null,null));
  assertNull(ReflectionUtil.invokeMethod(null,new Object(),new Object()));
  assertNull(ReflectionUtil.invokeMethod(null,new Object()));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,null));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,(Object[])null,(Class<?>)null));
  assertNull(ReflectionUtil.invokeMethod("String_Node_Str",(String)null,(Object[])null,(Class<?>)null));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,new Object[]{},(Class<?>)null));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,(Object[])null,Emptys.EMPTY_CLASS_ARRAY));
  assertNull(ReflectionUtil.invokeMethod(null,new Object(),new Object()));
  assertNull(ReflectionUtil.invokeMethod(null,new Object()));
  Method method=null;
  try {
    method=String.class.getMethod("String_Node_Str",int.class);
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,null,1));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,"String_Node_Str",1));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,new Object(),1));
    method=String.class.getMethod("String_Node_Str");
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,"String_Node_Str"));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,new Object()));
  }
 catch (  Exception e) {
    assertTrue(e instanceof RuntimeException);
  }
  List<String> list=CollectionUtil.createArrayList();
  try {
    method=ArrayList.class.getDeclaredMethod("String_Node_Str",int.class);
    ReflectionUtil.invokeMethod(method,list,Integer.MAX_VALUE);
  }
 catch (  Exception e) {
    InvocationTargetException ex=(InvocationTargetException)e.getCause();
    assertTrue(ex.getTargetException() instanceof IndexOutOfBoundsException);
  }
  try {
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod("String_Node_Str","String_Node_Str",null));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(new Object(),"String_Node_Str",null));
  }
 catch (  Exception e) {
    assertTrue(e instanceof RuntimeException);
  }
  list=CollectionUtil.createArrayList();
  try {
    ReflectionUtil.invokeMethod(list,"String_Node_Str",new Object[]{Integer.MAX_VALUE},int.class);
  }
 catch (  Exception e) {
    InvocationTargetException ex=(InvocationTargetException)e.getCause();
    assertTrue(ex.getTargetException() instanceof IndexOutOfBoundsException);
  }
}

Fixed version (ground truth):
@Test public void invokeMethod(){
  assertNull(ReflectionUtil.invokeMethod(null,null));
  assertNull(ReflectionUtil.invokeMethod(null,new Object(),new Object()));
  assertNull(ReflectionUtil.invokeMethod(null,new Object()));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,null));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,(Object[])null,(Class<?>)null));
  assertNull(ReflectionUtil.invokeMethod("String_Node_Str",(String)null,(Object[])null,(Class<?>)null));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,new Object[]{},(Class<?>)null));
  assertNull(ReflectionUtil.invokeMethod((Object)null,(String)null,(Object[])null,Emptys.EMPTY_CLASS_ARRAY));
  assertNull(ReflectionUtil.invokeMethod(null,new Object(),new Object()));
  assertNull(ReflectionUtil.invokeMethod(null,new Object()));
  Method method=null;
  try {
    method=String.class.getMethod("String_Node_Str",int.class);
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,null,1));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,"String_Node_Str",1));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,new Object(),1));
    method=String.class.getMethod("String_Node_Str");
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,"String_Node_Str"));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(method,new Object()));
  }
 catch (  Exception e) {
    assertTrue(e instanceof RuntimeException);
  }
  List<String> list=CollectionUtil.createArrayList();
  try {
    method=ArrayList.class.getDeclaredMethod("String_Node_Str",int.class);
    ReflectionUtil.invokeMethod(method,list,Integer.MAX_VALUE);
  }
 catch (  Exception e) {
    InvocationTargetException ex=(InvocationTargetException)e.getCause();
    if (ex != null) {
      assertTrue(ex.getTargetException() instanceof IndexOutOfBoundsException);
    }
  }
  try {
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod("String_Node_Str","String_Node_Str",null));
    assertEquals("String_Node_Str",ReflectionUtil.invokeMethod(new Object(),"String_Node_Str",null));
  }
 catch (  Exception e) {
    assertTrue(e instanceof RuntimeException);
  }
  list=CollectionUtil.createArrayList();
  try {
    ReflectionUtil.invokeMethod(list,"String_Node_Str",new Object[]{Integer.MAX_VALUE},int.class);
  }
 catch (  Exception e) {
    if (e.getCause() instanceof NoSuchMethodException) {
    }
 else {
      InvocationTargetException ex=(InvocationTargetException)e.getCause();
      assertTrue(ex.getTargetException() instanceof IndexOutOfBoundsException);
    }
  }
}