Check aborting condition.
@return
546025
protected boolean checkCondition(TestContext context) {
        if (conditionExpression != null) {
            return conditionExpression.evaluate(index, context);
        }

        // replace dynamic content with each iteration
        String conditionString = condition;
        if (conditionString.indexOf(Citrus.VARIABLE_PREFIX + indexName + Citrus.VARIABLE_SUFFIX) != -1) {
            Properties props = new Properties();
            props.put(indexName, String.valueOf(index));
            conditionString = new PropertyPlaceholderHelper(Citrus.VARIABLE_PREFIX, Citrus.VARIABLE_SUFFIX).replacePlaceholders(conditionString, props);
        }

        conditionString = context.replaceDynamicContentInString(conditionString);

        if (ValidationMatcherUtils.isValidationMatcherExpression(conditionString)) {
            try {
                ValidationMatcherUtils.resolveValidationMatcher("iteratingCondition", String.valueOf(index), conditionString, context);
                return true;
            } catch (AssertionError e) {
                return false;
            }
        }

        if (conditionString.indexOf(indexName) != -1) {
            conditionString = conditionString.replaceAll(indexName, String.valueOf(index));
        }

        return BooleanExpressionParser.evaluate(conditionString);
    }
488134
public void abort() {
    this.explicitClosed = true;

    boolean lockStatus = false;
    if (lock != null) {
      lockStatus = lock.tryLock();
    }
    this.connected = false;

    abortActiveStream();

    if (!lockStatus) {
      //lock not available : query is running
      // force end by executing an KILL connection
      forceAbort();
      try {
        socket.setSoLinger(true, 0);
      } catch (IOException ioException) {
        //eat
      }
    } else {
      SendClosePacket.send(writer);
    }

    closeSocket(reader, writer, socket);
    cleanMemory();
    if (lockStatus) {
      lock.unlock();
    }
  }
1186456
async def abort(self):
        """"""
        state = await self.state()
        res = await self.call("X_Abort", MasterSessionID=state.MasterSessionID)
        return res
1259969
public synchronized void abort()
    {
        if (done)
            return;

        done = true;
        for (SSTableWriter writer : sstables)
            writer.abort();
        sstables.clear();
    }
449635
protected boolean condition() throws JspTagException {
        try {
            Object r = ExpressionEvaluatorManager.evaluate(
                    "test", test, Boolean.class, this, pageContext);
            if (r == null) {
                throw new NullAttributeException("when", "test");
            } else {
                return (((Boolean) r).booleanValue());
            }
        } catch (JspException ex) {
            throw new JspTagException(ex.toString(), ex);
        }
    }
989734
def abort(self, err):
        """"""
        if _debug: IOQController._debug("abort %r", err)

        if (self.state == CTRL_IDLE):
            if _debug: IOQController._debug("    - idle")
            return

        while True:
            iocb = self.ioQueue.get(block=0)
            if not iocb:
                break
            if _debug: IOQController._debug("    - iocb: %r", iocb)

            # change the state
            iocb.ioState = ABORTED
            iocb.ioError = err

            # notify the client
            iocb.trigger()

        if (self.state != CTRL_IDLE):
            if _debug: IOQController._debug("    - busy after aborts")
337249
@Override
    public synchronized boolean stop() {
        if (!this.isStarted()) {
            throw new IllegalStateException("Cannot terminate what was not started.");
        } else if (!this.isStopped.compareAndSet(false, true)) {
            return false;
        }
        DefaultLogWatch.LOGGER.info("Terminating {}.", this);
        this.tailing.stop();
        this.consumers.stop();
        this.handingDown.clear();
        this.storage.logWatchTerminated();
        DefaultLogWatch.LOGGER.info("Terminated {}.", this);
        return true;
    }
55007
public boolean checkForDangerousProps() {

        final Map<String, String> dangerousProps = new HashMap<>();
        dangerousProps.put("ro.debuggable", "1");
        dangerousProps.put("ro.secure", "0");

        boolean result = false;

        String[] lines = propsReader();

        if (lines == null){
            // Could not read, assume false;
            return false;
        }

        for (String line : lines) {
            for (String key : dangerousProps.keySet()) {
                if (line.contains(key)) {
                    String badValue = dangerousProps.get(key);
                    badValue = "[" + badValue + "]";
                    if (line.contains(badValue)) {
                        QLog.v(key + " = " + badValue + " detected!");
                        result = true;
                    }
                }
            }
        }
        return result;
    }
254591
public synchronized boolean isRunning() {
        if (null == process) return false;

        try {
            process.exitValue();
            return false;
        } catch(IllegalThreadStateException itse) {
            return true;
        }
    }
436063
public boolean checkError() {
        if (out != null) {
            flush();
        }
        if (out instanceof java.io.PrintWriter) {
            PrintWriter pw = (PrintWriter) out;
            return pw.checkError();
        } else if (psOut != null) {
            return psOut.checkError();
        }
        return trouble;
    }
890846
protected boolean taskCanceled() {
        boolean cancel = canceled;
        if (!cancel) {
            for (K parent = getParent(); !cancel && parent != null; parent = parent.getParent())
                cancel = parent.canceled;
        }

        return cancel;
    }
1165508
function abort() {
    this.aborted = true;
    this.responseText = null;
    this.errorFlag = true;
    this.requestHeaders = {};

    this.dispatchEvent(new _Event("abort", false, false, this));

    if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {
      this._readyStateChange(FakeXMLHttpRequest.UNSENT);
      this.sendFlag = false;
    }

    if (typeof this.onerror === "function") {
      this.onerror();
    }
  }
207458
@Nonnull
  public EChange stop ()
  {
    // Already stopped?
    if (m_nStartDT == 0)
      return EChange.UNCHANGED;

    final long nCurrentNanoTime = getCurrentNanoTime ();
    m_nDurationNanos += (nCurrentNanoTime - m_nStartDT);
    m_nStartDT = 0;
    return EChange.CHANGED;
  }
1015195
public T End() {
                if (procceed)
                        if (initVal != null && !initVal.equals(false)) {
                                return body.apply(initVal);
                        } else {
                                return null;
                        }
                else
                        return this.val;
        }
1064652
protected final void abortIfNeeded() {
        if (shouldAbort()) {
            try {
                abort();    // execute subclass specific abortion logic
            } catch (IOException e) {
                LogFactory.getLog(getClass()).debug("FYI", e);
            }
            throw new AbortedException();
        }
    }
961289
@SuppressWarnings({ "rawtypes" })
  public RetryPolicy<R> abortOn(Class<? extends Throwable> failure) {
    Assert.notNull(failure, "failure");
    return abortOn(Arrays.asList(failure));
  }
540654
def abort(self):
        """"""
        resp = make_response(render_template('error.html', error=self.code, message=self.message), self.code)
        return resp