{@inheritDoc}

@throws CouldNotPerformException {@inheritDoc}
778746
@Override
    public void clear() throws CouldNotPerformException {
        lock();
        try {
            pluginPool.beforeClear();
            sandbox.clear();
            entryMap.clear();
            consistent = true;
        } finally {
            unlock();
        }
        notifyObservers();
    }
1046628
public function canBeJoined($possible = null)
    {
        if ($possible !== null) {
            deprecationWarning(
                'Using EagerLoadable::canBeJoined() as a setter is deprecated. ' .
                'Use setCanBeJoined() instead.'
            );
            $this->setCanBeJoined($possible);
        }

        return $this->_canBeJoined;
    }
671720
@Override
    public boolean canImport(String mediaType) {
        return (MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType) ||
                this.serviceTransformationEngine.canTransform(mediaType));
    }
811018
@Override
    public void configureSelected(PMContext ctx) throws NumberFormatException, PMException {
        if (ctx.getEntityContainer().isSelectedNew()) {
            ctx.getEntityContainer().setSelected(null);
        } else {
            super.configureSelected(ctx);
        }
    }
1124188
private void setIsStepEnabled(int step, boolean isEnabled) {
        try {
            Object oRoadmapItem = m_xRMIndexCont.getByIndex(step - 1);
            XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem);
            xRMItemPSet.setPropertyValue("Enabled", new Boolean(isEnabled));
        } catch (com.sun.star.uno.Exception e) {
            LOGGER.log(Level.SEVERE, "Error in setIsStepEnabled", e);
            throw new CogrooRuntimeException(e);
        }
    }
453063
private boolean canRun(String flowName, String flowGroup, boolean allowConcurrentExecution) {
    if (allowConcurrentExecution) {
      return true;
    } else {
      return !flowStatusGenerator.isFlowRunning(flowName, flowGroup);
    }
  }
181067
@Override
    public void waitForData() throws CouldNotPerformException, InterruptedException {
        try {
            if (isDataAvailable()) {
                return;
            }
            logger.debug("Wait for " + this.toString() + " data...");
            getDataFuture().get();
            dataObservable.waitForValue();
        } catch (ExecutionException | CancellationException ex) {
            if (shutdownInitiated) {
                throw new InterruptedException("Interrupt request because system shutdown was initiated!");
            }
            throw new CouldNotPerformException("Could not wait for data!", ex);
        }
    }
180459
public static function mustBeNullableDouble($value)
    {
        if (is_double($value) === false && $value != null) {
            throw new MWrongTypeException('\$value', 'double|null', gettype($value));
        }
    }
61027
@Override
    public ENTRY update(final ENTRY entry) throws CouldNotPerformException {
        if (entry == null) {
            throw new NotAvailableException("entry");
        }
        log("Update " + entry + "...");
        try {
            checkWriteAccess();
            lock();
            try {
                try {
                    // validate update
                    if (!entryMap.containsKey(entry.getId())) {
                        throw new InvalidStateException("Entry not registered!");
                    }
                    // perform update
                    sandbox.update(entry);
                    // check if the new message results in an update after consistency checks
                    final boolean changed = !isSandbox() && ((sandbox instanceof MockRegistrySandbox) || !get(entry).equals(sandbox.get(entry)));
                    pluginPool.beforeUpdate(entry);
                    entryMap.put(entry.getId(), entry);
                    finishTransaction();
                    pluginPool.afterUpdate(entry);
                    // test if the entry has changed at all by this update method
                    if (changed) {
                        notifySuccessfulTransaction();
                    }
                } finally {
                    syncSandbox();
                }
            } finally {
                unlock();
            }
        } catch (CouldNotPerformException ex) {
            throw new CouldNotPerformException("Could not update " + entry + " in " + this + "!", ex);
        }
        notifyObservers();
        return get(entry);
    }
403126
@Override
    public void waitForValue(final long timeout, final TimeUnit timeUnit) throws CouldNotPerformException, InterruptedException {
        synchronized (VALUE_LOCK) {
            if (value != null) {
                return;
            }
            // if 0 wait forever like the default java wait() implementation.
            if (timeUnit.toMillis(timeout) == 0) {
                VALUE_LOCK.wait();
            } else {
                timeUnit.timedWait(VALUE_LOCK, timeout);
            }
            if (value == null) {
                throw new NotAvailableException(Observable.class, new TimeoutException());
            }
        }

        //waitUntilNotificationIsFinished();
    }
1300720
@Override
    protected void doPerform() {
        WebElement source = isSourceDocumentRoot() ? null : getFirstElement();
        if (offset != null) {
            Point offsetPoint = offset.offset(getSize());
            getActions().moveToElement(source, offsetPoint.x(), offsetPoint.y()).perform();
        } else {
            getActions().moveToElement(source).perform();
        }
    }
21920
@Override
    public void activate(final Object maintainer) throws InterruptedException, CouldNotPerformException {
        if (!isLocked() || this.maintainer.equals(maintainer)) {
            synchronized (maintainerLock) {
                unlock(maintainer);
                activate();
                lock(maintainer);
            }
        } else {
            throw new VerificationFailedException("[" + maintainer + "] is not the current maintainer of this remote");
        }
    }
1035242
@Override
    protected void doPerform() {
        if (isSourceDocumentRoot()) {
            getActions().contextClick().perform();
        } else {
            getActions().contextClick(getFirstElement()).perform();
        }
    }
640065
public function reset(int $i = 0): bool
    {
        $this->pos = $i;
        if (\fseek($this->fp, $i, SEEK_SET) === 0) {
            return true;
        }
        throw new CannotPerformOperation(
            'fseek() failed'
        );
    }
703485
@Override
	public boolean canMerge(ItemStack itemStack, EntityPlayer player, World world, BlockPos pos, EnumFacing side)
	{
		IBlockState state = world.getBlockState(pos);
		if (isCorner(state))
			return false;

		return EnumFacingUtils.getRealSide(state, side) != EnumFacing.NORTH;
	}
1167414
@SuppressWarnings("null")
  public static <T> @NotNull T notNull(@NotNull Adaptable adaptable, @NotNull Class<T> type) {
    T object = adaptable.adaptTo(type);
    if (object == null) {
      throw new UnableToAdaptException(adaptable, type);
    }
    return object;
  }
1133778
@Override
    public void lock(final Object maintainer) throws CouldNotPerformException {
        synchronized (maintainerLock) {
            if (this.maintainer != null) {
                throw new CouldNotPerformException("Could not lock remote because it is already locked by another instance!");
            }
            this.maintainer = maintainer;
        }
    }