Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326756

Summary: nameSimilarityMetric should be symmetric
Product: [Modeling] EMFCompare Reporter: Erhard Weinell <weinell>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 373245    
Bug Blocks:    
Attachments:
Description Flags
check symmetric name similarity in test none

Description Erhard Weinell CLA 2010-10-01 05:49:27 EDT
We stumbled upon the fact that org.eclipse.emf.compare.match.internal.statistic.NameSimilarity.nameSimilarityMetric is not symmetric, e.g. nameSimilarityMetric(a,b) is not equivalent to nameSimilarityMetric(b,a).

Is this intended behavior or is this a bug?
Comment 1 Erhard Weinell CLA 2010-10-01 05:51:58 EDT
Created attachment 180032 [details]
check symmetric name similarity in test
Comment 2 Laurent Goubet CLA 2011-08-09 05:05:22 EDT
We can't make this metric symmetric without massively impacting the existing consumers of the project and/or its API. This will only be handled in the future major version of EMF Compare.
Comment 3 Cedric Brun CLA 2012-05-30 05:12:26 EDT
EMF Compare 2.0 is coming and with it an approach to match elements based on a distance and not on statistical similarity (the difference is subtle but important regarding scalability..)

This kind of similarity metric is useful though and has been kept in EMF Compare 2.0 and made symetric.

See : 
org.eclipse.emf.compare.utils.SimilarityUtil.diceCoefficient(String, String)
Comment 4 Laurent Goubet CLA 2013-01-17 08:32:23 EST
batch-closing a bunch of "RESOLVED" bugs.