Program: 43529
Project: 43529
Buggy source:
/** 
 * 根据一个 Map，和给定的对象类型，创建一个新的 JAVA 对象
 * @param src Map 对象
 * @param toType JAVA 对象类型
 * @return JAVA 对象
 * @throws FailToCastObjectException
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>T map2Object(Map<?,?> src,Class<T> toType) throws FailToCastObjectException {
  if (null == toType)   throw new FailToCastObjectException("String_Node_Str");
  if (toType == Map.class)   return (T)src;
  if (Map.class.isAssignableFrom(toType)) {
    Map map;
    try {
      map=(Map)toType.newInstance();
      map.putAll(src);
      return (T)map;
    }
 catch (    Exception e) {
      throw new FailToCastObjectException("String_Node_Str",e);
    }
  }
  Mirror<T> mirror=Mirror.me(toType);
  T obj=mirror.born();
  for (  Field field : mirror.getFields()) {
    if (src.containsKey(field.getName())) {
      Object v=src.get(field.getName());
      if (null == v)       continue;
      Class<?> ft=field.getType();
      Object vv=null;
      if (v instanceof Collection) {
        Collection c=(Collection)v;
        if (ft.isArray()) {
          vv=Lang.collection2array(c,ft.getComponentType());
        }
 else {
          Collection newCol;
          Class eleType=Mirror.getGenericTypes(field,0);
          if (ft == List.class) {
            newCol=new ArrayList(c.size());
          }
 else           if (ft == Set.class) {
            newCol=new LinkedHashSet();
          }
 else {
            try {
              newCol=(Collection)ft.newInstance();
            }
 catch (            Exception e) {
              throw Lang.wrapThrow(e);
            }
          }
          for (          Object ele : c) {
            newCol.add(Castors.me().castTo(ele,eleType));
          }
          vv=newCol;
        }
      }
 else       if (v instanceof Map) {
        final Map map;
        if (ft == Map.class) {
          map=new HashMap();
        }
 else {
          try {
            map=(Map)ft.newInstance();
          }
 catch (          Exception e) {
            throw new FailToCastObjectException("String_Node_Str",e);
          }
        }
        final Class<?> valType=Mirror.getGenericTypes(field,1);
        each(v,new Each<Entry>(){
          public void invoke(          int i,          Entry en,          int length){
            map.put(en.getKey(),Castors.me().castTo(en.getValue(),valType));
          }
        }
);
        vv=map;
      }
 else {
        vv=Castors.me().castTo(v,ft);
      }
      mirror.setValue(obj,field,vv);
    }
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * 根据一个 Map，和给定的对象类型，创建一个新的 JAVA 对象
 * @param src Map 对象
 * @param toType JAVA 对象类型
 * @return JAVA 对象
 * @throws FailToCastObjectException
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>T map2Object(Map<?,?> src,Class<T> toType) throws FailToCastObjectException {
  if (null == toType)   throw new FailToCastObjectException("String_Node_Str");
  if (toType == Map.class)   return (T)src;
  if (Map.class.isAssignableFrom(toType)) {
    Map map;
    try {
      map=(Map)toType.newInstance();
      map.putAll(src);
      return (T)map;
    }
 catch (    Exception e) {
      throw new FailToCastObjectException("String_Node_Str",e);
    }
  }
  if (toType.isArray())   return (T)Lang.collection2array(src.values(),toType.getComponentType());
  if (List.class == toType) {
    return (T)Lang.collection2list(src.values());
  }
  Mirror<T> mirror=Mirror.me(toType);
  T obj=mirror.born();
  for (  Field field : mirror.getFields()) {
    if (src.containsKey(field.getName())) {
      Object v=src.get(field.getName());
      if (null == v)       continue;
      Class<?> ft=field.getType();
      Object vv=null;
      if (v instanceof Collection) {
        Collection c=(Collection)v;
        if (ft.isArray()) {
          vv=Lang.collection2array(c,ft.getComponentType());
        }
 else {
          Collection newCol;
          Class eleType=Mirror.getGenericTypes(field,0);
          if (ft == List.class) {
            newCol=new ArrayList(c.size());
          }
 else           if (ft == Set.class) {
            newCol=new LinkedHashSet();
          }
 else {
            try {
              newCol=(Collection)ft.newInstance();
            }
 catch (            Exception e) {
              throw Lang.wrapThrow(e);
            }
          }
          for (          Object ele : c) {
            newCol.add(Castors.me().castTo(ele,eleType));
          }
          vv=newCol;
        }
      }
 else       if (v instanceof Map) {
        final Map map;
        if (ft == Map.class) {
          map=new HashMap();
        }
 else {
          try {
            map=(Map)ft.newInstance();
          }
 catch (          Exception e) {
            throw new FailToCastObjectException("String_Node_Str",e);
          }
        }
        final Class<?> valType=Mirror.getGenericTypes(field,1);
        each(v,new Each<Entry>(){
          public void invoke(          int i,          Entry en,          int length){
            map.put(en.getKey(),Castors.me().castTo(en.getValue(),valType));
          }
        }
);
        vv=map;
      }
 else {
        vv=Castors.me().castTo(v,ft);
      }
      mirror.setValue(obj,field,vv);
    }
  }
  return obj;
}