Difference between revisions of "Duplicated code detection tool (SDD)"

From Eclipsepedia

Jump to: navigation, search
 
m (cat)
 
(9 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
'''Mentor''': Pascal Rapicault   
 
'''Mentor''': Pascal Rapicault   
  
Implementing SDD for eclipse environment. SDD is a algorithm for detecting duplicated parts which are not just identical, but also similar ones in large source code in reasonable time.
+
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.
  
 
== Motivation ==
 
== Motivation ==
  
Without always paying attention to reviewing other people's codes, duplications can happen easily especially there're many developers such as opensource projects. But detecting duplications by people is very ineffective and previous algorithms to detect automatically are too slow for practical purpose 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 very good infrastructure for SDD UI.
+
When one is not really paying attention when to review other people's code, duplications can easily happen. 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 ==
 
== SDD ==
Line 13: Line 13:
 
* No dependency on specific languages, Not exact parts, Fast  
 
* 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're some license issues which I have to use, so I uploaded a code to SF. But now there're no such dependencies. So I'll move to soc.eclipse.org soon. And at final step, I've changed the whole package names so every files' version are changed to 1.1. :(, and
 +
 +
=== 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 a project, click right-button of a mouse, choose SDD -> extract similar parts
 +
* Wait a minute..2 minutes..or more? :)
 +
* A result will be appeared in SimilarPartsResultView
 +
* In SimilarPartsResultView
 +
** Double click "part - #" , then you can see the filenames
 +
** Double click the filename
 +
** You can see selected codes, which mean similar parts, in a editor
 +
 +
=== For changing properties for SDD ===
 +
* Open a properties page of a project in Package Explorer or Navigator
 +
* Choose SDD part
 +
* You can change 3 properties
 +
** Pattern for a file matching - a pattern of the target files for SDD
 +
** N-neighbor Length - 2 or 3 will be suitable
 +
** Minimum Chain Size - a minimulm size of similar parts. Normally 15 or more is good. CAUTION: A Eclipse could be suspended with values near 1.
 +
* Click OK
 +
 +
=== Screenshots ===
 +
* [[Image:Sdd-1.jpg]]
 +
* [[Image:Sdd-2.jpg]]
 
=== How it works ===
 
=== How it works ===
* coming soon..;)
+
* Using an Index, Inverted Index
* Using a Index, Inverted Index
+
  
 
== Related Works ==
 
== Related Works ==
Line 23: Line 51:
  
 
==External Links==
 
==External Links==
  [http://oopsla.org/2005/ShowEvent.do?id=560 paper]
+
  [http://oopsla.org/2005/ShowEvent.do?id=560 SDD in OOPSLA2005]
 +
 
 +
==Comments,Questions==
 +
* feel free to comment, ask
 +
 
 +
[[Category:SOC]]

Latest revision as of 09:59, 14 October 2007

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

[edit] Motivation

When one is not really paying attention when to review other people's code, duplications can easily happen. 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.

[edit] SDD

  • The algorithm for detecting similar parts in large source.
  • No dependency on specific languages, Not exact parts, Fast

[edit] CVS, downloads

[edit] 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 a project, click right-button of a mouse, choose SDD -> extract similar parts
  • Wait a minute..2 minutes..or more? :)
  • A result will be appeared in SimilarPartsResultView
  • In SimilarPartsResultView
    • Double click "part - #" , then you can see the filenames
    • Double click the filename
    • You can see selected codes, which mean similar parts, in a editor

[edit] For changing properties for SDD

  • Open a properties page of a project in Package Explorer or Navigator
  • Choose SDD part
  • You can change 3 properties
    • Pattern for a file matching - a pattern of the target files for SDD
    • N-neighbor Length - 2 or 3 will be suitable
    • Minimum Chain Size - a minimulm size of similar parts. Normally 15 or more is good. CAUTION: A Eclipse could be suspended with values near 1.
  • Click OK

[edit] Screenshots

  • Sdd-1.jpg
  • Sdd-2.jpg

[edit] How it works

  • Using an Index, Inverted Index

[edit] Related Works

[edit] External Links

SDD in OOPSLA2005

[edit] Comments,Questions

  • feel free to comment, ask