Program: 43555
Project: 43555
Buggy source:
private void reload(){
  HashMap<Class<?>,Method> settingMap=new HashMap<Class<?>,Method>();
  for (  Method m1 : setting.getClass().getMethods()) {
    Class<?>[] pts=m1.getParameterTypes();
    if (pts.length == 1 && Castor.class.isAssignableFrom(pts[0]))     settingMap.put(pts[0],m1);
  }
  this.map=new HashMap<String,Map<String,Castor<?,?>>>();
  for (Iterator<Class<?>> it=paths.iterator(); it.hasNext(); ) {
    Class<?> baseClass=it.next();
    if (baseClass == null)     continue;
    List<Class<?>> list=Scans.me().scanPackage(baseClass);
    if (null == list || list.size() == 0)     continue;
    for (    Class<?> klass : list) {
      try {
        if (Modifier.isAbstract(klass.getModifiers()))         continue;
        if (!Castor.class.isAssignableFrom(klass))         continue;
        Castor<?,?> castor=(Castor<?,?>)klass.newInstance();
        Map<String,Castor<?,?>> map2=this.map.get(castor.getFromClass().getName());
        if (null == map2) {
          map2=new HashMap<String,Castor<?,?>>();
          this.map.put(castor.getFromClass().getName(),map2);
        }
        if (!map2.containsKey(castor.getToClass().getName())) {
          Method m=settingMap.get(castor.getClass());
          if (null == m) {
            for (            Entry<Class<?>,Method> entry : settingMap.entrySet()) {
              Class<?> cc=entry.getKey();
              if (cc.isAssignableFrom(klass)) {
                m=settingMap.get(cc);
                break;
              }
            }
          }
          if (null != m)           m.invoke(setting,castor);
          map2.put(castor.getToClass().getName(),castor);
        }
      }
 catch (      Throwable e) {
        if (log.isWarnEnabled())         log.warnf("String_Node_Str",klass,e.getMessage());
      }
    }
  }
}

Fixed version (ground truth):
private void reload(){
  HashMap<Class<?>,Method> settingMap=new HashMap<Class<?>,Method>();
  for (  Method m1 : setting.getClass().getMethods()) {
    Class<?>[] pts=m1.getParameterTypes();
    if (pts.length == 1 && Castor.class.isAssignableFrom(pts[0]))     settingMap.put(pts[0],m1);
  }
  this.map=new HashMap<String,Map<String,Castor<?,?>>>();
  for (Iterator<Class<?>> it=paths.iterator(); it.hasNext(); ) {
    Class<?> baseClass=it.next();
    if (baseClass == null)     continue;
    List<Class<?>> list=Scans.me().scanPackage(baseClass);
    if (null == list || list.size() == 0)     continue;
    for (    Class<?> klass : list) {
      try {
        if (Modifier.isAbstract(klass.getModifiers()))         continue;
        if (!Castor.class.isAssignableFrom(klass))         continue;
        Castor<?,?> castor=(Castor<?,?>)klass.newInstance();
        Map<String,Castor<?,?>> map2=this.map.get(castor.getFromClass().getName());
        if (null == map2) {
          map2=new HashMap<String,Castor<?,?>>();
          this.map.put(castor.getFromClass().getName(),map2);
        }
        if (!map2.containsKey(castor.getToClass().getName())) {
          Method m=settingMap.get(castor.getClass());
          if (null == m) {
            for (            Entry<Class<?>,Method> entry : settingMap.entrySet()) {
              Class<?> cc=entry.getKey();
              if (cc.isAssignableFrom(klass)) {
                m=settingMap.get(cc);
                break;
              }
            }
          }
          if (null != m)           m.invoke(setting,castor);
          map2.put(castor.getToClass().getName(),castor);
        }
      }
 catch (      Throwable e) {
        if (log.isWarnEnabled())         log.warnf("String_Node_Str",klass,e.getMessage());
      }
    }
  }
  if (log.isDebugEnabled())   log.debugf("String_Node_Str",map.size());
  if (map.size() == 0 && log.isErrorEnabled())   log.error("String_Node_Str");
}