FCFinder is now available on the web sites!

http://sourceforge.jp/projects/fcfinder/




Last Modified:2011/02/25

== Required
* jdk1.6
* FCFinder.jar


== How to Use
<CLI>
1.java -jar FCFinder.jar
2.FCFinder stores results into ./FC_TMP/easydb

* options
+ required
 * -l
  * target language. at least one of {'JAVA' 'C' 'CPP'} ('C' is included in 'CPP')
+ required (at least one of them)
 * -d
  * directory paths (multiple)
 * -dl
  * file that describes directory list
  * template: dirPathList.xml
 * -fl
  * file that describes file list (.xml)
  * template: filePathList.xml
+ optional
 * -m
  * min threshold of # of tokens in each file
  * default:15
 * -w
  * workspace for database and tokenized files
  * default:FC_TMP
 * -x
  * NG words. exclude files that include a NG word in their file paths
  * ex.) test, sample, example, tag, branch, ...

* example: java -jar FCFinder.jar -l JAVA C -dl unix_sample.xml -w WORK_TMP
 * from files described in "unix_sample.xml",
 * detect file clones from JAVA or C source files (.c, .h, .java)
 * "WORK_TMP" is used for database and tokenized files


== database scheme
+ tables
* FILE_INFO
 * file information
* APP_INFO
 * project (application) information
* CLONE_INFO
 * store group ID(GRUOP_ID)
* HASH_INFO
 * tokenized file information (its size and MD5 hash value)

+ columns
* CLONE_INFO.ID
 * refer FILE_INFO.ID
* CLONE_INFO.GROUP_ID
 * files which have same group ID are file clones


== cautions
* Java parser is enbugged
* All parse errors go out console stdout
* All tokenized files are stored into workspace (FC_TMP), you should execute on a nas machine.
* Use jvm options (-Xms, -Xmx) to prevent OutOfMemory
* Permission denied files will be skipped.


=== database compatibility
* Put "easydb" directory on your cwd when you use FCFinder
* Or, execute following sql files manually:
 * Make "easydb" directory on your environment
 * Use "ij" (http://db.apache.org/derby/)
1.FILE_REGISTER.sql
2.FILE_TOKENIZER.sql
3.CLONE_REGISTER.sql



