Program: 193763
Project: 193763
Buggy source:
@Override public void revokeRuntimePermission(String packageName,String name,int userId){
  if (!sUserManager.exists(userId)) {
    Log.e(TAG,"String_Node_Str" + userId);
    return;
  }
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS,"String_Node_Str");
  enforceCrossUserPermission(Binder.getCallingUid(),userId,true,false,"String_Node_Str");
  final int appId;
synchronized (mPackages) {
    final PackageParser.Package pkg=mPackages.get(packageName);
    if (pkg == null) {
      throw new IllegalArgumentException("String_Node_Str" + packageName);
    }
    final BasePermission bp=mSettings.mPermissions.get(name);
    if (bp == null) {
      throw new IllegalArgumentException("String_Node_Str" + name);
    }
    enforceDeclaredAsUsedAndRuntimePermission(pkg,bp);
    SettingBase sb=(SettingBase)pkg.mExtras;
    if (sb == null) {
      throw new IllegalArgumentException("String_Node_Str" + packageName);
    }
    final PermissionsState permissionsState=sb.getPermissionsState();
    final int flags=permissionsState.getPermissionFlags(name,userId);
    if ((flags & PackageManager.FLAG_PERMISSION_SYSTEM_FIXED) != 0) {
      throw new SecurityException("String_Node_Str" + name + "String_Node_Str"+ packageName);
    }
    if (permissionsState.revokeRuntimePermission(bp,userId) == PermissionsState.PERMISSION_OPERATION_FAILURE) {
      return;
    }
    mOnPermissionChangeListeners.onPermissionsChanged(pkg.applicationInfo.uid);
    mSettings.writeRuntimePermissionsForUserLPr(userId,true);
    appId=UserHandle.getAppId(pkg.applicationInfo.uid);
  }
  killUid(appId,userId,KILL_APP_REASON_PERMISSIONS_REVOKED);
}

Fixed version (ground truth):
@Override public void revokeRuntimePermission(String packageName,String name,int userId){
  if (!sUserManager.exists(userId)) {
    Log.e(TAG,"String_Node_Str" + userId);
    return;
  }
  mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS,"String_Node_Str");
  enforceCrossUserPermission(Binder.getCallingUid(),userId,true,false,"String_Node_Str");
  final int appId;
synchronized (mPackages) {
    final PackageParser.Package pkg=mPackages.get(packageName);
    if (pkg == null) {
      throw new IllegalArgumentException("String_Node_Str" + packageName);
    }
    final BasePermission bp=mSettings.mPermissions.get(name);
    if (bp == null) {
      throw new IllegalArgumentException("String_Node_Str" + name);
    }
    enforceDeclaredAsUsedAndRuntimeOrDevelopmentPermission(pkg,bp);
    SettingBase sb=(SettingBase)pkg.mExtras;
    if (sb == null) {
      throw new IllegalArgumentException("String_Node_Str" + packageName);
    }
    final PermissionsState permissionsState=sb.getPermissionsState();
    final int flags=permissionsState.getPermissionFlags(name,userId);
    if ((flags & PackageManager.FLAG_PERMISSION_SYSTEM_FIXED) != 0) {
      throw new SecurityException("String_Node_Str" + name + "String_Node_Str"+ packageName);
    }
    if (bp.isDevelopment()) {
      if (permissionsState.revokeInstallPermission(bp) != PermissionsState.PERMISSION_OPERATION_FAILURE) {
        scheduleWriteSettingsLocked();
      }
      return;
    }
    if (permissionsState.revokeRuntimePermission(bp,userId) == PermissionsState.PERMISSION_OPERATION_FAILURE) {
      return;
    }
    mOnPermissionChangeListeners.onPermissionsChanged(pkg.applicationInfo.uid);
    mSettings.writeRuntimePermissionsForUserLPr(userId,true);
    appId=UserHandle.getAppId(pkg.applicationInfo.uid);
  }
  killUid(appId,userId,KILL_APP_REASON_PERMISSIONS_REVOKED);
}