- 1、本文档共26页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Evaluating Code Duplication Detection Techniques Van 评估代码复制检测技术范
Evaluating Code Duplication Detection TechniquesFilip Van Rysselberghe and Serge DemeyerLab On Re-EngineeringUniversity Of Antwerp Duplicated Code (a.k.a. code clone) Code duplication occurs when developers systematically copy previously existing code which solved a problem similar to the one they are currently trying to solve. Typically 5% to 10% of code, up to 50%. Variety of reasons duplication occurs. Associated Problems Errors can be difficult to fix. Change in requirements may be difficult to implement. Code size unnecessarily increased. Can lead to unused, dead code. Can be indicative of design problems. Bugs may be copied as well. Evaluating Duplicated Code Detection Techniques Authors set out to evaluate the qualities of several clone detection techniques and determine where they fit best into the software maintenance process. Compares 3 representative techniques on 5 small to medium size cases. Duplication Detection Techniques Authors suggest there are three groups of methods of detecting duplicated code: String based Token based Parse-tree based Research Structure Goal Questions Experimental Setup Selected Cases ScoreMaster TextEdit Brahms Jmocha JavaParser of JMetric Results: Portability Simple line matching most portable. Parameterized line matching and suffix tree matching are fairly portable. Metric based matching least portable. Results: What Kind of Matches Found? Metrics based approach find function block duplication. Simple string matching finds equal lines. Parameterized line matching finds duplicated lines. Suffix tree matching finds duplicated series of tokens. Results: Accuracy Number of false matches: Parameterized suffix tree matching and simple line matching find no false matches. Parameterized line matching finds few false matches. Metrics based matching finds many false positives when applying metrics to block fragments, only a few when applying to methods. Results: Accuracy Number of useless matches: Both parameterized methods retu
文档评论(0)