Retrieving similar code fragments based on identifier similarity for defect detection

Norihiro Yoshida, Takashi Ishio, Makoto Matsushita, Katsuro Inoue · 2008

Similar source code fragments, known as code clones, may involve similar defects caused by the same mistake. However, code clone detection tools cannot detect certain code fragments (e.g. modified after copy-and-pasted). To support developers who would like to detect such defects, we propose a method to retrieve similar code fragments in source code based on the similarity of identifiers between a query and a target code fragment. We present two case studies of similar defects in open source systems.

Read the paper · More papers on PaperTik