Program: 14870
Project: 14870
Buggy source:
@Override public boolean apply(T arg0){
  Context ctx=Contexts.lookup();
  if (ctx.hasAdministrativePrivileges()) {
    return true;
  }
 else {
    Class<? extends BaseMessage> msgType=ctx.getRequest().getClass();
    Class<?> rscType=arg0.getClass();
    Ats ats=Ats.inClassHierarchy(rscType);
    Ats msgAts=Ats.inClassHierarchy(msgType);
    if (!ats.has(PolicyVendor.class) && !msgAts.has(PolicyVendor.class)) {
      throw new IllegalArgumentException("String_Node_Str" + arg0.toString() + "String_Node_Str"+ rscType.getCanonicalName()+ "String_Node_Str"+ msgType.getCanonicalName());
    }
 else     if (!ats.has(PolicyResourceType.class) && !msgAts.has(PolicyResourceType.class)) {
      throw new IllegalArgumentException("String_Node_Str" + arg0.toString() + "String_Node_Str"+ rscType.getCanonicalName()+ "String_Node_Str"+ msgType.getCanonicalName());
    }
 else {
      PolicyVendor vendor=ats.get(PolicyVendor.class);
      PolicyResourceType type=ats.get(PolicyResourceType.class);
      String action=PolicySpec.requestToAction(ctx.getRequest());
      if (action == null) {
        action=ctx.getRequest().getClass().getSimpleName().replaceAll("String_Node_Str","String_Node_Str").toLowerCase();
      }
      User requestUser=ctx.getUser();
      try {
        Account owningAccount=Principals.nobodyFullName().getAccountNumber().equals(arg0.getOwner().getAccountNumber()) ? null : Accounts.lookupAccountByName(arg0.getOwner().getAccountName());
        return Permissions.isAuthorized(vendor.value(),type.value(),arg0.getDisplayName(),owningAccount,action,requestUser);
      }
 catch (      AuthException ex) {
        return false;
      }
    }
  }
}

Fixed version (ground truth):
@Override public boolean apply(T arg0){
  Context ctx=Contexts.lookup();
  if (ctx.hasAdministrativePrivileges()) {
    return true;
  }
 else {
    Class<? extends BaseMessage> msgType=ctx.getRequest().getClass();
    Class<?> rscType=arg0.getClass();
    Ats ats=Ats.inClassHierarchy(rscType);
    Ats msgAts=Ats.inClassHierarchy(msgType);
    if (!ats.has(PolicyVendor.class) && !msgAts.has(PolicyVendor.class)) {
      throw new IllegalArgumentException("String_Node_Str" + arg0.toString() + "String_Node_Str"+ rscType.getCanonicalName()+ "String_Node_Str"+ msgType.getCanonicalName());
    }
 else     if (!ats.has(PolicyResourceType.class) && !msgAts.has(PolicyResourceType.class)) {
      throw new IllegalArgumentException("String_Node_Str" + arg0.toString() + "String_Node_Str"+ rscType.getCanonicalName()+ "String_Node_Str"+ msgType.getCanonicalName());
    }
 else {
      PolicyVendor vendor=ats.get(PolicyVendor.class);
      PolicyResourceType type=ats.get(PolicyResourceType.class);
      String action=PolicySpec.requestToAction(ctx.getRequest());
      if (action == null) {
        action=ctx.getRequest().getClass().getSimpleName().replaceAll("String_Node_Str","String_Node_Str").toLowerCase();
      }
      User requestUser=ctx.getUser();
      try {
        Account owningAccount=null;
        if (!ignoreOwningAccount) {
          owningAccount=Principals.nobodyFullName().getAccountNumber().equals(arg0.getOwner().getAccountNumber()) ? null : Accounts.lookupAccountByName(arg0.getOwner().getAccountName());
        }
        return Permissions.isAuthorized(vendor.value(),type.value(),arg0.getDisplayName(),owningAccount,action,requestUser);
      }
 catch (      AuthException ex) {
        return false;
      }
    }
  }
}