TODO: what's the difference between this with the canRerunStage method?
498771
public boolean canScheduleStage(PipelineIdentifier pipelineIdentifier, String stageName, String username,
                                    final OperationResult result) {
        String pipelineName = pipelineIdentifier.getName();
        CompositeChecker checker = buildScheduleCheckers(asList(
                new StageAuthorizationChecker(pipelineName, stageName, username, securityService),
                new StageLockChecker(pipelineIdentifier, pipelineLockService),
                new PipelinePauseChecker(pipelineName, pipelinePauseService),
                new PipelineActiveChecker(stageService, pipelineIdentifier),
                new StageActiveChecker(pipelineName, stageName, stageService),
                diskCheckers()));
        checker.check(result);
        return result.canContinue();
    }
915448
private boolean decode_PlayAnnParm() throws ParserException {
		boolean decoded = false;
		if (index < totalChars) {
			if (chars[index] == 'a' && chars[index + 1] == 'n') {
				index = index + 3;
				AnnouncementParmValue annPaVa = new AnnouncementParmValue(ParameterEnum.an);
				value.put(ParameterEnum.an, annPaVa);

				decoded = decode_Segmentlist(annPaVa);
			} else if (chars[index] == 'i' && chars[index + 1] == 't') {

				index = index + 3;
				// IterationsParm = ItParmToken EQUALS ( NUMBER / "-1" );
				if (index < totalChars && chars[index] == '-') {
					NumberValue temp = new NumberValue(ParameterEnum.it, -1);
					value.put(ParameterEnum.it, temp);
					index = index + 3;
					decoded = true;
				} else {
					int interval = decode_NUMBER();
					NumberValue temp = new NumberValue(ParameterEnum.it, interval);
					value.put(ParameterEnum.it, temp);
					decoded = true;
				}

			} else if (chars[index] == 'i' && chars[index + 1] == 'v') {
				index = index + 3;
				// IntervalParm = IvParmToken EQUALS NUMBER;
				decoded = true;
				int interval = decode_NUMBER();
				NumberValue temp = new NumberValue(ParameterEnum.iv, interval);
				value.put(ParameterEnum.iv, temp);

			} else if (chars[index] == 'd' && chars[index + 1] == 'u') {
				index = index + 3;
				// DurationParm = DuParmToken EQUALS NUMBER;

				decoded = true;
				int interval = decode_NUMBER();
				NumberValue temp = new NumberValue(ParameterEnum.du, interval);
				value.put(ParameterEnum.du, temp);

			} else if (chars[index] == 's' && chars[index + 1] == 'p') {
				// SpeedParm = SpParmToken EQUALS SIGNEDINT;
				index = index + 3;
				String num = decode_SIGNEDINT();
				decoded = true;
				StringValue temp = new StringValue(ParameterEnum.sp, num);
				value.put(ParameterEnum.sp, temp);

			} else if (chars[index] == 'v' && chars[index + 1] == 'l') {
				// VolumeParm = VlParmToken EQUALS SIGNEDINT;
				index = index + 3;
				String num = decode_SIGNEDINT();
				decoded = true;
				StringValue temp = new StringValue(ParameterEnum.vl, num);
				value.put(ParameterEnum.vl, temp);
			} else {
				throw new ParserException(
						"PlayAnn decoding failed. None of AnnouncementParm / IterationsParm / IntervalParm / DurationParm / SpeedParm / VolumeParm found");
			}
		}

		return decoded;
	}
