Norihiro Yoshida, T. Ishio, M. Matsushita, Katsuro Inoue
{"title":"Retrieving similar code fragments based on identifier similarity for defect detection","authors":"Norihiro Yoshida, T. Ishio, M. Matsushita, Katsuro Inoue","doi":"10.1145/1390817.1390830","DOIUrl":null,"url":null,"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.","PeriodicalId":193694,"journal":{"name":"DEFECTS '08","volume":"136 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-07-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"DEFECTS '08","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1390817.1390830","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5
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.