Program: 161990
Project: 161990
Buggy source:
public final Object deepCopyArray(Object origFieldValue,IdentityHashMap<Object,Object> visited){
  if (visited.containsKey(origFieldValue)) {
    return visited.get(origFieldValue);
  }
  final Class<?> componentType=origFieldValue.getClass().getComponentType();
  Object result=null;
  if (componentType.getName().length() <= 7) {
    if (java.lang.Boolean.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((boolean[])origFieldValue,((boolean[])origFieldValue).length);
    }
 else     if (java.lang.Byte.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((byte[])origFieldValue,((byte[])origFieldValue).length);
    }
 else     if (java.lang.Character.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((char[])origFieldValue,((char[])origFieldValue).length);
    }
 else     if (java.lang.Short.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((short[])origFieldValue,((short[])origFieldValue).length);
    }
 else     if (java.lang.Integer.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((int[])origFieldValue,((int[])origFieldValue).length);
    }
 else     if (java.lang.Long.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((long[])origFieldValue,((long[])origFieldValue).length);
    }
 else     if (java.lang.Float.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((float[])origFieldValue,((float[])origFieldValue).length);
    }
 else     if (java.lang.Double.TYPE.isAssignableFrom(componentType)) {
      result=Arrays.copyOf((double[])origFieldValue,((double[])origFieldValue).length);
    }
  }
  if (result == null) {
    Object[] array=Arrays.copyOf((Object[])origFieldValue,((Object[])origFieldValue).length);
    if (array.length > 0) {
      if (componentType.isArray()) {
        for (int i=0; i < array.length; i++) {
          array[i]=deepCopyArray(array[i],visited);
        }
      }
 else {
        for (int i=0; i < array.length; i++) {
          Object component=deepCopy(origFieldValue,visited);
          array[i]=component;
        }
      }
    }
    result=array;
  }
  visited.put(origFieldValue,result);
  return result;
}

Fixed version (ground truth):
public final Object deepCopyArray(Object origFieldValue,IdentityHashMap<Object,Object> visited){
  if (visited.containsKey(origFieldValue)) {
    return visited.get(origFieldValue);
  }
  final Class<?> componentType=origFieldValue.getClass().getComponentType();
  Object result=null;
  if (componentType.getName().length() <= 7) {
    if (java.lang.Boolean.TYPE == componentType) {
      result=Arrays.copyOf((boolean[])origFieldValue,((boolean[])origFieldValue).length);
    }
 else     if (java.lang.Byte.TYPE == componentType) {
      result=Arrays.copyOf((byte[])origFieldValue,((byte[])origFieldValue).length);
    }
 else     if (java.lang.Character.TYPE == componentType) {
      result=Arrays.copyOf((char[])origFieldValue,((char[])origFieldValue).length);
    }
 else     if (java.lang.Short.TYPE == componentType) {
      result=Arrays.copyOf((short[])origFieldValue,((short[])origFieldValue).length);
    }
 else     if (java.lang.Integer.TYPE == componentType) {
      result=Arrays.copyOf((int[])origFieldValue,((int[])origFieldValue).length);
    }
 else     if (java.lang.Long.TYPE == componentType) {
      result=Arrays.copyOf((long[])origFieldValue,((long[])origFieldValue).length);
    }
 else     if (java.lang.Float.TYPE == componentType) {
      result=Arrays.copyOf((float[])origFieldValue,((float[])origFieldValue).length);
    }
 else     if (java.lang.Double.TYPE == componentType) {
      result=Arrays.copyOf((double[])origFieldValue,((double[])origFieldValue).length);
    }
  }
  if (result == null) {
    Object[] array=Arrays.copyOf((Object[])origFieldValue,((Object[])origFieldValue).length);
    if (array.length > 0) {
      if (componentType.isArray()) {
        for (int i=0; i < array.length; i++) {
          array[i]=deepCopyArray(array[i],visited);
        }
      }
 else {
        for (int i=0; i < array.length; i++) {
          Object component=deepCopy(array[i],visited);
          array[i]=component;
        }
      }
    }
    result=array;
  }
  visited.put(origFieldValue,result);
  return result;
}