Internal method to support CompareManagedObject functionality.
480494
def Compare(fromMo, toMo, diff):
	
	from UcsBase import UcsUtils

	if (fromMo.classId != toMo.classId):
		return CompareStatus.TypesDifferent

	for prop in UcsUtils.GetUcsPropertyMetaAttributeList(str(fromMo.classId)):
		propMeta = UcsUtils.IsPropertyInMetaIgnoreCase(fromMo.classId, prop)
		if propMeta != None:
			if ((propMeta.access == UcsPropertyMeta.Internal) or (propMeta.access == UcsPropertyMeta.ReadOnly) or (
						prop in toMo._excludePropList)):
				continue
			if ((toMo.__dict__.has_key(prop)) and (fromMo.getattr(prop) != toMo.getattr(prop))):
				diff.append(prop)

	if (len(diff) > 0):
		return CompareStatus.PropsDifferent

	return CompareStatus.Equal
900460
@Override
  public int compareTo(Object other) {
    if (other == null) {
      return -1;
    }
    TaskKey otherKey = (TaskKey) other;
    return new CompareToBuilder().appendSuper(super.compareTo(otherKey))
        .append(this.taskId, otherKey.getTaskId())
        .toComparison();
  }
470475
@Override
    public int compare(DependencyReportToArchiveEdgeModel o1, DependencyReportToArchiveEdgeModel o2)
    {
        String path1 = o1.getFullPath();
        String path2 = o2.getFullPath();
        return filePathComparator.compare(path1, path2);
    }
1133139
@Override
    public final JSONCompareResult compareJSON(JSONObject expected, JSONObject actual) throws JSONException {
        JSONCompareResult result = new JSONCompareResult();
        compareJSON("", expected, actual, result);
        return result;
    }
382927
private int compare(Object key1, Object key2) {
        if (comparator == null)
            return ((Comparable) key1).compareTo(key2);
        else
            return comparator.compare(key1, key2);
    }
1185213
@Override
  public int compareTo(IVersion other)
  {
    if (other instanceof SemanticVersion) {
      SemanticVersion sv = (SemanticVersion) other;
      // If neither is named, then compare them as semantic values
      return this.head.compareTo(sv.head);
    }
    else {
      // Fall back to simple string comparison
      return toString().compareTo(other.toString());
    }
  }
34412
public int compareTo(Object o) {
        if (o.getClass() == MmsParameter.class) {
            return name.compareTo(((MmsParameter)o).getName());
        }
        return name.compareTo((String)o);
    }
439399
void compareTypes(Schema oldSchema,
                                           Schema newSchema,
                                           List<Message> messages,
                                           String name) {
        oldSchema = stripOptionalTypeUnion(oldSchema);
        newSchema = stripOptionalTypeUnion(newSchema);
        Schema.Type oldType = oldSchema.getType();
        Schema.Type newType = newSchema.getType();

        if(oldType != Type.UNION && newType == Type.UNION) {
            boolean compatibleTypeFound = false;
            for(Schema s: newSchema.getTypes()) {
                if((oldType != Type.RECORD && oldType == s.getType())
                   || (oldType == Type.RECORD && s.getType() == Type.RECORD && oldSchema.getName()
                                                                                        .equals(s.getName()))) {
                    compareTypes(oldSchema, s, messages, name);
                    compatibleTypeFound = true;
                    break;
                }
            }

            if(compatibleTypeFound) {
                messages.add(new Message(Level.INFO,
                                         "Type change from " + oldType + " to " + newType
                                                 + " for field " + name
                                                 + ". The new union includes the original type."));
            } else {
                messages.add(new Message(Level.ERROR,
                                         "Incompatible type change from "
                                                 + oldType
                                                 + " to "
                                                 + newType
                                                 + " for field "
                                                 + name
                                                 + ". The new union does not include the original type."));
            }
        } else if(oldType == Type.RECORD) {
            if(!_recordStack.contains(oldSchema.getName())) {
                _recordStack.add(oldSchema.getName());
                compareRecordTypes(oldSchema, newSchema, messages, name);
                _recordStack.remove(oldSchema.getName());
            }
        } else if(oldType == Type.ENUM) {
            compareEnumTypes(oldSchema, newSchema, messages, name);
        } else if(oldType == Type.ARRAY) {
            compareArrayTypes(oldSchema, newSchema, messages, name);
        } else if(oldType == Type.MAP) {
            compareMapTypes(oldSchema, newSchema, messages, name);
        } else if(oldType == Type.UNION) {
            compareUnionTypes(oldSchema, newSchema, messages, name);
        } else if(oldType == Type.FIXED) {
            compareFixedTypes(oldSchema, newSchema, messages, name);
        } else {
            comparePrimitiveTypes(oldSchema, newSchema, messages, name);
        }
    }
