Program: 80558
Project: 80558
Buggy source:
/** 
 * 用回调的方式，遍历一个对象，可以支持遍历 <ul> <li>数组 <li>集合 <li>Map <li>单一元素 </ul>
 * @param obj 对象
 * @param callback 回调
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>void each(Object obj,Each<T> callback){
  if (null == obj || null == callback)   return;
  try {
    Class<T> eType=Mirror.getTypeParam(callback.getClass(),0);
    if (obj.getClass().isArray()) {
      int len=Array.getLength(obj);
      for (int i=0; i < len; i++)       try {
        callback.invoke(i,(T)Array.get(obj,i),len);
      }
 catch (      ContinueLoop e) {
      }
catch (      ExitLoop e) {
        break;
      }
    }
 else     if (obj instanceof Collection) {
      int len=((Collection)obj).size();
      int i=0;
      for (Iterator<T> it=((Collection)obj).iterator(); it.hasNext(); )       try {
        callback.invoke(i++,it.next(),len);
      }
 catch (      ContinueLoop e) {
      }
catch (      ExitLoop e) {
        break;
      }
    }
 else     if (obj instanceof Map) {
      Map map=(Map)obj;
      int len=map.size();
      int i=0;
      if (null != eType && eType != Object.class && eType.isAssignableFrom(Entry.class)) {
        for (        Object v : map.entrySet())         try {
          callback.invoke(i++,(T)v,len);
        }
 catch (        ContinueLoop e) {
        }
catch (        ExitLoop e) {
          break;
        }
      }
 else {
        for (        Object v : map.entrySet())         try {
          callback.invoke(i++,(T)((Entry)v).getValue(),len);
        }
 catch (        ContinueLoop e) {
        }
catch (        ExitLoop e) {
          break;
        }
      }
    }
 else     if (obj instanceof Iterator<?>) {
      Iterator<?> it=(Iterator<?>)obj;
      int i=0;
      while (it.hasNext()) {
        try {
          callback.invoke(i++,(T)it.next(),-1);
        }
 catch (        ContinueLoop e) {
        }
catch (        ExitLoop e) {
          break;
        }
      }
    }
 else     try {
      callback.invoke(0,(T)obj,1);
    }
 catch (    ContinueLoop e) {
    }
catch (    ExitLoop e) {
    }
  }
 catch (  LoopException e) {
    throw Lang.wrapThrow(e.getCause());
  }
}

Fixed version (ground truth):
/** 
 * 用回调的方式，遍历一个对象，可以支持遍历 <ul> <li>数组 <li>集合 <li>Map <li>单一元素 </ul>
 * @param obj 对象
 * @param callback 回调
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>void each(Object obj,Each<T> callback){
  if (null == obj || null == callback)   return;
  try {
    if (callback instanceof Loop)     if (!((Loop)callback).begin())     return;
    Class<T> eType=Mirror.getTypeParam(callback.getClass(),0);
    if (obj.getClass().isArray()) {
      int len=Array.getLength(obj);
      for (int i=0; i < len; i++)       try {
        callback.invoke(i,(T)Array.get(obj,i),len);
      }
 catch (      ContinueLoop e) {
      }
catch (      ExitLoop e) {
        break;
      }
    }
 else     if (obj instanceof Collection) {
      int len=((Collection)obj).size();
      int i=0;
      for (Iterator<T> it=((Collection)obj).iterator(); it.hasNext(); )       try {
        callback.invoke(i++,it.next(),len);
      }
 catch (      ContinueLoop e) {
      }
catch (      ExitLoop e) {
        break;
      }
    }
 else     if (obj instanceof Map) {
      Map map=(Map)obj;
      int len=map.size();
      int i=0;
      if (null != eType && eType != Object.class && eType.isAssignableFrom(Entry.class)) {
        for (        Object v : map.entrySet())         try {
          callback.invoke(i++,(T)v,len);
        }
 catch (        ContinueLoop e) {
        }
catch (        ExitLoop e) {
          break;
        }
      }
 else {
        for (        Object v : map.entrySet())         try {
          callback.invoke(i++,(T)((Entry)v).getValue(),len);
        }
 catch (        ContinueLoop e) {
        }
catch (        ExitLoop e) {
          break;
        }
      }
    }
 else     if (obj instanceof Iterator<?>) {
      Iterator<?> it=(Iterator<?>)obj;
      int i=0;
      while (it.hasNext()) {
        try {
          callback.invoke(i++,(T)it.next(),-1);
        }
 catch (        ContinueLoop e) {
        }
catch (        ExitLoop e) {
          break;
        }
      }
    }
 else     try {
      callback.invoke(0,(T)obj,1);
    }
 catch (    ContinueLoop e) {
    }
catch (    ExitLoop e) {
    }
    if (callback instanceof Loop)     ((Loop)callback).end();
  }
 catch (  LoopException e) {
    throw Lang.wrapThrow(e.getCause());
  }
}