Program: 17056
Project: 17056
Buggy source:
/** 
 * Tests private   {@link OptimalCECPMain#permuteArray(Object[],int)}
 * @throws Exception
 */
public void testPermuteArray() throws Exception {
  Method permuteArray=OptimalCECPMain.class.getDeclaredMethod("String_Node_Str",Object[].class,int.class);
  permuteArray.setAccessible(true);
  String[] arr0=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] arr1=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] arr5=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] arrP;
  arrP=Arrays.copyOf(arr0,arr0.length);
  assertTrue("String_Node_Str",Arrays.deepEquals(arr0,arrP));
  permuteArray.invoke(null,arrP,1);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr1,arrP));
  arrP=Arrays.copyOf(arr0,arr0.length);
  permuteArray.invoke(null,arrP,5);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr5,arrP));
  arrP=Arrays.copyOf(arr0,arr0.length);
  permuteArray.invoke(null,arrP,-1);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr5,arrP));
  try {
    arrP=Arrays.copyOf(arr0,arr0.length);
    permuteArray.invoke(null,arrP,6);
    fail("String_Node_Str");
  }
 catch (  InvocationTargetException e) {
    if (!(e.getCause() instanceof ArrayIndexOutOfBoundsException)) {
      throw e;
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests private   {@link OptimalCECPMain#permuteArray(Object[],int)}
 * @throws Exception
 */
public void testPermuteArray() throws Exception {
  Method permuteArray=OptimalCECPMain.class.getDeclaredMethod("String_Node_Str",Object[].class,int.class);
  permuteArray.setAccessible(true);
  String[] arr0=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] arr1=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] arr5=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  String[] arrP;
  arrP=Arrays.copyOf(arr0,arr0.length);
  assertTrue("String_Node_Str",Arrays.deepEquals(arr0,arrP));
  permuteArray.invoke(null,arrP,0);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr0,arrP));
  arrP=Arrays.copyOf(arr0,arr0.length);
  permuteArray.invoke(null,arrP,1);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr1,arrP));
  arrP=Arrays.copyOf(arr0,arr0.length);
  permuteArray.invoke(null,arrP,5);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr5,arrP));
  arrP=Arrays.copyOf(arr0,arr0.length);
  permuteArray.invoke(null,arrP,-1);
  assertTrue(String.format("String_Node_Str",(Object[])arrP),Arrays.deepEquals(arr5,arrP));
  try {
    arrP=Arrays.copyOf(arr0,arr0.length);
    permuteArray.invoke(null,arrP,6);
    fail("String_Node_Str");
  }
 catch (  InvocationTargetException e) {
    if (!(e.getCause() instanceof ArrayIndexOutOfBoundsException)) {
      throw e;
    }
  }
}