On Tue, May 8, 2012 at 10:44 PM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
Hi,
On 8 May 2012, at 21:35, Usman Bhatti wrote:
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?
You should use DudeMultiplication, which holds a collection of
DudeDuplication entities.
This does not resolve the problem for me. Multiplication is just a place
holder for dude duplications and Dude is made for a 1-1 duplication model
and I do not have the same model. I'll try to create my own representation.
Cheers,
Doru
thanx
Usman
On Mon, May 7, 2012 at 6:17 PM, Richard Wettel <richard.wettel(a)usi.ch>
wrote:
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(a)gmail.com> wrote:
> Some questions on dude. I am using an external tool for computing
duplications and trying to instantiate appropriate entities in moose:
>
> 1. What is referenceCode and duplicateCode in the context of SmallDude
and
what is the difference between the two?
2. What
is a signature?
tx
Usman
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Sometimes the best solution is not the best solution."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev