Program: 60299
Project: 60299
Buggy source:
private void processMapType(Object obj) throws IllegalArgumentException, IllegalAccessException {
  ParameterizedType paramType=(ParameterizedType)field.getGenericType();
  Type[] types=paramType.getActualTypeArguments();
  boolean isArray=false;
  boolean isCollection=false;
  boolean isPrimitive=false;
  Class vType=null;
  Class elementType=null;
  if (types[1] instanceof GenericArrayType) {
    isArray=true;
    GenericArrayType g=(GenericArrayType)types[1];
    elementType=(Class)g.getGenericComponentType();
  }
 else   if (types[1] instanceof ParameterizedType) {
    isCollection=true;
    ParameterizedType p=(ParameterizedType)types[1];
    vType=(Class)p.getRawType();
    elementType=(Class)p.getActualTypeArguments()[0];
  }
 else {
    isPrimitive=true;
  }
  if (isArray) {
    Map src=(Map)value;
    Map map=new HashMap();
    Set<Entry> entrySet=src.entrySet();
    for (    Entry entry : entrySet) {
      Object k=entry.getKey();
      List v=(ArrayList)entry.getValue();
      Object arr=convertToArrayValue(elementType,v);
      map.put(k,arr);
    }
    field.set(obj,map);
  }
 else   if (isCollection) {
    if (DataType.isListType(vType)) {
      Map src=(Map)value;
      Map map=new HashMap();
      Set<Entry> entrySet=src.entrySet();
      for (      Entry entry : entrySet) {
        Object k=entry.getKey();
        List v=(ArrayList)entry.getValue();
        List list=new ArrayList();
        moveCollectionElement(elementType,v,list);
        map.put(k,list);
      }
      field.set(obj,map);
    }
 else     if (DataType.isSetType(vType)) {
      Map src=(Map)value;
      Map map=new HashMap();
      Set<Entry> entrySet=src.entrySet();
      for (      Entry entry : entrySet) {
        Object k=entry.getKey();
        List v=(ArrayList)entry.getValue();
        Set set=new HashSet();
        moveCollectionElement(elementType,v,set);
        map.put(k,set);
      }
      field.set(obj,map);
    }
 else     if (DataType.isQueueType(vType)) {
      Map src=(Map)value;
      Map map=new HashMap();
      Set<Entry> entrySet=src.entrySet();
      for (      Entry entry : entrySet) {
        Object k=entry.getKey();
        List v=(ArrayList)entry.getValue();
        Queue queue=new LinkedList();
        moveCollectionElement(elementType,v,queue);
        map.put(k,queue);
      }
      field.set(obj,map);
    }
  }
 else   if (isPrimitive) {
    field.set(obj,value);
  }
}

Fixed version (ground truth):
private void processMapType(Object obj) throws IllegalArgumentException, IllegalAccessException {
  ParameterizedType paramType=(ParameterizedType)field.getGenericType();
  Type[] types=paramType.getActualTypeArguments();
  boolean isArray=false;
  boolean isCollection=false;
  boolean isPrimitive=false;
  Class vType=null;
  Class elementType=null;
  if (types[1] instanceof GenericArrayType) {
    isArray=true;
    GenericArrayType g=(GenericArrayType)types[1];
    elementType=(Class)g.getGenericComponentType();
  }
 else   if (types[1] instanceof ParameterizedType) {
    isCollection=true;
    ParameterizedType p=(ParameterizedType)types[1];
    vType=(Class)p.getRawType();
    elementType=(Class)p.getActualTypeArguments()[0];
  }
 else {
    Class<?> actualType=FieldUtil.getClassOfType(types[1]);
    if (actualType.isArray()) {
      isArray=true;
      elementType=actualType.getComponentType();
    }
 else {
      isPrimitive=true;
    }
  }
  if (isArray) {
    Map src=(Map)value;
    Map map=new HashMap();
    Set<Entry> entrySet=src.entrySet();
    for (    Entry entry : entrySet) {
      Object k=entry.getKey();
      List v=(ArrayList)entry.getValue();
      Object arr=convertToArrayValue(elementType,v);
      map.put(k,arr);
    }
    field.set(obj,map);
  }
 else   if (isCollection) {
    if (DataType.isListType(vType)) {
      Map src=(Map)value;
      Map map=new HashMap();
      Set<Entry> entrySet=src.entrySet();
      for (      Entry entry : entrySet) {
        Object k=entry.getKey();
        List v=(ArrayList)entry.getValue();
        List list=new ArrayList();
        moveCollectionElement(elementType,v,list);
        map.put(k,list);
      }
      field.set(obj,map);
    }
 else     if (DataType.isSetType(vType)) {
      Map src=(Map)value;
      Map map=new HashMap();
      Set<Entry> entrySet=src.entrySet();
      for (      Entry entry : entrySet) {
        Object k=entry.getKey();
        List v=(ArrayList)entry.getValue();
        Set set=new HashSet();
        moveCollectionElement(elementType,v,set);
        map.put(k,set);
      }
      field.set(obj,map);
    }
 else     if (DataType.isQueueType(vType)) {
      Map src=(Map)value;
      Map map=new HashMap();
      Set<Entry> entrySet=src.entrySet();
      for (      Entry entry : entrySet) {
        Object k=entry.getKey();
        List v=(ArrayList)entry.getValue();
        Queue queue=new LinkedList();
        moveCollectionElement(elementType,v,queue);
        map.put(k,queue);
      }
      field.set(obj,map);
    }
  }
 else   if (isPrimitive) {
    field.set(obj,value);
  }
}