mergeFlag must already be checked as false
505417
static double getHipConfidenceLB(final int lgK, final long numCoupons, final double hipEstAccum,
      final int kappa) {
    if (numCoupons == 0) { return 0.0; }
    assert lgK >= 4;
    assert (kappa >= 1) && (kappa <= 3);
    double x = hipErrorConstant;
    if (lgK <= 14) { x = (hipHighSideData[(3 * (lgK - 4)) + (kappa - 1)]) / 10000.0; }
    final double rel = x / sqrt(1 << lgK);
    final double eps = kappa * rel;
    final double est = hipEstAccum;
    double result = est / (1.0 + eps);
    if (result < numCoupons) { result = numCoupons; }
    return result;
  }
1001198
function mergeReferences (oldRefs, newRefs) {
    const _newRefs = _(newRefs);

    return _(oldRefs)
        .reject(function (oldRef) {
            return _newRefs.any(function (newRef) {
                return matches(oldRef, newRef);
            });
        })
        .concat(newRefs)
        .uniq()
        .sort()
        .value();
}
1277897
void merge(Settings other) {
    for (int i = 0; i < COUNT; i++) {
      if (!other.isSet(i)) continue;
      set(i, other.flags(i), other.get(i));
    }
  }
646654
private void checkDuplicateTokens(MutableTemplateInfo templateInfo) throws TemplateException {
        List<String> allTokenNames = new ArrayList<String>();
        for (TemplateTokenInfo tokenInfo : templateInfo.tokenInfos) {
            if (allTokenNames.contains(tokenInfo.getName())) {
                throw new TemplateException("Token name '"
                        + tokenInfo.getName() + "' duplicated in template '" +
                        templateInfo.name + "'.");
            } else {
                allTokenNames.add(tokenInfo.getName());
            }
        }
    }
759069
function(hasCustomMarkup, labelAttrs, defaultLabelAttrs, builtinDefaultLabelAttrs) {

        if (labelAttrs === null) return null;
        if (labelAttrs === undefined) {

            if (defaultLabelAttrs === null) return null;
            if (defaultLabelAttrs === undefined) {

                if (hasCustomMarkup) return undefined;
                return builtinDefaultLabelAttrs;
            }

            if (hasCustomMarkup) return defaultLabelAttrs;
            return joint.util.merge({}, builtinDefaultLabelAttrs, defaultLabelAttrs);
        }

        if (hasCustomMarkup) return joint.util.merge({}, defaultLabelAttrs, labelAttrs);
        return joint.util.merge({}, builtinDefaultLabelAttrs, defaultLabelAttrs, labelAttrs);
    }
113051
private static String mergeTags(ProbeTest mAnnotation, ProbeTestClass cAnnotation) {
        List<String> tags = new ArrayList<>();

        if (mAnnotation != null) {
            tags.addAll(Arrays.asList(mAnnotation.tags()));
        }

        if (cAnnotation != null) {
            tags.addAll(Arrays.asList(cAnnotation.tags()));
        }

        return Arrays.toString(tags.toArray(new String[tags.size()]));
    }
531541
def _merge_flags(new_flags, old_flags=None, conf='any'):
    '''
    
    '''
    if not old_flags:
        old_flags = []
    args = [old_flags, new_flags]
    if conf == 'accept_keywords':
        tmp = new_flags + \
            [i for i in old_flags if _check_accept_keywords(new_flags, i)]
    else:
        tmp = portage.flatten(args)
    flags = {}
    for flag in tmp:
        if flag[0] == '-':
            flags[flag[1:]] = False
        else:
            flags[flag] = True
    tmp = []
    for key, val in six.iteritems(flags):
        if val:
            tmp.append(key)
        else:
            tmp.append('-' + key)

    # Next sort is just aesthetic, can be commented for a small performance
    # boost
    tmp.sort(key=lambda x: x.lstrip('-'))
    return tmp
