Bug 419374 - Equal files are not equal
Summary: Equal files are not equal
Status: NEW
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 11:25 EDT by Ed Willink CLA
Modified: 2018-03-07 09:00 EST (History)
0 users

See Also:


Attachments
Files to compare (60.79 KB, application/xml)
2013-10-14 11:25 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2013-10-14 11:25:02 EDT
Created attachment 236459 [details]
Files to compare

M2: The attachment contains two self-contained files that differ only in the reassignment of UUIDs.

EMF Compare reports 2000 differences.

There are zero model differences, although if there was an identity comparison option, the xmi:id differences could be reported when xmi:id's are used as the basis opf identity.

It is not the case that superclasses have changed.
Comment 1 Mikaël Barbero CLA 2013-10-18 12:41:14 EDT
Our strategy to match elements before comparing them is: 

- if there are ids (intrinsic or extrinsic), use them,
- if there is no, use content-based heuristic matching.

This strategy has been implemented because to match by ids is *much* faster than to match based on the objects contents. What we could offer is an action after the initial comparison to let you ask to EMF Compare to recompute the comparison without using the ids (like you can ask to text compare to ignore whitespace). What do you think?
Comment 2 Ed Willink CLA 2013-10-18 14:28:31 EDT
I realize that my test case is a bit wierd; identical model content with 50% xmi:ids equal and 50% regenerated. wierd; well actually it's a bug I'm working on.

However xmi:id is locally unique, and arguably a model difference is between two localities, so while discovering xmi:id equality may be a good clue about equality, discovering inequality does not mean difference.

So it could be good to pool the xmi:id equalities, then search for more matches structurally.

This could be controlled by two menu checkboxes:

- Identical xmi:id implies same object (default true)
- Distinct xmi:id implies different object (default true)

possibly also

- Identical ID implies same object (default false)
- Distinct ID implies different object (default false)

all defaulting to a project and workspace preference.