移植:克隆的移植和鉴别试验

Tianyi Zhang, Miryung Kim
{"title":"移植:克隆的移植和鉴别试验","authors":"Tianyi Zhang, Miryung Kim","doi":"10.1145/3183440.3195038","DOIUrl":null,"url":null,"abstract":"Code clones are common in software. When applying similar edits to clones, developers often find it difficult to examine the runtime behavior of clones. The problem is exacerbated when some clones are tested, while their counterparts are not. To reuse tests for similar but not identical clones, Grafter transplants one clone to its counterpart by (1) identifying variations in identifier names, types, and method call targets, (2) resolving compilation errors caused by such variations through code transformation, and (3) inserting stub code to transfer input data and intermediate output values for examination. To help developers examine behavioral differences between clones, Grafter supports fine-grained differential testing at both the test outcome level and the internal program state level. Our evaluation shows that Grafter can successfully reuse tests and detect behavioral differences. The tool is available for download at http://web.cs.ucla.edu/~tianyi.zhang/grafter.html and the demo video is available at https://youtu.be/liqAeuM8s3U.","PeriodicalId":121436,"journal":{"name":"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings","volume":"24 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-05-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Grafter: transplantation and differential testing for clones\",\"authors\":\"Tianyi Zhang, Miryung Kim\",\"doi\":\"10.1145/3183440.3195038\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Code clones are common in software. When applying similar edits to clones, developers often find it difficult to examine the runtime behavior of clones. The problem is exacerbated when some clones are tested, while their counterparts are not. To reuse tests for similar but not identical clones, Grafter transplants one clone to its counterpart by (1) identifying variations in identifier names, types, and method call targets, (2) resolving compilation errors caused by such variations through code transformation, and (3) inserting stub code to transfer input data and intermediate output values for examination. To help developers examine behavioral differences between clones, Grafter supports fine-grained differential testing at both the test outcome level and the internal program state level. Our evaluation shows that Grafter can successfully reuse tests and detect behavioral differences. The tool is available for download at http://web.cs.ucla.edu/~tianyi.zhang/grafter.html and the demo video is available at https://youtu.be/liqAeuM8s3U.\",\"PeriodicalId\":121436,\"journal\":{\"name\":\"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings\",\"volume\":\"24 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-05-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3183440.3195038\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 40th International Conference on Software Engineering: Companion Proceeedings","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3183440.3195038","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

代码克隆在软件中很常见。当对克隆应用类似的编辑时,开发人员经常发现很难检查克隆的运行时行为。当一些克隆体被测试,而它们的对应体没有被测试时,问题就更加严重了。为了重用相似但不相同的克隆的测试,Grafter通过以下方式将一个克隆移植到对应的克隆中:(1)识别标识符名称、类型和方法调用目标的变化,(2)通过代码转换解决由这些变化引起的编译错误,以及(3)插入存根代码以传递输入数据和中间输出值以供检查。为了帮助开发人员检查克隆之间的行为差异,Grafter在测试结果级别和内部程序状态级别都支持细粒度的差异测试。我们的评估表明,Grafter可以成功地重用测试并检测行为差异。该工具可从http://web.cs.ucla.edu/~tianyi.zhang/grafter.html下载,演示视频可从https://youtu.be/liqAeuM8s3U下载。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Grafter: transplantation and differential testing for clones
Code clones are common in software. When applying similar edits to clones, developers often find it difficult to examine the runtime behavior of clones. The problem is exacerbated when some clones are tested, while their counterparts are not. To reuse tests for similar but not identical clones, Grafter transplants one clone to its counterpart by (1) identifying variations in identifier names, types, and method call targets, (2) resolving compilation errors caused by such variations through code transformation, and (3) inserting stub code to transfer input data and intermediate output values for examination. To help developers examine behavioral differences between clones, Grafter supports fine-grained differential testing at both the test outcome level and the internal program state level. Our evaluation shows that Grafter can successfully reuse tests and detect behavioral differences. The tool is available for download at http://web.cs.ucla.edu/~tianyi.zhang/grafter.html and the demo video is available at https://youtu.be/liqAeuM8s3U.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信