Check whether one exit can be replaced with another. Verify:
1) They are identical expressions
2) If an exception is possible that the statements, the original
and the potential replacement are in the same exception handler.
335091
boolean areMatchingExits(Node nodeThis, Node nodeThat) {
    return nodeThis.isEquivalentTo(nodeThat)
        && (!isExceptionPossible(nodeThis)
            || getExceptionHandler(nodeThis) == getExceptionHandler(nodeThat));
  }
1160252
function canSwapBetweenExpressionAndStatement(replacement) {
  if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
    return false;
  }

  if (this.isExpression()) {
    return t.isBlockStatement(replacement);
  } else if (this.isBlockStatement()) {
    return t.isExpression(replacement);
  }

  return false;
}
1202440
private final void assertIsLocPathIterator(Expression expr1, ExpressionOwner eo) 
    throws RuntimeException 
  {
		if(!(expr1 instanceof LocPathIterator))
		{
			String errMsg;
			if(expr1 instanceof Variable)
			{
				errMsg = "Programmer's assertion: expr1 not an iterator: "+
				          ((Variable)expr1).getQName();
			}
			else
			{
				errMsg = "Programmer's assertion: expr1 not an iterator: "+
				          expr1.getClass().getName();
			}
			throw new RuntimeException(errMsg + ", "+
				          eo.getClass().getName()+" "+
				          expr1.exprGetParent());
		}
  }
22291
def visitEqualityExpression(self, ctx):
        
        arg1, arg2 = conversions.to_same(self.visit(ctx.expression(0)), self.visit(ctx.expression(1)), self._eval_context)

        if isinstance(arg1, str):
            # string equality is case-insensitive
            equal = arg1.lower() == arg2.lower()
        else:
            equal = arg1 == arg2

        return equal if ctx.EQ() is not None else not equal
12185
private static void validateNewAddition(Vector paths, ExpressionOwner owner, 
                                          LocPathIterator path) 
		throws RuntimeException 
  {
  	assertion(owner.getExpression() == path, "owner.getExpression() != path!!!");
	int n = paths.size();
	// There should never be any duplicates in the list!
	for(int i = 0; i < n; i++)
	{
		ExpressionOwner ew = (ExpressionOwner)paths.elementAt(i);
		assertion(ew != owner, "duplicate owner on the list!!!");
		assertion(ew.getExpression() != path, "duplicate expression on the list!!!");
	}
  }
145852
private boolean isLineLastStament(TestMethod method, int codeLineIndex) {
        CodeLine codeLine = method.getCodeBody().get(codeLineIndex);
        if (codeLineIndex == method.getCodeBody().size() - 1) {
            return true;
        }

        CodeLine nextCodeLine = method.getCodeBody().get(codeLineIndex + 1);
        assert codeLine.getEndLine() <= nextCodeLine.getStartLine();
        if (codeLine.getEndLine() == nextCodeLine.getStartLine()) {
            // if next statement exists in the same line,
            // this statement is not the last statement for the line
            return false;
        }
        return true;
    }
824802
def system_exit_exception_handler(*args):
    

    reporter = Reporter()
    reporter.Footer_label.setText(
        "The severity of this exception is critical, <b>{0}</b> cannot continue and will now close!".format(
            Constants.application_name))

    base_exception_handler(*args)

    foundations.core.exit(1)

    return True
874679
static void assertEquals(String message, Object comparison1, Object comparison2)
    {
        if(comparison1 == comparison2)
        {
            return;
        }
        if(comparison1.equals(comparison2))
        {
            return;
        }

        System.err.println(message);
    }
812020
def evaluate(actual, expected)
      same = (Set.new(expected) == Set.new(actual))
      same ? pass(new_message.has_same_elements_as(expected)) : fail(expected_message.elements(expected).to_match(actual))
    end
1309726
public boolean isMatchedByPreviousException(AnalyzedToken token) {
    if (exceptionValidPrevious) {
      for (PatternToken testException : previousExceptionList) {
        if (!testException.exceptionValidNext) {
          if (testException.isMatched(token)) {
            return true;
          }
        }
      }
    }
    return false;
  }
567992
private boolean twoMoreSingleQuotes() throws IOException
    {
        int c = read();
        if (c == '\'') {
            int c2 = read();
            if (c2 == '\'') {
                return true;
            }
            unread(c2);
        }
        unread(c);
        return false;
    }
1105075
def hasoriginal(self,allowempty=False):
        """"""
        for e in self.select(Original,None,False, False):
            if not allowempty and len(e) == 0: continue
            return True
        return False
571773
protected boolean replaceStatementInNode(N statement, N oldN, N newN) {
		for (FieldAccess fa : fieldsOf(statement.getClass())) {
			if (replaceStatementInField(fa, statement, oldN, newN)) return true;
		}
		
		return false;
	}
1298425
public boolean isExceptionMatched(AnalyzedToken token) {
    if (exceptionSet) {
      for (PatternToken testException : exceptionList) {
        if (!testException.exceptionValidNext) {
          if (testException.isMatched(token)) {
            return true;
          }
        }
      }
    }
    return false;
  }
1286615
@Override
    public boolean canRetry(Throwable exception) {
        if (exception == null) {
            return false;
        }

        Class<? extends Throwable> exceptionClass = exception.getClass();
        if (hasIncludes && !includes.contains(exceptionClass)) {
            return false;
        } else if (hasExcludes && excludes.contains(exceptionClass)) {
            return false;
        } else {
            return this.attemptNumber.incrementAndGet() < (maxAttempts + 1) && ((maxDelay == null) || overallDelay.get() < maxDelay.toMillis());
        }
    }
634309
private static boolean isRetryable(Throwable ex) {
        ex = Exceptions.unwrap(ex);
        return ex instanceof WriteFailureException
                || ex instanceof DataLogNotAvailableException;
    }
1087682
private static Boolean methodExists(Class clazz, String methodName, Type[] args, Type returnType) {
	try {
	    Class<?>[] _args = new Class[args.length];
	    for (int i = 0; i < _args.length; i++) {
		_args[i] = Types.toClass(args[i]);
	    }
	    Class<?> rtn = Types.toClass(returnType);
	    try {
		java.lang.reflect.Method m = clazz.getMethod(methodName, _args);
		return m.getReturnType() == rtn;
	    }
	    catch (Exception e) {
		return false;
	    }
	}
	catch (Exception e) {
	    SystemOut.printDate(e);
	    return null;
	}
    }