Retrieving similar code fragments based on identifier similarity for defect detection

  • Authors:
  • Norihiro Yoshida;Takashi Ishio;Makoto Matsushita;Katsuro Inoue

  • Affiliations:
  • Osaka University, Machikaneyama-cho, Toyonaka, Osaka, Japan;Osaka University, Machikaneyama-cho, Toyonaka, Osaka, Japan;Osaka University, Machikaneyama-cho, Toyonaka, Osaka, Japan;Osaka University, Machikaneyama-cho, Toyonaka, Osaka, Japan

  • Venue:
  • DEFECTS '08 Proceedings of the 2008 workshop on Defects in large software systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.