Program: 36438
Project: 36438
Buggy source:
/** 
 * Dispatches an event. The manner in which the event is dispatched depends upon the type of the event and the type of the event's source object: <p> </p> <table border=1 summary="Event types, source types, and dispatch methods"> <tr> <th>Event Type</th> <th>Source Type</th> <th>Dispatched To</th> </tr> <tr> <td>ActiveEvent</td> <td>Any</td> <td>event.dispatch()</td> </tr> <tr> <td>Other</td> <td>Component</td> <td>source.dispatchEvent(AWTEvent)</td> </tr> <tr> <td>Other</td> <td>MenuComponent</td> <td>source.dispatchEvent(AWTEvent)</td> </tr> <tr> <td>Other</td> <td>Other</td> <td>No action (ignored)</td> </tr> </table> <p> </p>
 * @param event an instance of <code>java.awt.AWTEvent</code>,or a subclass of it
 * @throws NullPointerException if <code>event</code> is <code>null</code>
 * @since           1.2
 */
protected void dispatchEvent(final AWTEvent event){
  final Object src=event.getSource();
  final PrivilegedAction<Void> action=new PrivilegedAction<Void>(){
    public Void run(){
      if (fwDispatcher == null || isDispatchThreadImpl()) {
        dispatchEventImpl(event,src);
      }
 else {
        fwDispatcher.scheduleDispatch(new Runnable(){
          @Override public void run(){
            dispatchEventImpl(event,src);
          }
        }
);
      }
      return null;
    }
  }
;
  final AccessControlContext stack=AccessController.getContext();
  final AccessControlContext srcAcc=getAccessControlContextFrom(src);
  final AccessControlContext eventAcc=event.getAccessControlContext();
  if (srcAcc == null) {
    javaSecurityAccess.doIntersectionPrivilege(action,stack,eventAcc);
  }
 else {
    javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction<Void>(){
      public Void run(){
        javaSecurityAccess.doIntersectionPrivilege(action,eventAcc);
        return null;
      }
    }
,stack,srcAcc);
  }
}

Fixed version (ground truth):
/** 
 * Dispatches an event. The manner in which the event is dispatched depends upon the type of the event and the type of the event's source object: <p> <table border=1 summary="Event types, source types, and dispatch methods"> <tr> <th>Event Type</th> <th>Source Type</th> <th>Dispatched To</th> </tr> <tr> <td>ActiveEvent</td> <td>Any</td> <td>event.dispatch()</td> </tr> <tr> <td>Other</td> <td>Component</td> <td>source.dispatchEvent(AWTEvent)</td> </tr> <tr> <td>Other</td> <td>MenuComponent</td> <td>source.dispatchEvent(AWTEvent)</td> </tr> <tr> <td>Other</td> <td>Other</td> <td>No action (ignored)</td> </tr> </table> <p>
 * @param event an instance of <code>java.awt.AWTEvent</code>,or a subclass of it
 * @throws NullPointerException if <code>event</code> is <code>null</code>
 * @since           1.2
 */
protected void dispatchEvent(final AWTEvent event){
  final Object src=event.getSource();
  final PrivilegedAction<Void> action=new PrivilegedAction<Void>(){
    public Void run(){
      if (fwDispatcher == null || isDispatchThreadImpl()) {
        dispatchEventImpl(event,src);
      }
 else {
        fwDispatcher.scheduleDispatch(new Runnable(){
          @Override public void run(){
            dispatchEventImpl(event,src);
          }
        }
);
      }
      return null;
    }
  }
;
  final AccessControlContext stack=AccessController.getContext();
  final AccessControlContext srcAcc=getAccessControlContextFrom(src);
  final AccessControlContext eventAcc=event.getAccessControlContext();
  if (srcAcc == null) {
    javaSecurityAccess.doIntersectionPrivilege(action,stack,eventAcc);
  }
 else {
    javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction<Void>(){
      public Void run(){
        javaSecurityAccess.doIntersectionPrivilege(action,eventAcc);
        return null;
      }
    }
,stack,srcAcc);
  }
}