// Check order items for conflicts
189586
func (r Product_Order) CheckItemConflicts(itemPrices []datatypes.Product_Item_Price) (resp bool, err error) {
	params := []interface{}{
		itemPrices,
	}
	err = r.Session.DoRequest("SoftLayer_Product_Order", "checkItemConflicts", params, &r.Options, &resp)
	return
}
282410
func (gco *GCOp) checkConflict(
	ctx context.Context, renamer ConflictRenamer, mergedOp op,
	isFile bool) (crAction, error) {
	return nil, nil
}
1023514
func orderValid(order *corepb.Order) bool {
	return order.Id != nil && order.BeganProcessing != nil && order.Created != nil && newOrderValid(order)
}
1143915
func Order(a, b interface{}) int {
	return OrderR(reflect.ValueOf(a), reflect.ValueOf(b))
}
1114927
func (s *UpdateByQueryService) Conflicts(conflicts string) *UpdateByQueryService {
	s.conflicts = conflicts
	return s
}
430989
func matchItems(p *property.PhysicalProperty, items []*ByItems) bool {
	if len(items) < len(p.Items) {
		return false
	}
	for i, col := range p.Items {
		sortItem := items[i]
		if sortItem.Desc != col.Desc || !sortItem.Expr.Equal(nil, col.Col) {
			return false
		}
	}
	return true
}
656370
func CheckPathConflicts(c *Compiler, exists func([]string) (bool, error)) Errors {
	var errs Errors

	root := c.RuleTree.Child(DefaultRootDocument.Value)
	if root == nil {
		return nil
	}

	for _, node := range root.Children {
		errs = append(errs, checkDocumentConflicts(node, exists, nil)...)
	}

	return errs
}
1346653
func (l *txList) Overlaps(tx *types.Transaction) bool {
	return l.txs.Get(tx.Nonce()) != nil
}
1266957
func validatePatchWithSetOrderList(patchList, setOrderList interface{}, mergeKey string) error {
	typedSetOrderList, ok := setOrderList.([]interface{})
	if !ok {
		return mergepatch.ErrBadPatchFormatForSetElementOrderList
	}
	typedPatchList, ok := patchList.([]interface{})
	if !ok {
		return mergepatch.ErrBadPatchFormatForSetElementOrderList
	}
	if len(typedSetOrderList) == 0 || len(typedPatchList) == 0 {
		return nil
	}

	var nonDeleteList, toDeleteList []interface{}
	var err error
	if len(mergeKey) > 0 {
		nonDeleteList, toDeleteList, err = extractToDeleteItems(typedPatchList)
		if err != nil {
			return err
		}
	} else {
		nonDeleteList = typedPatchList
	}

	patchIndex, setOrderIndex := 0, 0
	for patchIndex < len(nonDeleteList) && setOrderIndex < len(typedSetOrderList) {
		if containsDirectiveMarker(nonDeleteList[patchIndex]) {
			patchIndex++
			continue
		}
		mergeKeyEqual, err := mergeKeyValueEqual(nonDeleteList[patchIndex], typedSetOrderList[setOrderIndex], mergeKey)
		if err != nil {
			return err
		}
		if mergeKeyEqual {
			patchIndex++
		}
		setOrderIndex++
	}
	// If patchIndex is inbound but setOrderIndex if out of bound mean there are items mismatching between the patch list and setElementOrder list.
	// the second check is is a sanity check, and should always be true if the first is true.
	if patchIndex < len(nonDeleteList) && setOrderIndex >= len(typedSetOrderList) {
		return fmt.Errorf("The order in patch list:\n%v\n doesn't match %s list:\n%v\n", typedPatchList, setElementOrderDirectivePrefix, setOrderList)
	}
	typedPatchList = append(nonDeleteList, toDeleteList...)
	return nil
}
1362499
func (c *Constraint) Check(v *Version) bool {
	return c.f(v, c.check)
}
818316
func (s *PutMappingService) IgnoreConflicts(ignoreConflicts bool) *PutMappingService {
	s.ignoreConflicts = &ignoreConflicts
	return s
}
743817
func (m *Order) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateOrderID(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateOrderLines(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
230190
func checkHostPortConflicts(containers []core.Container, fldPath *field.Path) field.ErrorList {
	allPorts := sets.String{}
	return AccumulateUniqueHostPorts(containers, &allPorts, fldPath)
}
1140178
func (rule *overlappingFieldsCanBeMergedRule) findConflict(parentFieldsAreMutuallyExclusive bool, responseName string, field *fieldDefPair, field2 *fieldDefPair) *conflict {

	parentType1 := field.ParentType
	ast1 := field.Field
	def1 := field.FieldDef

	parentType2 := field2.ParentType
	ast2 := field2.Field
	def2 := field2.FieldDef

	// If it is known that two fields could not possibly apply at the same
	// time, due to the parent types, then it is safe to permit them to diverge
	// in aliased field or arguments used as they will not present any ambiguity
	// by differing.
	// It is known that two parent types could never overlap if they are
	// different Object types. Interface or Union types might overlap - if not
	// in the current state of the schema, then perhaps in some future version,
	// thus may not safely diverge.
	_, isParentType1Object := parentType1.(*Object)
	_, isParentType2Object := parentType2.(*Object)
	areMutuallyExclusive := parentFieldsAreMutuallyExclusive || parentType1 != parentType2 && isParentType1Object && isParentType2Object

	// The return type for each field.
	var type1 Type
	var type2 Type
	if def1 != nil {
		type1 = def1.Type
	}
	if def2 != nil {
		type2 = def2.Type
	}

	if !areMutuallyExclusive {
		// Two aliases must refer to the same field.
		name1 := ""
		name2 := ""

		if ast1.Name != nil {
			name1 = ast1.Name.Value
		}
		if ast2.Name != nil {
			name2 = ast2.Name.Value
		}
		if name1 != name2 {
			return &conflict{
				Reason: conflictReason{
					Name:    responseName,
					Message: fmt.Sprintf(`%v and %v are different fields`, name1, name2),
				},
				FieldsLeft:  []ast.Node{ast1},
				FieldsRight: []ast.Node{ast2},
			}
		}

		// Two field calls must have the same arguments.
		if !sameArguments(ast1.Arguments, ast2.Arguments) {
			return &conflict{
				Reason: conflictReason{
					Name:    responseName,
					Message: `they have differing arguments`,
				},
				FieldsLeft:  []ast.Node{ast1},
				FieldsRight: []ast.Node{ast2},
			}
		}
	}

	if type1 != nil && type2 != nil && doTypesConflict(type1, type2) {
		return &conflict{
			Reason: conflictReason{
				Name:    responseName,
				Message: fmt.Sprintf(`they return conflicting types %v and %v`, type1, type2),
			},
			FieldsLeft:  []ast.Node{ast1},
			FieldsRight: []ast.Node{ast2},
		}
	}

	// Collect and compare sub-fields. Use the same "visited fragment names" list
	// for both collections so fields in a fragment reference are never
	// compared to themselves.
	selectionSet1 := ast1.SelectionSet
	selectionSet2 := ast2.SelectionSet
	if selectionSet1 != nil && selectionSet2 != nil {
		conflicts := rule.findConflictsBetweenSubSelectionSets(areMutuallyExclusive, GetNamed(type1), selectionSet1, GetNamed(type2), selectionSet2)
		return subfieldConflicts(conflicts, responseName, ast1, ast2)
	}
	return nil
}
728849
func checkAdminPolicyListSyntax(ctx *cli.Context) {
	if len(ctx.Args()) < 1 || len(ctx.Args()) > 2 {
		cli.ShowCommandHelpAndExit(ctx, "list", 1) // last argument is exit code
	}
}
84000
func (fs *FlagSet) CheckArgs() (message string) {
	for _, req := range fs.nArgRequirements {
		var arguments string
		if req.N == 1 {
			arguments = "1 argument"
		} else {
			arguments = fmt.Sprintf("%d arguments", req.N)
		}

		str := func(kind string) string {
			return fmt.Sprintf("%q requires %s%s", fs.name, kind, arguments)
		}

		switch req.Type {
		case Exact:
			if fs.NArg() != req.N {
				return str("")
			}
		case Max:
			if fs.NArg() > req.N {
				return str("a maximum of ")
			}
		case Min:
			if fs.NArg() < req.N {
				return str("a minimum of ")
			}
		}
	}
	return ""
}
1322618
func (a *aliaser) check() {
	for i := range a.aliases {
		for j := range a.aliases {
			if i == j {
				continue
			}
			a1 := a.aliases[i]
			a2 := a.aliases[j]
			if a1.dst == a2.dst {
				ice("duplicate aliases")
			}
			if a1.overlap(a2.region).size != 0 {
				ice("overlapping aliases")
			}
		}
	}
}