296659
@Override
    public int compareTo(Object obj) throws ClassCastException {

        URI another = (URI) obj;
        if (!equals(_authority, another.getRawAuthority())) { 
            return -1;
        }
        return toString().compareTo(another.toString());
    }
643491
def _compare_records(src, sink, strict=False):
    # type: (MutableMapping[Text, Any], MutableMapping[Text, Any], bool) -> bool
    

    def _rec_fields(rec):  # type: (MutableMapping[Text, Any]) -> MutableMapping[Text, Any]
        out = {}
        for field in rec["fields"]:
            name = shortname(field["name"])
            out[name] = field["type"]
        return out

    srcfields = _rec_fields(src)
    sinkfields = _rec_fields(sink)
    for key in six.iterkeys(sinkfields):
        if (not can_assign_src_to_sink(
                srcfields.get(key, "null"), sinkfields.get(key, "null"), strict)
                and sinkfields.get(key) is not None):
            _logger.info("Record comparison failure for %s and %s\n"
                         "Did not match fields for %s: %s and %s",
                         src["name"], sink["name"], key, srcfields.get(key),
                         sinkfields.get(key))
            return False
    return True
925028
public int compareTo(Object o) {
		ViewDescriptor castObj = (ViewDescriptor)o;
		return this.getDisplayName().compareToIgnoreCase(castObj.getDisplayName());
	}
1299903
public boolean checkEquivalenceHelper(
      TemplateTypeMap that, EquivalenceMethod eqMethod, SubtypingMode subtypingMode) {
    return checkEquivalenceHelper(that, eqMethod, EqCache.create(), subtypingMode);
  }
591381
private boolean updateExistingObject(DBObject dbObj, Map<String, String> currScalarMap) {
        if (objectIsChangingShards(dbObj, currScalarMap)) {
            return updateShardedObjectMove(dbObj);
        } else {
            return updateObjectSameShard(dbObj, currScalarMap);
        }
    }
1154244
public boolean notEquals(XObject obj2) throws javax.xml.transform.TransformerException
  {
    return compare(obj2, S_NEQ);
  }
658506
def compare_changes(obj, **kwargs):
    '''
    
    '''
    changes = {}
    for k, v in obj.items():
        if k in kwargs:
            if v != kwargs[k]:
                changes[k] = kwargs[k]
    return changes
345893
def _compare(self, other, method):
        """"""
        # This needs to be updated to take uncertainty into account:
        if isinstance(other, abc_mapping_primitives.Coordinate):
            if self.get_dimensions() != other.get_dimensions():
                return False
            other_values = other.get_values()
            for index in range(self._dimensions):
                if not method(self._values[index], other_values[index]):
                    return False
            return True
        return NotImplemented
745995
def comparelist_view(self, request, object_id, extra_context=None):
        """"""
        opts = self.model._meta
        object_id = unquote(object_id)
        current = get_object_or_404(self.model, pk=object_id)
        # As done by reversion's history_view
        action_list = [
            {
                "revision": version.revision,
                "url": reverse("%s:%s_%s_compare" % (self.admin_site.name, opts.app_label, opts.model_name), args=(quote(version.object_id), version.id)),
            } for version in self._reversion_order_version_queryset(Version.objects.get_for_object_reference(
                self.model,
                object_id).select_related("revision__user"))]
        context = {"action_list": action_list,
                   "opts": opts,
                   "object_id": quote(object_id),
                   "original": current,
                  }
        extra_context = extra_context or {}
        context.update(extra_context)
        return render(request, self.compare_list_template or self._get_template_list("compare_list.html"),
                      context)