Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Duplicated code detection tool (SDD)
Project Lead: Iryoung Jeong
Mentor: Pascal Rapicault
Implementing SDD for eclipse environment. SDD is an algorithm for detecting duplicated parts which are not just identical, but also similar ones in a large amount of source code in a reasonable time.
Contents
Motivation
When one is not really paying attention when reviewing other people's code, duplications can happen easily, especially when there are many developers working on the same code base, such as in open source projects. But detecting duplications by people is very ineffective and previous algorithms to detect automatically are too slow for practical purposes or limited in its features. So implementing SDD can be a solution for the problem because SDD can find almost-duplicated (not exactly same) parts practically and Eclipse has a very good infrastructure for SDD UI.
SDD
- The algorithm for detecting similar parts in large source.
- No dependency on specific languages, Not exact parts, Fast
CVS, downloads
- CVS - http://sourceforge.net/cvs/?group_id=169741
- Download - http://sourceforge.net/project/showfiles.php?group_id=169741
- (At first, there's some license issues which I have to use, so I uploaded a code to SF. But now the depencies is all removed. So I'll . And final step, I changed whole pakage name, and it changed the version of every files to 1.1. :(
How to Use
- Download plugin org.eclipse.soc.sdd_1.0.0.jar - http://sourceforge.net/project/showfiles.php?group_id=169741&package_id=193611&release_id=441043
- Copy the org.eclipse.soc.sdd_1.0.0.jar into plugins folder of Eclipse
- Run eclipse
- Choose project, click right-button of mouse, choose SDD -> extract similar parts
- Wait a minute..2 minutes..or more? :)
- Result will be appear in SimilarPartsResultView
- In SimilarPartsResultView
- Double click "part - 1" , then you can see the files
- Double click the filename
- You can see Opening of a editor for the file and selections which means similar parts
For changing properties for SDD
- Open properties page of project in Package Explorer or Navigator
- Choose SDD parts
- You can see 3 properties
- Pattern for file matching - pattern of target files for SDD
- N-neighbor Length - how 2 or 3 is suitable
- Minimum Chain Size - minimulm size of similar parts. Normally 15 or more is good. CAUTION: Below 10 can make Eclipse suspended.
- Click OK
How it works
- Using an Index, Inverted Index
Related Works
External Links
SDD in OOPSLA2005
Comments,Questions
- feel free to comment, ask