Program: 177241
Project: 177241
Buggy source:
public Map<Class<? extends Event>,Set<ListenerRegistration>> createRegisteredListeners(final Listener listener,Object plugin){
  Map<Class<? extends Event>,Set<ListenerRegistration>> ret=new HashMap<>();
  List<Method> methods=new ArrayList<>();
  Class<?> listenerClass=listener.getClass();
  while (listenerClass != null && !listenerClass.equals(Object.class) && !listenerClass.equals(Listener.class)) {
    try {
      methods.addAll(Arrays.asList(listenerClass.getDeclaredMethods()));
    }
 catch (    NoClassDefFoundError e) {
      LOGGER.severe("String_Node_Str" + plugin.getClass().getSimpleName() + "String_Node_Str"+ e.getMessage()+ "String_Node_Str"+ listenerClass);
      return ret;
    }
    listenerClass=listenerClass.getSuperclass();
  }
  for (  final Method method : methods) {
    final EventHandler eh=method.getAnnotation(EventHandler.class);
    if (eh == null) {
      continue;
    }
    if (method.getParameterTypes().length < 1) {
      LOGGER.severe("String_Node_Str");
      continue;
    }
    final Class<?> checkClass=method.getParameterTypes()[0];
    Class<? extends Event> eventClass;
    if (!Event.class.isAssignableFrom(checkClass) || method.getParameterTypes().length != 1) {
      LOGGER.severe("String_Node_Str");
      continue;
    }
    eventClass=checkClass.asSubclass(Event.class);
    method.setAccessible(true);
    Set<ListenerRegistration> eventSet=ret.get(eventClass);
    if (eventSet == null) {
      eventSet=new HashSet<>();
      ret.put(eventClass,eventSet);
    }
    eventSet.add(new ListenerRegistration(new EventExecutor(){
      @Override public void execute(      Event event) throws EventException {
        try {
          if (!checkClass.isAssignableFrom(event.getClass())) {
            throw new EventException("String_Node_Str");
          }
          method.invoke(listener,event);
        }
 catch (        InvocationTargetException e) {
          if (e.getCause() instanceof EventException) {
            throw (EventException)e.getCause();
          }
          throw new EventException(e.getCause());
        }
catch (        Throwable t) {
          throw new EventException(t);
        }
      }
    }
,eh.order(),plugin));
  }
  return ret;
}

Fixed version (ground truth):
public Map<Class<? extends Event>,Set<ListenerRegistration>> createRegisteredListeners(final Listener listener,Object plugin){
  Map<Class<? extends Event>,Set<ListenerRegistration>> ret=new HashMap<>();
  List<Method> methods=new ArrayList<>();
  Class<?> listenerClass=listener.getClass();
  while (listenerClass != null && !listenerClass.equals(Object.class) && !listenerClass.equals(Listener.class)) {
    try {
      methods.addAll(Arrays.asList(listenerClass.getDeclaredMethods()));
    }
 catch (    NoClassDefFoundError e) {
      LOGGER.severe("String_Node_Str" + plugin.getClass().getSimpleName() + "String_Node_Str"+ e.getMessage()+ "String_Node_Str"+ listenerClass);
      return ret;
    }
    listenerClass=listenerClass.getSuperclass();
  }
  for (  final Method method : methods) {
    final EventHandler eh=method.getAnnotation(EventHandler.class);
    if (eh == null) {
      continue;
    }
    if (method.getParameterTypes().length < 1) {
      LOGGER.severe("String_Node_Str");
      continue;
    }
    final Class<?> checkClass=method.getParameterTypes()[0];
    Class<? extends Event> eventClass;
    if (!Event.class.isAssignableFrom(checkClass) || method.getParameterTypes().length != 1) {
      LOGGER.severe("String_Node_Str");
      continue;
    }
    eventClass=checkClass.asSubclass(Event.class);
    method.setAccessible(true);
    Set<ListenerRegistration> eventSet=ret.get(eventClass);
    if (eventSet == null) {
      eventSet=new HashSet<>();
      ret.put(eventClass,eventSet);
    }
    eventSet.add(new ListenerRegistration(new MethodEventExecutor(checkClass,listener,method,eh),eh.order(),plugin));
  }
  return ret;
}