Skip to content

bitfehler/duplo

Repository files navigation

# About This Fork

This is a fork of the _Duplo_ duplicate source code checker. It currently lives
at http://github.com/bitfehler/duplo. The original Duplo project page is at
http://sourceforge.net/projects/duplo, and the home page is
http://duplo.giants.ch (which seems to be the SF hosted home page.

I think code duplication can be a serious issue and found this tool to be quite
handy. It works well, yet I noticed its code could need some lovin' after all
these years. Since most other tools of this sort seem to be written in Java -
which most C programmers don't really like to deal with :) - I figured it would
be worthwhile creating this repo and spent some time on it. So, if you are
interested... well, happy forking!

Below is the original README reproduced in all its glory. It fails to mention
it, but for building the executable, just call _make_ ;)

# Original README
________________________________________________________________________________

Duplo (C/C++/Java Duplicate Source Code Block Finder)
http://sourceforge.net/projects/duplo, Version 0.2.0 Readme File, May 2006
________________________________________________________________________________

 CONTENTS
 
 1 GENERAL INFORMATION
 2 PERFORMANCE MEASUREMENTS
 3 BACKGROUND
 4 LICENSE
________________________________________________________________________________

1 GENERAL INFORMATION

Duplicated source code blocks can harm maintainability of software systems.
Duplo is a tool to find duplicated code blocks in large C, C++, Java, C# and 
VB.Net systems.

- Sample output snippet -
...
src\engine\geometry\simple\TorusGeometry.cpp(56)
src\engine\geometry\simple\SphereGeometry.cpp(54)
	pBuffer[currentIndex*size+3]=(i+1)/(float)subdsU;
	pBuffer[currentIndex*size+4]=j/(float)subdsV;
	currentIndex++;
	pPrimitiveBuffer->unlock();

src\engine\geometry\subds\SubDsGeometry.cpp(37)
src\engine\geometry\SkinnedMeshGeometry.cpp(45)
    pBuffer[i*size+0]=m_ct[0]->m_pColors[i*3];
    pBuffer[i*size+1]=m_ct[0]->m_pColors[i*3+1];
    pBuffer[i*size+2]=m_ct[0]->m_pColors[i*3+2];
...
- Snippet end -----------

1.1 OPTIONS

Run "duplo --help" on the command line to see the detailed options.

1.2 FEEDBACK AND BUG REPORTING

Please send Feedback and Bug Reports to: [email protected]

1.3 FILE LIST GENERATION

Generate a list of all files of a directory with:

Windows
 dir /s /b /a-d *.cpp *.h > files.lst

UNIX
 find -name "*.cpp" > cppList.lst
 find -name "*.h" > includeList.lst
 cat cppList.lst includeList.lst > all.lst
________________________________________________________________________________

2 PERFORMANCE MEASUREMENTS

SYSTEM                  FILES     LOCs   TIME   HARDWARE
3D Game Engine            275    12211   4sec   3.4GHZ P4
Quake2                    266   102740  58sec   3.4GHZ P4
Computer Game            5639   754320  34min   3.4GHZ P4
Linux Kernel 2.6.11.10  17034  4184356  16h     3.4GHZ P4
________________________________________________________________________________

3 BACKGROUND

Duplo uses the same techniques as Duploc to detect duplicated code blocks. See
http://www.iam.unibe.ch/~scg/Archive/Papers/Duca99bCodeDuplication.pdf for 
further information.
________________________________________________________________________________

4 LICENSE

Duplo is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Duplo; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
________________________________________________________________________________
                                   2005, Christian M. Ammann ([email protected])

About

Fork of the Duplo duplicate source code checker from http://sourceforge.net/projects/duplo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published