Program: 36563
Project: 36563
Buggy source:
/** 
 * Performs the specified   {@code PrivilegedExceptionAction} withprivileges enabled and restricted by the specified {@code AccessControlContext} and with a privilege scope limited byspecified  {@code Permission} arguments.The action is performed with the intersection of the permissions possessed by the caller's protection domain, and those possessed by the domains represented by the specified {@code AccessControlContext}. <p> If the action's   {@code run} method throws an (unchecked) exception,it will propagate through this method. <p> This method preserves the current AccessControlContext's DomainCombiner (which may be null) while the action is performed.
 * @param action the action to be performed.
 * @param context an <i>access control context</i>representing the restriction to be applied to the caller's domain's privileges before performing the specified action.  If the context is {@code null}, then no additional restriction is applied.
 * @param perms the {@code Permission} arguments which limit thescope of the caller's privileges. The number of arguments is variable.
 * @return the value returned by the action's {@code run} method.
 * @throws PrivilegedActionException if the specified action's{@code run} method threw a <i>checked</i> exception
 * @throws NullPointerException if action or perms or any element ofperms is  {@code null}
 * @see #doPrivileged(PrivilegedAction)
 * @see #doPrivileged(PrivilegedAction,AccessControlContext)
 * @see java.security.DomainCombiner
 * @since 1.8
 */
@CallerSensitive public static <T>T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action,AccessControlContext context,Permission... perms) throws PrivilegedActionException {
  AccessControlContext parent=getContext();
  DomainCombiner dc=parent.getCombiner();
  if (dc == null && context != null) {
    dc=context.getCombiner();
  }
  if (perms == null) {
    throw new NullPointerException("String_Node_Str");
  }
  Class<?> caller=Reflection.getCallerClass();
  return AccessController.doPrivileged(action,createWrapper(dc,caller,parent,context,perms));
}

Fixed version (ground truth):
/** 
 * Performs the specified   {@code PrivilegedExceptionAction} withprivileges enabled and restricted by the specified {@code AccessControlContext} and with a privilege scope limited byspecified  {@code Permission} arguments.The action is performed with the intersection of the permissions possessed by the caller's protection domain, and those possessed by the domains represented by the specified {@code AccessControlContext}. <p> If the action's   {@code run} method throws an (unchecked) exception,it will propagate through this method. <p> This method preserves the current AccessControlContext's DomainCombiner (which may be null) while the action is performed.
 * @param < T > the type of the value returned by thePrivilegedExceptionAction's  {@code run} method.
 * @param action the action to be performed.
 * @param context an <i>access control context</i>representing the restriction to be applied to the caller's domain's privileges before performing the specified action.  If the context is {@code null}, then no additional restriction is applied.
 * @param perms the {@code Permission} arguments which limit thescope of the caller's privileges. The number of arguments is variable.
 * @return the value returned by the action's {@code run} method.
 * @throws PrivilegedActionException if the specified action's{@code run} method threw a <i>checked</i> exception
 * @throws NullPointerException if action or perms or any element ofperms is  {@code null}
 * @see #doPrivileged(PrivilegedAction)
 * @see #doPrivileged(PrivilegedAction,AccessControlContext)
 * @see java.security.DomainCombiner
 * @since 1.8
 */
@CallerSensitive public static <T>T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action,AccessControlContext context,Permission... perms) throws PrivilegedActionException {
  AccessControlContext parent=getContext();
  DomainCombiner dc=parent.getCombiner();
  if (dc == null && context != null) {
    dc=context.getCombiner();
  }
  if (perms == null) {
    throw new NullPointerException("String_Node_Str");
  }
  Class<?> caller=Reflection.getCallerClass();
  return AccessController.doPrivileged(action,createWrapper(dc,caller,parent,context,perms));
}