Ok then it seems that Dude implementation targets a specific approach whereby only 2 fragments are compared against each other. What I am trying to represent in Moose are CloneClasses (code fragments) that are copied at least 6 times (computed with an external tool).
One possible way is to use DudeCodeFragment class to represent a clone class and each member/occurence of the code is represented with DudeDuplication. But in that case, DudeDuplication lacks the notion of an entity that contains a duplicated code.
Is this the right way or should I look somewhere else?
thanx
Usman
On Mon, May 7, 2012 at 6:17 PM, Richard Wettel richard.wettel@usi.chwrote:
referenceCode and duplicateCode are the two pieces that are similar. From the perspective of the algorithm, the referenceCode is the fragment of code that gets compared with all the other fragments, while duplicateCode is the one that matches referenceCode. There is no other (semantic) difference between them.
The signature of a duplication chain describes the sequence of exact chunks and non-matching gaps. For example:
E4.D1.E3
means:
- an exact chunk of 4 lines (4E)
- followed by 1 deleted line (1D) which means the line exists in the
referenceCode but not in the duplicateCode
- finally a exact chunk of 3 (3E)
If this is confusing, you can read more about it in my bachelor thesis or in the icsm2005 paper from: http://www.inf.usi.ch/phd/wettel/publications.html
I am talking about dude here, but I guess smalldude did not change its semantics.
Cheers Ricky
On May 7, 2012, at 17:02, Usman Bhatti usman.bhatti@gmail.com wrote:
Some questions on dude. I am using an external tool for computing
duplications and trying to instantiate appropriate entities in moose:
- What is referenceCode and duplicateCode in the context of SmallDude
and what is the difference between the two?
- What is a signature?
tx Usman _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev