If caseExpression argument is null it indicates a default label.
517248
private void addSwitchCase(Node switchBlock, Node caseExpression,
                               Node statements)
    {
        if (switchBlock.getType() != Token.BLOCK) throw Kit.codeBug();
        Jump switchNode = (Jump)switchBlock.getFirstChild();
        if (switchNode.getType() != Token.SWITCH) throw Kit.codeBug();

        Node gotoTarget = Node.newTarget();
        if (caseExpression != null) {
            Jump caseNode = new Jump(Token.CASE, caseExpression);
            caseNode.target = gotoTarget;
            switchNode.addChildToBack(caseNode);
        } else {
            switchNode.setDefault(gotoTarget);
        }
        switchBlock.addChildToBack(gotoTarget);
        switchBlock.addChildToBack(statements);
    }
494439
def default_value
      match = if definition =~ /timestamp|datetime/i
                /default '?(.+[^'])'?/i.match(definition)
              else
                /default '?(\w+)'?/i.match(definition)
              end

      return unless match

      match[1].downcase != 'null' ? match[1] : nil
    end
708335
private void labelIndicatorSetColorsToDefaultState(JLabel label) {
        if (label == null || settings == null) {
            return;
        }
        if (label == labelMonth || label == labelYear) {
            label.setBackground(settings.getColor(DateArea.BackgroundMonthAndYearMenuLabels));
            monthAndYearInnerPanel.setBackground(settings.getColor(DateArea.BackgroundMonthAndYearMenuLabels));
        }
        if (label == labelSetDateToToday) {
            label.setBackground(settings.getColor(DateArea.BackgroundTodayLabel));
        }
        if (label == labelClearDate) {
            label.setBackground(settings.getColor(DateArea.BackgroundClearLabel));
        }
        label.setBorder(new CompoundBorder(
            new EmptyBorder(1, 1, 1, 1), labelIndicatorEmptyBorder));
    }
434708
def _check_default(value, parameter, default_chars):
    ''''''
    # not using a set here because it fails when value is unhashable
    if value in default_chars:
        if parameter.default is inspect.Parameter.empty:
            raise ValueError('Value was empty, but no default value is given in view function for parameter: {} ({})'.format(parameter.position, parameter.name))
        return parameter.default
    return value
1369185
public static boolean isBadCase(String name)
    {
        Character label = JapanesePersonDictionary.get(name);
        if (label == null) return false;
        return label.equals(JapanesePersonDictionary.A);
    }
1067621
public static String checkNull(String value, String elseValue) {
        return isNull(value) ? elseValue : value;
    }
288767
@Nullable
  static Name inlineLabel(@Nullable CharSequence label, Inliner inliner) {
    return (label == null)
        ? null
        : inliner.asName(inliner.getOptionalBinding(new Key(label)).or(label));
  }
637112
def _validate_label(self, label):
        """"""

        letter_pattern = compile("^[a-z]{1}$")
        number_pattern = compile("^[0]{1}$|^[1-9]{1,2}$")
        icon_pattern = compile("^[a-zA-Z ]{1,}$")

        if not match(letter_pattern, label)\
            and not match(number_pattern, label)\
                and not match(icon_pattern, label):
                    raise InvalidLabelError(
                        "{} is not a valid label".format(label)
                    )

        return label
584547
public static void validateNull( Object object, String identifier )
        throws PostConditionException
    {
        if( object == null )
        {
            return;
        }
        throw new PostConditionException( identifier + " was NOT NULL." );
    }
842580
public @Nullable LabelAtom getLabelAtom(@CheckForNull String name) {
        if (name==null)  return null;

        while(true) {
            Label l = labels.get(name);
            if(l!=null)
                return (LabelAtom)l;

            // non-existent
            LabelAtom la = new LabelAtom(name);
            if (labels.putIfAbsent(name, la)==null)
                la.load();
        }
    }
369191
private static boolean mayBeStatementNoReturn(Node n) {
    switch (n.getToken()) {
      case EMPTY:
      case FUNCTION:
        // EMPTY and FUNCTION are used both in expression and statement
        // contexts
        return true;

      case BLOCK:
      case BREAK:
      case CLASS:
      case CONST:
      case CONTINUE:
      case DEBUGGER:
      case DO:
      case EXPR_RESULT:
      case FOR:
      case FOR_IN:
      case FOR_OF:
      case FOR_AWAIT_OF:
      case IF:
      case LABEL:
      case LET:
      case SWITCH:
      case THROW:
      case TRY:
      case VAR:
      case WHILE:
      case WITH:
        return true;

      default:
        return false;
    }
  }
870262
private String getLabel(I_CmsXmlSchemaType value) {

        I_CmsXmlContentHandler handler = value.getContentDefinition().getContentHandler();
        if (handler instanceof CmsDefaultXmlContentHandler) {
            CmsDefaultXmlContentHandler defaultHandler = (CmsDefaultXmlContentHandler)handler;
            String label = defaultHandler.getFieldLabels().get(value.getName());
            if (label != null) {
                CmsMacroResolver resolver = new CmsMacroResolver();
                resolver.setKeepEmptyMacros(true);
                resolver.setMessages(m_messages);
                return resolver.resolveMacros(label);
            }
        }
        StringBuffer result = new StringBuffer(64);
        result.append(A_CmsWidget.LABEL_PREFIX);
        result.append(getTypeKey(value));
        return m_messages.keyDefault(result.toString(), value.getName());
    }
501020
public void setCaseLevelDefault() {
        checkNotFrozen();
        CollationSettings defaultSettings = getDefaultSettings();
        if(settings.readOnly() == defaultSettings) { return; }
        CollationSettings ownedSettings = getOwnedSettings();
        ownedSettings.setFlagDefault(CollationSettings.CASE_LEVEL, defaultSettings.options);
        setFastLatinOptions(ownedSettings);
    }
951374
private static ExpressionTree getNullCheckedExpression(ExpressionTree condition) {
    condition = stripParentheses(condition);
    if (!(condition instanceof BinaryTree)) {
      return null;
    }
    BinaryTree bin = (BinaryTree) condition;
    ExpressionTree other;
    if (bin.getLeftOperand().getKind() == Kind.NULL_LITERAL) {
      other = bin.getRightOperand();
    } else if (bin.getRightOperand().getKind() == Kind.NULL_LITERAL) {
      other = bin.getLeftOperand();
    } else {
      return null;
    }
    return other;
  }
351082
public static void notEmpty(String string)  {
		if(!validation) return;
		notNull(string);
		if(string.length() == 0)
			throw new ParameterException(ErrorCode.EMPTY);
	}
1133259
public Boolean getBoolean(String key, Boolean defaultValue) throws SyntaxException
    {
        String value = getSimple(key);
        return (value == null) ? defaultValue : value.toLowerCase().matches("(1|true|yes)");
    }
1275272
static boolean isBadCase(String name)
    {
        EnumItem<NR> nrEnumItem = dictionary.get(name);
        if (nrEnumItem == null) return false;
        return nrEnumItem.containsLabel(NR.A);
    }