Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Possible issues with EMF compare?
Possible issues with EMF compare? [message #727495] Wed, 21 September 2011 12:58 Go to next message
Doug Tedd is currently offline Doug TeddFriend
Messages: 2
Registered: September 2011
Location: Belgium
Junior Member
I am investigating the use of EMF Compare for a project where I need to be able to perform a 3-way match + diff + merge. I created a number of tests cases for the scenarios that need to be supported to see what sort of results EMF compare would give. Using EMF compare 1.2, a number of the cases give unexpected results and one even results in an ArrayIndexOutOfBounds exception. I see from recent blog posts that a lot of effort is being put into fixing issues for version 1.3. So, I switched to the latest 1.3.0 nightly build from 2011-09-12. With this version, the ArrayIndexOutOfBounds exception is solved but some of the other unexpected behaviors still exist. Here are the scenarios:

Scenario 1
For attributes, running a diff on each of the following situations results in a Conflicting UpdateAttribute. In these situations, I would not expect to see either a Conflict or a difference as the exact same changes are made to both the local and remote models:
- Add the same new attribute to the local and remote models and give them the exact same value.
- Update the same existing attribute on the local and remote models with the exact same value.
- Delete the same existing attribute from the local and remote models.

Scenario 2
For ordered references that are either contained or uncontained, if the order of references is changed in the remote model and left untouched in the local model, the ReferenceOrderChange difference indicates that the change was local instead of remote i.e. calling isRemote() returns false.

Scenario 3
For ordered references that are either contained or uncontained, if a change in is made in the order to the local and remote references I would expect to see a conflict. However, the ReferenceOrderChange difference does not indicate that a conflicting change was made i.e. calling isConflicting() returns false.

Scenario 4
For an uncontained ordered reference, deleting a reference from the remote model and leaving the local model untouched results in 2 differences: ReferenceChangeLeftTarget and ReferenceOrderChange. The ReferenceChangeLeftTarget is expected due to the deletion of the reference but the reference order change was not expected.
A similar situation exists (unexpected ReferenceOrderChange) for deleting from the local only and when deleting a difference reference from the local and remote.

Scenario 5
For an uncontained ordered reference, a reference is removed from a container in the local model. In the equivalent container in the remote model, the location of a reference is moved. Performing a merge on this (remote to local/right to left) results in the local and remote models being different from each other. The local model has regained its removed reference and the remote model has one of its references removed (the one that was originally removed from the local model).

Please could someone have a look at these scenarios? Maybe they are issues or maybe it is simply my misunderstanding of how the compare should work.

I have attached an eclipse project containing the test model and tests cases that I used. Also, I managed to find a workaround for scenarios 1 to 4 by patching 2 files. The patched version of these files are also attached:



[Updated on: Wed, 21 September 2011 15:26]

Report message to a moderator

Re: Possible issues with EMF compare? [message #727592 is a reply to message #727495] Wed, 21 September 2011 15:29 Go to previous messageGo to next message
Doug Tedd is currently offline Doug TeddFriend
Messages: 2
Registered: September 2011
Location: Belgium
Junior Member
Correction on scenario 5: It should have been moving a reference in a local container and removing from the remote container. Removing from local and moving in remote works as expected.

The attachment with the test cases has been updated with this correction.
Re: Possible issues with EMF compare? [message #755343 is a reply to message #727495] Tue, 08 November 2011 08:30 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1784
Registered: July 2009
Senior Member
Hi Doug,

Sorry about the much delayed response, this part of the forum is not the accurate section for EMF Compare questions (or rather, I didn't even know this section existed) : questions about EMF Compare should be asked on by prefixing your questions with "[EMF Compare]".

Given the delay with which I answer and the amount of work that has been put into the fixing of EMF Compare's merge, I haven't taken a look at all of your use cases. We have added a number of unit tests (more than 4000) for the different use cases we could think of; greatly enhancing in the process :

- Comparison of references (proxy or not, in scope or not)
- Scalability (memory leaks fixed)
- Comparison time

There is a good chance your use cases have been fixed in the meantime, the 1.3M3 build will be available today if you fancy testing.

Laurent Goubet
Previous Topic:[EMF Compare] [Compare] Extension point for IPAF registration
Next Topic:Where is eclipse compare 0.7 archive?
Goto Forum:

Current Time: Sun Apr 30 13:26:45 GMT 2017

Powered by FUDForum. Page generated in 0.04687 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software