Return true if a tree represents the null literal.
169929
public static boolean isNull(JCTree tree) {
        if (!tree.hasTag(LITERAL))
            return false;
        JCLiteral lit = (JCLiteral) tree;
        return (lit.typetag == BOT);
    }
842147
private boolean isValidTreeType(Tree t) {
    if (t instanceof LambdaExpressionTree) {
      return true;
    }
    if (t instanceof ClassTree) {
      NestingKind nestingKind = ASTHelpers.getSymbol((ClassTree) t).getNestingKind();
      return nestingKind.equals(NestingKind.ANONYMOUS) || nestingKind.equals(NestingKind.LOCAL);
    }
    return false;
  }
1187196
public boolean has(String key){
		LazyNode child=root.child;
		while(child!=null){
			if(keyMatch(key,child)){
				return true;
			}
			child=child.next;
		}
		return false;
	}
668230
private boolean isRed(MtasRBTreeNode n) {
    if (n == null) {
      return false;
    }
    return n.color == MtasRBTreeNode.RED;
  }
405926
public static boolean containsOnlyNotNull(Object... values){	
		for(Object o : values){
			if(o== null){
				return false;
			}
		}
		return true;
	}
252623
private static boolean containsNonNull(Object... items) {
        for (Object item : items) {
            if (item != null) {
                return true;
            }
        }
        return false;
    }
845830
public static boolean isAllNull(Iterator<?> iter) {
		if (null == iter) {
			return true;
		}

		while (iter.hasNext()) {
			if (null != iter.next()) {
				return false;
			}
		}
		return true;
	}
964857
public static boolean allNull(final Object... o1s) {
        if (o1s != null && o1s.length > 0) {
            for (final Object o1 : o1s) {
                if (o1 != null) {
                    return false;
                }
            }
        }
        return true;
    }
202859
def _has_nulltype(dt):
    
    if isinstance(dt, StructType):
        return any(_has_nulltype(f.dataType) for f in dt.fields)
    elif isinstance(dt, ArrayType):
        return _has_nulltype((dt.elementType))
    elif isinstance(dt, MapType):
        return _has_nulltype(dt.keyType) or _has_nulltype(dt.valueType)
    else:
        return isinstance(dt, NullType)
869819
public TerminalResult IS_NULL() {
		getPredicateExpression().setOperator(Operator.IS_NULL);
		TerminalResult ret = APIAccess.createTerminalResult(this.getPredicateExpression());
		QueryRecorder.recordInvocation(this, "IS_NULL", ret);
		return ret;
	}
1316566
private static IntNaryTree readSubtreeInPtbFormat(IntObjectBimap<String> lexAlphabet, IntObjectBimap<String> ntAlphabet, Reader reader) throws IOException {
        ReaderState state = ReaderState.START;
        StringBuilder symbolSb = new StringBuilder();
        ArrayList<IntNaryTree> children = null;
        boolean isLexical = false;

        char[] cbuf = new char[1];
        while (reader.read(cbuf) != -1) {
        //for (int i=0; i<treeStr.length(); i++) {
            //char c = treeStr.charAt(i);
            char c = cbuf[0];
            if (state == ReaderState.START) {
                if (c == '(') {
                    state = ReaderState.NONTERMINAL;
                } else if (c == ')') {
                    // This was the tail end of a tree.
                    break;
                } else if (!isWhitespace(c)) {
                    symbolSb.append(c);
                    state = ReaderState.LEXICAL;
                    isLexical = true;
                }
            } else if (state == ReaderState.LEXICAL) {
                if (isWhitespace(c) || c == ')') {
                    state = ReaderState.DONE;
                    break;
                } else {
                    symbolSb.append(c);
                }
            } else if (state == ReaderState.NONTERMINAL) {
                if (isWhitespace(c)) {
                    state = ReaderState.CHILDREN;
                    children = readTreesInPtbFormat(lexAlphabet, ntAlphabet, reader);
                    state = ReaderState.DONE;
                    break;
                } else {
                    symbolSb.append(c);
                }
            } else {
                throw new IllegalStateException("Invalid state: " + state);
            }
        }
        if (state != ReaderState.DONE) {
            // This reader did not start with a valid PTB style tree.
            return null;
        }
        
        int start = NOT_INITIALIZED;
        int end = NOT_INITIALIZED;
        IntObjectBimap<String> alphabet = (isLexical ? lexAlphabet : ntAlphabet);
        String symbolStr = symbolSb.toString();
        String l = isLexical ? symbolStr : symbolStr;
        int symbol = alphabet.lookupIndex(l);
        if (symbol == -1) {
            throw new IllegalStateException("Unknown "
                    + (isLexical ? "word" : "nonterminal") + ": "
                    + symbolSb.toString());
        }
        IntNaryTree root = new IntNaryTree(symbol, start, end, children, isLexical, alphabet);
        return root;
    }
1016689
TreeNode childWithToken(Token token) {
        for (TreeNode child : m_children) {
            if (child.getToken().equals(token)) {
                return child;
            }
        }

        return null;
    }
109872
private boolean hasConditionalBranches( Tree<Row> split ){
        for( Tree<Row> branch : split.getChildren() ){
            Element main = branch.getContent().getMainElement();
            if( main.countArguments() > 0 ){
                return true;
            }
        }
        return false;
    }
377744
def null():
    """"""
    import ibis.expr.operations as ops

    global _NULL
    if _NULL is None:
        _NULL = ops.NullLiteral().to_expr()

    return _NULL
1003133
@Nullable
  public static Symbol getDeclaredSymbol(Tree tree) {
    if (tree instanceof AnnotationTree) {
      return getSymbol(((AnnotationTree) tree).getAnnotationType());
    }
    if (tree instanceof PackageTree) {
      return getSymbol((PackageTree) tree);
    }
    if (tree instanceof TypeParameterTree) {
      Type type = ((JCTypeParameter) tree).type;
      return type == null ? null : type.tsym;
    }
    if (tree instanceof ClassTree) {
      return getSymbol((ClassTree) tree);
    }
    if (tree instanceof MethodTree) {
      return getSymbol((MethodTree) tree);
    }
    if (tree instanceof VariableTree) {
      return getSymbol((VariableTree) tree);
    }
    return null;
  }
1004672
@Nullable
  public static Object constValue(Tree tree) {
    if (tree == null) {
      return null;
    }
    tree = stripParentheses(tree);
    Type type = ASTHelpers.getType(tree);
    Object value;
    if (tree instanceof JCLiteral) {
      value = ((JCLiteral) tree).value;
    } else if (type != null) {
      value = type.constValue();
    } else {
      return null;
    }
    if (type.hasTag(TypeTag.BOOLEAN) && value instanceof Integer) {
      return ((Integer) value) == 1;
    }
    return value;
  }
1304599
boolean hasNoAlternativeWildcardRegistration() {
        return parent == null || PathElement.WILDCARD_VALUE.equals(valueString) || !parent.getChildNames().contains(PathElement.WILDCARD_VALUE);
    }