This function ensures that after being called, the master.name,
        master.weight, master.width, and master.customName match the given
        values.
485581
def set_all_name_components(self, name, weight, width, custom_name):
        
        self.weight = weight or "Regular"
        self.width = width or "Regular"
        self.customName = custom_name or ""
        # Only store the requested name if we can't build it from the parts
        if self._joinName() == name:
            self._name = None
            del self.customParameters["Master Name"]
        else:
            self._name = name
            self.customParameters["Master Name"] = name
1037990
public boolean match(String destination, String metricName) {
        int[] matches = match(destination);
        if (matches == null || matches.length == 0) {
            return false;
        }
        for (int match : matches) {
            String candidateMetricName = proxyRules.get(match).getMetricSystemName();
            if (metricName.equals(candidateMetricName)) {
                return true;
            }
        }
        return false;
    }
935742
def match_value_by_name(expected_type, actual_value):
        
        if expected_type == None:
            return True
        if actual_value == None:
            raise Exception("Actual value cannot be null")

        return TypeMatcher.match_type_by_name(expected_type, type(actual_value))
1033456
public void expectExactMatch(String name, String anotherName) {
        expectExactMatch(name, anotherName, messages.get(Validation.EXACT_MATCH_KEY.name(), name, anotherName));
    }
726195
function(match, value, shortNames, longNames) {
				return (doubled(match) ? longNames[value] : shortNames[value]);
			}
970071
private void autoSetMissingValues() {
        // Ensure that a timestamp is set (to now at least!)
        if (event.getTimestamp() == null) {
            event.setTimestamp(new Date());
        }

        // Ensure that a platform is set
        if (event.getPlatform() == null) {
            event.setPlatform(DEFAULT_PLATFORM);
        }

        // Ensure that an SDK is set
        if (event.getSdk() == null) {
            event.setSdk(new Sdk(SentryEnvironment.SDK_NAME, SentryEnvironment.SDK_VERSION,
                sdkIntegrations));
        }

        // Ensure that a hostname is set
        if (event.getServerName() == null) {
            event.setServerName(HOSTNAME_CACHE.getHostname());
        }
    }
791676
protected void checkFormPropertyConflictingWithRegisteredData(ActionRuntime runtime, WebContext context, String propertyName) {
        if (context.getVariableNames().contains(propertyName)) {
            throwThymeleafFormPropertyConflictingWithRegisteredDataException(runtime, context, propertyName);
        }
    }
453567
protected void setJoin(String[] masterLabels, String masterColumn,
                           String dataColumn, List<String> masterData) {
        setJoin(masterLabels, masterColumn, dataColumn, null, false, masterData);
    }
158717
public boolean optionMatches(String namePattern, String valuePattern) {
    Matcher nameMatcher = Pattern.compile(namePattern).matcher("");
    Matcher valueMatcher = Pattern.compile(valuePattern).matcher("");
    for (Map.Entry<ProtoMember, Object> entry : map.entrySet()) {
      if (nameMatcher.reset(entry.getKey().member()).matches()
          && valueMatcher.reset(String.valueOf(entry.getValue())).matches()) {
        return true;
      }
    }
    return false;
  }
719169
function (name_pattern, spec_pattern) {
            /*  step 1: match mandatory name  */
            if (typeof name_pattern === "string") {
                if (this.name() !== name_pattern)
                    return false;
            }
            else if (   typeof name_pattern === "object"
                     && name_pattern instanceof RegExp) {
                if (!(this.name().match(name_pattern)))
                    return false;
            }
            else
                throw _cs.exception("matches", "invalid name pattern");

            /*  step 2: match optional specification  */
            var spec = this.__spec;
            for (var key in spec_pattern) {
                if (!_cs.isown(spec_pattern, key))
                    continue;
                if (!_cs.isdefined(spec[key]))
                    return false;
                var value = spec_pattern[key];
                switch (typeof spec[key]) {
                    case "number":
                    case "boolean":
                        if (spec[key] !== value)
                            return false;
                        break;
                    case "string":
                        if (!(   (   typeof value === "string"
                                  && spec[key] === value)
                              || (   typeof value === "object"
                                  && value instanceof RegExp
                                  && !(spec[key].match(value)))))
                            return false;
                        break;
                }
            }
            return true;
        }
