DupeCheck - Source Code Duplicate Finder
========================================

This program is freeware. It may be freely distributed as long as you include this file and all files in the original distribution archive without changes or additions. It is delivered to the end user "as is". The author is not responsible to any damages to the user's hard- or software.

All mentioned marks are property of their respective owners.

Copyright(c) 2006-2008, Software Union Luxembourg


Purpose
-------

This utility is provided for finding duplicate blocks in object pascal (Delphi) source code files. It reads all .pas files in a given directory and compares each line of every file found and displays the results. This can be useful for refactoring.


User Interface
--------------

Edit box: 
The path name for the source files can be entered here. This can be either a directory name, a source file name or a filelist name.

Button [...]: 
Alternatively, the path can be selected from a shell dialog which is shown when the button is pressed.

Checkbox Search subdirectory:
When checked, subdirectories will be traversed for files

Checkbox Filelist:
When checked, the file name entered in the Edit field will be used as input for source file names and directory names. The file list can contain both single source file names as well as directories. 

Button Start: 
After entering or selecting the path import will start. The state of the analysis process is shown by a progress bar. When import is complete, the information on duplicates will be written to a List as well in to a treeview. 

Listing:
Within the listing, the source and destination file names are displayed, as well as starting and ending line numbers of each block of duplicate code within the files.

The listing is sorted descending on the duplicate's length (longest duplicates come first).  

When double-clicking a line in the listing, a split view of both file segments will be shown in read-only mode. The duplicate blocks of source marked in a different color, line numbers shown.

Treeview:
Within the treeview, each unique duplicate is shown as a root node. Beneath those root nodes, the occurences of the duplicates are listed by file, including starting and ending number of the occurrence.

Preview Memo:
Whenever selecting an entry either in the listing or the treeview, the corresponding duplicate source will be displayed in the preview pane below the list.

Synchronizing Listing and Treeview Hierarchy can by achieved by cliking on a line while Ctrl key is held.


Configuration
-------------
For configuration, an .ini file will be used. It must reside in the applications directory and will be named dupecheck.ini.
If the file does not exist, it will be created automatically. It contains the followin entries:
[Config]
Path=<last selected path>	

StartLine=<Keyword for begin of analysis> 
Default is "IMPLEMENTATION". Since the program is intended for analyzing .pas (Delphi) files, that means the interface section is excluded. This greatly reduces dummy duplicates (like sequences of label1..n). 

MinLines=<Minimum length of duplicate>
Default is 3. Values below 3 will be changed to 3. Duplicates below this threshold will be ignored. 

Indexed=<0|1>
Default is 1. Leave it that way, it is for testing purposes only. If set to 0, analysis will run 8 times slower.

NativeStyle=<0|1> 
Default is 1, which means that windows is painting everything depending on theme. If set to 0, different styles can be used.

UiStyle=<0..3>
Try different UI styles. Works only when NativeStyle=0.



Miscellaneous
-------------
Multilanguage: Dupecheck was created in german language. However, if it recognizes a system with english language setting, the user interface will be in english.

If you want to translate it to any other language, drop me a mail at support<at>softwareunion<dot>lu and I will be happy to provide you with the files needed.

Version History
---------------
2008-03-08 version 1.3.5
- Again increased analysis speed
- Synchronizing views by Crl-Click on a row
- Duplicate list can be exported to Microsoft Excel file
- Made Ui Styles available
- In source comparison, duplicate blocks aren't selected anymore when opening the window, but have a distinct background color
- Introduced better memory management to assure very large quantities of lines to be processed without problems
- changed operations counter to 64 bit
 

2008-03-05 version 1.3.4
- Increased analysis speed by up to 30%
- New option to analyze files from all subdirectories, setting is also saved to ini
- New option to analyze any file by entering it's full name
- New Option to use a filelist as input
- Removed duplicate duplicates (sic!) from Hierarchical view
- Improved user interface
- display of number of files read in status message

2007-06-29 Version 1.3.3
- Size and position save and restore for popup with synedit and splitter position within synedit.

2007-06-29 Version 1.3.2
- Font and fontsize can be selected via system menu and is saved to ini and restored at startup
- Column width save and restore for treeview integrated
2007-06-27 Version 1.3.1
- Corrected localization. Automatic translation was not possible. Thanks to johnbee
- Position of the main form, splitter position as well as column widths for the listview are restored at startup.
2007-05-07 Initial release 1.3