644490
function( flag, needsFlag ) {
					// optIn defaults implicit behavior to weak exclusion
					if ( optIn && !modules[ flag ] && !modules[ "+" + flag ] ) {
						excluded[ flag ] = false;
					}

					// explicit or inherited strong exclusion
					if ( excluded[ needsFlag ] || modules[ "-" + flag ] ) {
						excluded[ flag ] = true;

					// explicit inclusion overrides weak exclusion
					} else if ( excluded[ needsFlag ] === false &&
						( modules[ flag ] || modules[ "+" + flag ] ) ) {

						delete excluded[ needsFlag ];

						// ...all the way down
						if ( deps[ needsFlag ] ) {
							deps[ needsFlag ].forEach(function( subDep ) {
								modules[ needsFlag ] = true;
								excluder( needsFlag, subDep );
							});
						}
					}
				}
658092
function mergeObject(target, source, create) {
  if (!source || !target) return;
  for (let pn in source) {
    if (_.has(target, pn) || create)
      target[pn] = source[pn];
  }
}
49669
async function mergeSignatures(source, dest, attr, checkFn) {
  source = source[attr];
  if (source) {
    if (!dest[attr].length) {
      dest[attr] = source;
    } else {
      await Promise.all(source.map(async function(sourceSig) {
        if (!sourceSig.isExpired() && (!checkFn || await checkFn(sourceSig)) &&
            !dest[attr].some(function(destSig) {
              return util.equalsUint8Array(destSig.signature, sourceSig.signature);
            })) {
          dest[attr].push(sourceSig);
        }
      }));
    }
  }
}
1024022
protected void processIncludes(Map<String, String> mergeProps, URL rootURL, String includeProps) {
        if (includeProps == null)
            return;

        String props[] = includeProps.trim().split("\\s*,\\s*");
        for (String pname : props) {
            mergeProperties(mergeProps, rootURL, pname);
        }
    }
815336
public static void checkMapConfig(MapConfig mapConfig, MergePolicyProvider mergePolicyProvider) {
        checkNotNativeWhenOpenSource(mapConfig.getInMemoryFormat());
        checkMapMergePolicy(mapConfig, mergePolicyProvider);
        logIgnoredConfig(mapConfig);
    }
912368
function mergeMeta( elem ) {
		var attr = elem.attribs,
			old = _.where( destChildren, {
				name: 'meta'
			} ),
			merged = false;

		[ 'charset', 'name', 'http-equiv' ].forEach( function( meta ) {
			if ( !attr[ meta ] ) {
				return;
			}

			old.forEach( function( el ) {
				var idx;

				if ( ( el.attribs[ meta ] === attr[ meta ] ) ||
					( meta === 'charset' && el.attribs[ meta ] ) ) {
					idx = destChildren.indexOf( el );
					utils.replaceElement( el, elem );
					destChildren[ idx ] = elem;
					merged = true;
				}
			} );
		} );

		return merged;
	}
631367
function mergeArgumentsTemplate(template, arg, propertyName) {
  if (!template.hasOwnProperty(propertyName)) {
    template[propertyName] = {};
  }

  if (arg.hasOwnProperty(propertyName)) {

    if (!arg[propertyName]) {
      arg[propertyName] = {};
    }

    Object.keys(arg[propertyName]).forEach((key) => {
      if (template[propertyName].hasOwnProperty(key)) {
        throw new Error(propertyName + ' name used more than once: ' + key);
      }

      template[propertyName][key] = JSON.parse(JSON.stringify(arg[propertyName][key]));
    });
  }
}
32302
void markMerged() {
        Exceptions.checkNotClosed(this.closed, this);
        Preconditions.checkState(!this.merged, "StreamSegmentReadIndex %d is already merged.", this.metadata.getId());
        log.debug("{}: Merged.", this.traceObjectId);
        this.merged = true;
    }
527909
function _onDirtyFlagChange(event, doc) {
        if (doc && Inspector.connected() &&
                _server && agents.network && agents.network.wasURLRequested(_server.pathToUrl(doc.file.fullPath))) {
            // Set status to out of sync if dirty. Otherwise, set it to active status.
            _setStatus(_docIsOutOfSync(doc) ? STATUS_OUT_OF_SYNC : STATUS_ACTIVE);
        }
    }
989733
def is_merged(self):
        
        url = self._build_url('merge', base_url=self._api)
        return self._boolean(self._get(url), 204, 404)