code: public boolean hasStopPermission() {
          lock.readLock().lock();
          try {
              return executable != null && getParentOf(executable).getOwnerTask().hasAbortPermission();
          } finally {
              lock.readLock().unlock();
          }
      }
docs: Checks if the current user has a permission to stop this build.