130142
@Override
    public void sawOpcode(int seen) {
        try {

            stack.precomputation(this);

            if (OpcodeUtils.isStandardInvoke(seen)) {
                String clsName = getClassConstantOperand();
                if (!safeClasses.contains(clsName)) {
                    try {
                        JavaClass cls = Repository.lookupClass(clsName);
                        Method[] methods = cls.getMethods();
                        String methodName = getNameConstantOperand();
                        String signature = getSigConstantOperand();
                        boolean found = false;
                        for (Method m : methods) {
                            if (m.getName().equals(methodName) && m.getSignature().equals(signature)) {

                                if (isAnonymousInnerCtor(m, cls)) {
                                    // The java compiler doesn't properly attached an Exception Table to anonymous
                                    // constructors, so just clear if so
                                    break;
                                }

                                ExceptionTable et = m.getExceptionTable();
                                if (et != null) {
                                    String[] thrownExceptions = et.getExceptionNames();
                                    for (String thrownException : thrownExceptions) {
                                        removeThrownExceptionHierarchy(thrownException);
                                    }
                                }
                                found = true;
                                break;
                            }
                        }

                        if (!found) {
                            clearExceptions();
                        }
                    } catch (ClassNotFoundException cnfe) {
                        bugReporter.reportMissingClass(cnfe);
                        clearExceptions();
                    }
                } else if ("wait".equals(getNameConstantOperand())) {
                    removeException("java.lang.InterruptedException");
                }
            } else if (seen == Const.ATHROW) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    String exSig = item.getSignature();
                    String thrownException = SignatureUtils.stripSignature(exSig);
                    removeThrownExceptionHierarchy(thrownException);
                } else {
                    clearExceptions();
                }
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
1182215
function( origEvent ) {
            var next = steps.indexOf( activeStep ) + 1;
            next = next < steps.length ? steps[ next ] : steps[ 0 ];

            return goto( next, undefined, "next", origEvent );
        }
72156
function() {
		var childValue;
		var options = this._options;
		var parentValue;

		// The tests don’t show that it matters which is bound first, but we’ll
		// bind to the parent first to stay consistent with how
		// can-stache-bindings did things.
		this.startParent();
		this.startChild();

		// Initialize the child & parent values
		if (this._childToParent === true && this._parentToChild === true) {
			// Two-way binding
			parentValue = canReflect.getValue(options.parent);
			if (parentValue === undefined) {
				childValue = canReflect.getValue(options.child);
				if (childValue === undefined) {
					// Check if updating the child is allowed
					if (options.onInitDoNotUpdateChild === false) {
						this._updateChild(parentValue);
					}
				} else if (options.onInitDoNotUpdateParent === false && options.onInitSetUndefinedParentIfChildIsDefined === true) {
					this._updateParent(childValue);
				}
			} else {
				// Check if updating the child is allowed
				if (options.onInitDoNotUpdateChild === false) {
					this._updateChild(parentValue);
				}
			}

		} else if (this._childToParent === true) {
			// One-way child -> parent, so update the parent
			// Check if we are to initialize the parent
			if (options.onInitDoNotUpdateParent === false) {
				childValue = canReflect.getValue(options.child);
				this._updateParent(childValue);
			}

		} else if (this._parentToChild === true) {
			// One-way parent -> child, so update the child
			// Check if updating the child is allowed
			if (options.onInitDoNotUpdateChild === false) {
				parentValue = canReflect.getValue(options.parent);
				this._updateChild(parentValue);
			}
		}
	}
1245089
public
  int decide(LoggingEvent event) {
    if(this.levelMin != null
      && event.getLevel().isGreaterOrEqual(levelMin) == false) {
        // level of event is less than minimum
        return Filter.DENY;
    }

    if(this.levelMax != null
      && event.getLevel().toInt() > levelMax.toInt()) {
        // level of event is greater than maximum
        // Alas, there is no Level.isGreater method. and using
        // a combo of isGreaterOrEqual && !Equal seems worse than
        // checking the int values of the level objects..
        return Filter.DENY;
    }

    if (acceptOnMatch) {
      // this filter set up to bypass later filters and always return
      // accept if level in range
      return Filter.ACCEPT;
    }
    else {
      // event is ok for this filter; allow later filters to have a look..
      return Filter.NEUTRAL;
    }
  }
369227
@Override
  public int compareTo(Comparable<?> other) {
    if (other instanceof Region) {
      Region r = (Region) other;
      if (this.start < r.start) {
        return -1;
      } else if (this.end > r.end) {
        return 1;
      } else {
        return 0;
      }
    } else if (other instanceof Long) {
      Long l = (Long) other;
      if (l > end) {
          return -1;
      } else if (l < start) {
          return 1;
      } else {
          return 0;
      }
    } else {
      throw new AssertionError();
    }
  }
340058
public final void mCOMPARE_OPER() throws RecognitionException {
		try {
			int _type = COMPARE_OPER;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// druidG.g:708:15: ( ( '<' | '>' ) )
			// druidG.g:
			{
			if ( input.LA(1)=='<'||input.LA(1)=='>' ) {
				input.consume();
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				recover(mse);
				throw mse;
			}
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
146681
function Buf(buffer) {
  this._initialSize = 64 * 1024;
  this._stepSize = this._initialSize;
  this._pos = 0;

  if (typeof buffer === 'number') {
    this._initialSize = buffer;
  }
  if (buffer instanceof Buffer) {
    this._buf = buffer;
  } else {
    this._buf = new Buffer(this._initialSize);
  }
}
840838
function (event, method) {
            if (methods.indexOf(method.toUpperCase()) !== -1) {
              showLoader = (event.name === 'loaderShow');
            } else if (methods.length === 0) {
              showLoader = (event.name === 'loaderShow');
            }

            if (ttl <= 0 || (!timeoutId && !showLoader)) {
              $scope.showLoader = showLoader;
              return;
            }
            if (timeoutId) {
              return;
            }

            $scope.showLoader = showLoader;
            timeoutId = $timeout(function () {
              if (!showLoader) {
                $scope.showLoader = showLoader;
              }
              timeoutId = undefined;
            }, ttl);
          }
1293491
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            if (OpcodeUtils.isStore(seen) || OpcodeUtils.isLoad(seen)) {
                int reg = getRegisterOperand();
                unusedParms.clear(reg);
            } else if (OpcodeUtils.isReturn(seen) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                int reg = item.getRegisterNumber();
                if (reg >= 0) {
                    unusedParms.clear(reg);
                }
            }
            if (unusedParms.isEmpty()) {
                throw new StopOpcodeParsingException();
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
1218444
function() {
			var context = this.tryContext;

			this.tryContext = context.upper;

			if (context.position === "catch") {

				// Merges two paths from the `try` block and `catch` block merely.
				this.popForkContext();
				return;
			}

			/*
			 * The following process is executed only when there is the `finally`
			 * block.
			 */

			var returned = context.returnedForkContext;
			var thrown = context.thrownForkContext;

			if (returned.empty && thrown.empty) {
				return;
			}

			// Separate head to normal paths and leaving paths.
			var headSegments = this.forkContext.head;

			this.forkContext = this.forkContext.upper;
			var normalSegments = headSegments.slice(0, headSegments.length / 2 | 0);
			var leavingSegments = headSegments.slice(headSegments.length / 2 | 0);

			// Forwards the leaving path to upper contexts.
			if (!returned.empty) {
				getReturnContext(this).returnedForkContext.add(leavingSegments);
			}
			if (!thrown.empty) {
				getThrowContext(this).thrownForkContext.add(leavingSegments);
			}

			// Sets the normal path as the next.
			this.forkContext.replaceHead(normalSegments);

			// If both paths of the `try` block and the `catch` block are
			// unreachable, the next path becomes unreachable as well.
			if (!context.lastOfTryIsReachable && !context.lastOfCatchIsReachable) {
				this.forkContext.makeUnreachable();
			}
		}
611336
@Override
    public void sawOpcode(int seen) {
        switch (state) {
            case SAW_NOTHING:
                if (seen == Const.CHECKCAST) {
                    castClass = getClassConstantOperand();
                    state = State.SAW_CHECKCAST;
                } else if (seen == Const.INVOKEINTERFACE) {
                    // enhanced for loops add an incorrect checkcast instruction, so
                    // ignore checkcasts after iterator.next()
                    String clsName = getClassConstantOperand();
                    String methodName = getNameConstantOperand();
                    if ("java/util/Iterator".equals(clsName) && "next".equals(methodName)) {
                        state = State.SAW_NEXT;
                    }
                }
            break;

            case SAW_CHECKCAST:
                if (OpcodeUtils.isAStore(seen)) {
                    int reg = RegisterUtils.getAStoreReg(this, seen);
                    LocalVariable lv = lvt.getLocalVariable(reg, getNextPC());
                    if (lv != null) {
                        String sig = lv.getSignature();
                        if (sig.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX)) {
                            sig = SignatureUtils.trimSignature(sig);
                        }
                        if (!sig.equals(castClass)) {
                            bugReporter.reportBug(new BugInstance(this, BugType.OC_OVERZEALOUS_CASTING.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                                    .addSourceLine(this));
                        }
                    }
                } else if (seen == Const.PUTFIELD) {
                    FieldAnnotation f = FieldAnnotation.fromReferencedField(this);
                    String sig = f.getFieldSignature();
                    if (sig.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX)) {
                        sig = SignatureUtils.trimSignature(sig);
                    }
                    // if the signature is Object, the field might be genericized, so ignore
                    if (!Values.SLASHED_JAVA_LANG_OBJECT.equals(sig) && !sig.equals(castClass)) {
                        bugReporter.reportBug(new BugInstance(this, BugType.OC_OVERZEALOUS_CASTING.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                                .addSourceLine(this));
                    }
                }
                state = State.SAW_NOTHING;
            break;

            case SAW_NEXT:
            default:
                state = State.SAW_NOTHING;
            break;
        }
    }
1215066
@Override
    public void sawOpcode(final int seen) {

        try {
            stack.precomputation(this);

            if (OpcodeUtils.isInvoke(seen)) {
                String methodSig = getSigConstantOperand();
                List<String> parmTypes = SignatureUtils.getParameterSignatures(methodSig);
                int stackDepth = stack.getStackDepth();
                if (stackDepth >= parmTypes.size()) {
                    for (int i = 0; i < parmTypes.size(); i++) {
                        OpcodeStack.Item itm = stack.getStackItem(i);
                        int reg = itm.getRegisterNumber();
                        removeUselessDefiners(parmTypes.get(parmTypes.size() - i - 1), reg);
                    }
                }

                if ((seen != Const.INVOKESPECIAL) && (seen != Const.INVOKESTATIC)) {
                    if (stackDepth > parmTypes.size()) {
                        OpcodeStack.Item itm = stack.getStackItem(parmTypes.size());
                        int reg = itm.getRegisterNumber();
                        int parm = reg;
                        if (!methodIsStatic) {
                            parm--;
                        }
                        if ((parm >= 0) && (parm < parmCount)) {
                            removeUselessDefiners(reg);
                        }
                    } else {
                        parameterDefiners.clear();
                    }
                }
            } else if ((seen == Const.PUTFIELD) || (seen == Const.GETFIELD) || (seen == Const.PUTSTATIC)
                    || (seen == Const.GETSTATIC) || OpcodeUtils.isAStore(seen)) {
                // Don't check parameters that are aliased
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    int reg = itm.getRegisterNumber();
                    int parm = reg;
                    if (!methodIsStatic) {
                        parm--;
                    }
                    if ((parm >= 0) && (parm < parmCount)) {
                        parameterDefiners.remove(Integer.valueOf(reg));
                    }
                } else {
                    parameterDefiners.clear();
                }

                if ((seen == Const.GETFIELD) || (seen == Const.PUTFIELD)) {
                    if (stack.getStackDepth() > 1) {
                        OpcodeStack.Item itm = stack.getStackItem(1);
                        int reg = itm.getRegisterNumber();
                        int parm = reg;
                        if (!methodIsStatic) {
                            parm--;
                        }
                        if ((parm >= 0) && (parm < parmCount)) {
                            parameterDefiners.remove(Integer.valueOf(reg));
                        }
                    } else {
                        parameterDefiners.clear();
                    }
                }

            } else if (OpcodeUtils.isALoad(seen)) {
                int reg = RegisterUtils.getALoadReg(this, seen);

                int parm = reg;
                if (!methodIsStatic) {
                    parm--;
                }
                if ((parm >= 0) && (parm < parmCount)) {
                    usedParameters.set(reg);
                }
            } else if (seen == Const.AASTORE) {
                // Don't check parameters that are stored in
                if (stack.getStackDepth() >= 3) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    int reg = itm.getRegisterNumber();
                    int parm = reg;
                    if (!methodIsStatic) {
                        parm--;
                    }
                    if ((parm >= 0) && (parm < parmCount)) {
                        parameterDefiners.remove(Integer.valueOf(reg));
                    }
                } else {
                    parameterDefiners.clear();
                }
            } else if (seen == Const.ARETURN) {
                if (stack.getStackDepth() >= 1) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    int reg = item.getRegisterNumber();
                    int parm = reg;
                    if (!methodIsStatic) {
                        parm--;
                    }

                    if ((parm >= 0) && (parm < parmCount)) {
                        parameterDefiners.remove(Integer.valueOf(reg));
                    }
                } else {
                    parameterDefiners.clear();
                }
            }

            if (parameterDefiners.isEmpty()) {
                throw new StopOpcodeParsingException();
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
1001432
@Override
    public void sawOpcode(int seen) {
        int reg = -1;
        Object uValue = null;
        boolean sawAlias = false;
        boolean sawLoad = false;
        boolean sawNewArray = false;

        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEINTERFACE) {
                String methodName = getNameConstantOperand();
                String signature = getSigConstantOperand();
                if ("size".equals(methodName) && SignatureBuilder.SIG_VOID_TO_INT.equals(signature)) {
                    if (stack.getStackDepth() > 0) {
                        OpcodeStack.Item itm = stack.getStackItem(0);
                        reg = isLocalCollection(itm);
                        if (reg >= 0) {
                            sawAlias = true;
                        }
                    }
                } else if ("get".equals(methodName) && SignatureBuilder.SIG_INT_TO_OBJECT.equals(signature)) {
                    if (stack.getStackDepth() > 1) {
                        OpcodeStack.Item itm = stack.getStackItem(1);
                        reg = isLocalCollection(itm);
                        if (reg >= 0) {
                            sawAlias = true;
                        }
                    }
                } else if (("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName))
                        && (stack.getStackDepth() > 0)) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    reg = isLocalCollection(itm);
                    if (reg >= 0) {
                        sawAlias = true;
                    }
                }
            } else if (OpcodeUtils.isIStore(seen) || OpcodeUtils.isAStore(seen)) {
                if (stack.getStackDepth() > 0) {
                    uValue = stack.getStackItem(0).getUserValue();
                    userValues.put(Integer.valueOf(RegisterUtils.getStoreReg(this, seen)), uValue);
                }
            } else if (OpcodeUtils.isILoad(seen) || OpcodeUtils.isALoad(seen)) {
                sawLoad = true;
            } else if (seen == Const.ANEWARRAY) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    uValue = itm.getUserValue();
                    sawNewArray = true;
                }
            } else if (seen == Const.IF_ICMPGE) {
                if (stack.getStackDepth() > 1) {
                    OpcodeStack.Item itm1 = stack.getStackItem(1);
                    OpcodeStack.Item itm2 = stack.getStackItem(0);
                    reg = itm1.getRegisterNumber();
                    if ((reg >= 0) && (itm1.couldBeZero())) {
                        uValue = itm2.getUserValue();
                        if (uValue != null) {
                            userValues.put(Integer.valueOf(reg), uValue);
                        }
                    }
                }
            } else if ((seen >= Const.IASTORE) && (seen <= Const.SASTORE)) {
                if (stack.getStackDepth() > 2) {
                    OpcodeStack.Item arItem = stack.getStackItem(2);
                    OpcodeStack.Item idxItem = stack.getStackItem(1);
                    OpcodeStack.Item valueItem = stack.getStackItem(0);
                    reg = isLocalCollection(arItem);
                    if ((reg >= 0) && (idxItem.getUserValue() != null) && (valueItem.getUserValue() != null)) {
                        bugReporter.reportBug(
                                new BugInstance(this, BugType.UTA_USE_TO_ARRAY.name(), NORMAL_PRIORITY).addClass(this).addMethod(this).addSourceLine(this));
                    }
                }
            } else if ((seen == Const.CHECKCAST) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item itm = stack.getStackItem(0);
                uValue = itm.getUserValue();
                if (uValue instanceof Integer) {
                    reg = ((Integer) uValue).intValue();
                    sawAlias = true;
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (sawAlias) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    itm.setUserValue(Integer.valueOf(reg));
                }
            } else if (sawLoad) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    reg = itm.getRegisterNumber();
                    if (reg >= 0) {
                        uValue = userValues.get(Integer.valueOf(reg));
                        itm.setUserValue(uValue);
                    }
                }
            } else if (sawNewArray && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item itm = stack.getStackItem(0);
                itm.setUserValue(uValue);
            }
        }
    }
925334
@Override
    public void sawOpcode(int seen) {
        boolean sawResource = false;
        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEVIRTUAL) {
                sawResource = processInvokeVirtual();
            } else if (seen == Const.INVOKESPECIAL) {
                sawResource = processInvokeSpecial();
            }

        } finally {
            stack.sawOpcode(this, seen);
            if (sawResource && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Boolean.TRUE);
            }
        }
    }
731857
private UnaryExpression resolveUnary(FunctionRef fun) {
        UnaryExpression operator = null;
        try {
            Class clazz = Class.forName("org.hl7.elm.r1." + fun.getName());
            if (UnaryExpression.class.isAssignableFrom(clazz)) {
                operator = (UnaryExpression) clazz.newInstance();
                checkNumberOfOperands(fun, 1);
                operator.setOperand(fun.getOperand().get(0));
                builder.resolveUnaryCall("System", fun.getName(), operator);
                return operator;
            }
        } catch (Exception e) {
            // Do nothing but fall through
        }
        return null;
    }