820194
private static final void auditNamedValues(String m, Map<String, ?> namedValues) {
        if (logger.isDebugEnabled()) {
            assert namedValues != null;
            for (Iterator<String> outer = namedValues.keySet().iterator(); outer
                    .hasNext();) {
                Object name = outer.next();
                assert name instanceof String : "not a string, name==" + name;
                StringBuffer sb = new StringBuffer(m + name + "==");
                Object temp = namedValues.get(name);
                assert temp instanceof String || temp instanceof Set : "neither string nor set, temp=="
                        + temp;
                if (temp instanceof String) {
                    sb.append(temp.toString());
                } else if (temp instanceof Set) {
                    @SuppressWarnings("unchecked")
                    Set<String> values = (Set<String>) temp;
                    sb.append("(" + values.size() + ") {");
                    String punct = "";
                    for (Iterator<String> it = values.iterator(); it.hasNext();) {
                        String value = it.next();
                        sb.append(punct + value);
                        punct = ",";
                    }
                    sb.append("}");
                }
                logger.debug(sb.toString());
            }
        }
    }
130378
def _check_input_names(symbol, names, typename, throw):
    """"""
    args = symbol.list_arguments()
    for name in names:
        if name in args:
            continue
        candidates = [arg for arg in args if
                      not arg.endswith('_weight') and
                      not arg.endswith('_bias') and
                      not arg.endswith('_gamma') and
                      not arg.endswith('_beta')]
        msg = "\033[91mYou created Module with Module(..., %s_names=%s) but " \
              "input with name '%s' is not found in symbol.list_arguments(). " \
              "Did you mean one of:\n\t%s\033[0m"%(
                  typename, str(names), name, '\n\t'.join(candidates))
        if throw:
            raise ValueError(msg)
        else:
            warnings.warn(msg)
663137
def withNamedValues(cls, **values):
        
        enums = set(cls.namedValues.items())
        enums.update(values.items())

        class X(cls):
            namedValues = namedval.NamedValues(*enums)
            subtypeSpec = cls.subtypeSpec + constraint.SingleValueConstraint(
                *values.values())

        X.__name__ = cls.__name__

        return X
979102
private final static boolean valuesMatch(Object value1, Object value2) {
        if (value1 == null) {
            return value2 == null;
        } else {
            return value1.equals(value2);
        }
    }
563544
function (name, value) {
            var overriddenMember = this._extend.prototype[name];
            if (undefined !== overriddenMember) {
                this._checkOverridenMember(value, overriddenMember);
            }
        }
1337566
public static final void checkTxAttrs(TransactionAttribute[] txAttrs,
                                          String[] methodNames, String[] methodSignatures,//PQ63130
                                          String[] checkedNames, String[] checkedSignatures,//PQ63130

                                          TransactionAttribute prescribedAttr)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "checkTxAttrs");
        for (int i = 0; i < methodNames.length; ++i) {
            for (int j = 0; j < checkedNames.length; ++j) {

                //PQ63130 added check of method signature
                if (((methodNames[i].equals(checkedNames[j])) && (methodSignatures[i].equals(checkedSignatures[j]))) | checkedNames[j].equals("*")) {

                    txAttrs[i] = prescribedAttr;
                    break;
                }
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "checkTxAttrs");

    }
497899
function (master, other, fnEqual) {
        
        if (!Arrays.isArrayLike(master))
            throw "TypeMismatch: master: Array";
        
        if (!Arrays.isArrayLike(other))
            throw "TypeMismatch: other: Array";
        
        var missing = [];
        
        for (var i = 0, len = master.length; i < len; i++) {
            
            var item = master[i];
            
            if (Arrays.indexOf(item, other, null, fnEqual) < 0)
                missing.push(item);
        }
        
        return missing;
    }