DocumentCode :
1999757
Title :
NICAD: Accurate Detection of Near-Miss Intentional Clones Using Flexible Pretty-Printing and Code Normalization
Author :
Roy, Chanchal K. ; Cordy, James R.
Author_Institution :
Sch. of Comput., Queen´´s Univ. Kingston, Kingston, ON
fYear :
2008
fDate :
10-13 June 2008
Firstpage :
172
Lastpage :
181
Abstract :
This paper examines the effectiveness of a new language- specific parser-based but lightweight clone detection approach. Exploiting a novel application of a source transformation system, the method accurately finds near-miss clones using an efficient text line comparison technique. The transformation system assists the method in three ways. First, using agile parsing it provides user-specified flexible pretty- printing to remove noise, standardize formatting and break program statements into parts such that potential changes can be detected as simple linewise text differences. Second, it provides efficient flexible extraction of potential clones to be compared using island grammars and agile parsing to select granularities and enumerate potential clones. Third, using transformation rules it provides flexible code normalization to allow for local editing differences between similar code segments and filtering out of uninteresting parts of potential clones. In this paper we introduce the theory and practice of the framework and demonstrate its use in finding function clones in C code. Early experiments indicate that the method is capable of finding near-miss clones with high precision and recall, and with reasonable performance.
Keywords :
grammars; program compilers; specification languages; text analysis; NICAD; agile parsing; code normalization; island grammars; language-specific parser; lightweight clone detection approach; near-miss clones; near-miss intentional clones; pretty-printing; source transformation system; text line comparison technique; Cloning; Filtering; Printing; Programming profession; Software systems; Clone Detection; Flexible Code Filtering; Flexible Code Normalization; Flexible Pretty-Printing; Near-Miss Intentional Clones;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Program Comprehension, 2008. ICPC 2008. The 16th IEEE International Conference on
Conference_Location :
Amsterdam
ISSN :
1092-8138
Print_ISBN :
978-0-7695-3176-2
Type :
conf
DOI :
10.1109/ICPC.2008.41
Filename :
4556129
Link To Document :
بازگشت