Program: 52136
Project: 52136
Buggy source:
public Record convert(String shortName,Object bean) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  Record publication=new SubmissionLookupPublication(shortName);
  Field[] fields=bean.getClass().getDeclaredFields();
  for (  Field field : fields) {
    if (field.getType() == String.class) {
      Method getter=bean.getClass().getMethod("String_Node_Str" + field.getName().substring(0,1).toUpperCase() + field.getName().substring(1));
      String value=(String)getter.invoke(bean);
      addMetadata(shortName,publication,field.getName(),value);
    }
 else     if (field.getType() == List.class) {
      ParameterizedType pt=(ParameterizedType)field.getGenericType();
      Method getter=bean.getClass().getMethod("String_Node_Str" + field.getName().substring(0,1).toUpperCase() + field.getName().substring(1));
      ParameterizedType stringListType=(ParameterizedType)field.getGenericType();
      Class<?> stringListClass=(Class<?>)stringListType.getActualTypeArguments()[0];
      if (String.class.isAssignableFrom(stringListClass)) {
        List<String> values=(List<String>)getter.invoke(bean);
        if (values != null) {
          for (          String value : values) {
            addMetadata(shortName,publication,field.getName(),value);
          }
        }
      }
 else {
        List<String[]> values=(List<String[]>)getter.invoke(bean);
        if (values != null) {
          for (          String[] nvalue : values) {
            String value=nvalue[1] + "String_Node_Str" + nvalue[0];
            addMetadata(shortName,publication,field.getName(),value);
          }
        }
      }
    }
  }
  return publication;
}

Fixed version (ground truth):
public Record convert(String shortName,Object bean) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  Record publication=new SubmissionLookupPublication(shortName);
  Field[] fields=bean.getClass().getDeclaredFields();
  for (  Field field : fields) {
    if (field.getType() == String.class) {
      Method getter=bean.getClass().getMethod("String_Node_Str" + field.getName().substring(0,1).toUpperCase() + field.getName().substring(1));
      String value=(String)getter.invoke(bean);
      addMetadata(shortName,publication,field.getName(),value);
    }
 else     if (field.getType() == List.class) {
      ParameterizedType pt=(ParameterizedType)field.getGenericType();
      Method getter=bean.getClass().getMethod("String_Node_Str" + field.getName().substring(0,1).toUpperCase() + field.getName().substring(1));
      if (pt.getActualTypeArguments()[0] instanceof GenericArrayType) {
        List<String[]> values=(List<String[]>)getter.invoke(bean);
        if (values != null) {
          for (          String[] nvalue : values) {
            String value=nvalue[1] + "String_Node_Str" + nvalue[0];
            addMetadata(shortName,publication,field.getName(),value);
          }
        }
      }
 else {
        List<String> values=(List<String>)getter.invoke(bean);
        if (values != null) {
          for (          String value : values) {
            addMetadata(shortName,publication,field.getName(),value);
          }
        }
      }
    }
  }
  return publication;
}