Program: 167040
Project: 167040
Buggy source:
protected Object convertObjectArrayToPrimitiveArray(Object[] value,int baseType){
  if (value instanceof String[]) {
    return value;
  }
switch (baseType) {
case Types.BIT:
    return copy(value,new boolean[value.length]);
case Types.BOOLEAN:
  return copy(value,new boolean[value.length]);
case Types.TINYINT:
return copyToTinyInt((Integer[])value,new byte[value.length]);
case Types.SMALLINT:
return copyToSmallInt(value,new short[value.length]);
case Types.INTEGER:
return copy(value,new int[value.length]);
case Types.BIGINT:
return copy(value,new long[value.length]);
case Types.REAL:
return copy(value,new float[value.length]);
case Types.DOUBLE:
return copy(value,new double[value.length]);
case Types.VARCHAR:
return copy(value,new String[value.length]);
case Types.TIMESTAMP:
return copyToLocalDateTime((Timestamp[])value,new LocalDateTime[value.length]);
case Types.DATE:
return copyToLocalDate((Date[])value,new LocalDate[value.length]);
case Types.TIME:
return copyToLocalTime((Time[])value,new LocalTime[value.length]);
}
if (value instanceof Integer[]) {
switch (baseType) {
case Types.TINYINT:
return copyToTinyInt((Integer[])value,new byte[value.length]);
case Types.SMALLINT:
return copyToSmallInt(value,new short[value.length]);
default :
return copy(value,new int[value.length]);
}
}
if (value instanceof Long[]) {
return copy(value,new long[value.length]);
}
if (value instanceof Double[]) {
return copy(value,new double[value.length]);
}
if (value instanceof Float[]) {
return copy(value,new float[value.length]);
}
if (value instanceof Boolean[]) {
return copy(value,new boolean[value.length]);
}
if (value instanceof Character[]) {
return copy(value,new char[value.length]);
}
throw new IllegalArgumentException(String.format("String_Node_Str",value.getClass().getComponentType().getName()));
}

Fixed version (ground truth):
protected Object convertObjectArrayToPrimitiveArray(Object[] value,int baseType){
  if (value instanceof String[]) {
    return value;
  }
switch (baseType) {
case Types.BIT:
    return copy(value,new boolean[value.length]);
case Types.BOOLEAN:
  return copy(value,new boolean[value.length]);
case Types.TINYINT:
return copyToTinyInt((Integer[])value,new byte[value.length]);
case Types.SMALLINT:
return copyToSmallInt(value,new short[value.length]);
case Types.INTEGER:
return copy(value,new int[value.length]);
case Types.BIGINT:
return copy(value,new long[value.length]);
case Types.REAL:
return copy(value,new float[value.length]);
case Types.DOUBLE:
return copy(value,new double[value.length]);
case Types.VARCHAR:
return copy(value,new String[value.length]);
case Types.TIMESTAMP:
return copyToLocalDateTime((Timestamp[])value,new LocalDateTime[value.length]);
case 95:
return copyToLocalDateTime(value,new LocalDateTime[value.length]);
case Types.DATE:
return copyToLocalDate((Date[])value,new LocalDate[value.length]);
case Types.TIME:
return copyToLocalTime((Time[])value,new LocalTime[value.length]);
}
if (value instanceof Integer[]) {
switch (baseType) {
case Types.TINYINT:
return copyToTinyInt((Integer[])value,new byte[value.length]);
case Types.SMALLINT:
return copyToSmallInt(value,new short[value.length]);
default :
return copy(value,new int[value.length]);
}
}
if (value instanceof Long[]) {
return copy(value,new long[value.length]);
}
if (value instanceof Double[]) {
return copy(value,new double[value.length]);
}
if (value instanceof Float[]) {
return copy(value,new float[value.length]);
}
if (value instanceof Boolean[]) {
return copy(value,new boolean[value.length]);
}
if (value instanceof Character[]) {
return copy(value,new char[value.length]);
}
throw new IllegalArgumentException(String.format("String_Node_Str",value.getClass().getComponentType().getName()));
}