SABER: Identifying SimilAr BEhavioR for Program Comprehension

SABER: Identifying SimilAr BEhavioR for Program Comprehension
复制标题

DOI:
--
复制
发表时间:
2020
期刊:
--
影响因子:
--
通讯作者:
Aditya Sridhar;Guanming Qiao;G. Kaiser
Aditya Sridhar;Guanming Qiao;G. Kaiser
中科院分区:
其他
文献类型:
--
作者:
Aditya Sridhar;Guanming Qiao;G. Kaiser

文献摘要

相似文献

现代软件工程实践依赖程序理解作为提高开发人员生产力和软件可靠性的最基本底层组件。软件开发人员经常被要求处理不熟悉的代码,以便消除安全漏洞、移植和重构遗留代码,并根据用户期望的新特性增强软件。行为克隆(即行为相似的代码)的自动识别是一种程序理解技术,可以为开发人员提供帮助。其思路是识别其他“做同样事情”且可能更直观、文档更完善或者开发人员更熟悉的代码,以帮助他们理解手头的代码。与语法或结构代码克隆的检测不同,行为克隆检测需要执行工作负载或测试用例来找到对相同输入执行相似操作的代码。然而,行为克隆检测中一个尚未得到足够关注的关键问题是“优势证据”问题,该问题主张从有意义的测试用例执行中获取更有说服力的证据,以对行为相似性有信心。换句话说,某些输入的相似输出比其他输入的相似输出更重要。我们提出了一个新颖的系统SABER来解决“优势证据”问题,为此我们采用了“更有可能是真而非假”的证明责任这一法律隐喻。我们开发了一种新颖的测试用例生成方法,包含三种主要的动态分析技术,用于识别重要的行为克隆。此外,我们研究了过滤和加权方案,以引导开发人员关注与特定软件工程任务(如代码审查、调试和引入新特性)密切相关的最有说服力的行为相似性。
Modern software engineering practices rely on program comprehension as the most basic underlying component for improving developer productivity and software reliability. Software developers are often tasked to work with unfamiliar code in order to remove security vulnerabilities, port and refactor legacy code, and enhance software with new features desired by users. Automatic identification of behavioral clones , or behaviorally-similar code, is one program comprehension technique that can provide developers with assistance. The idea is to identify other code that “does the same thing” and that may be more intuitive; better documented; or familiar to the developer, to help them understand the code at hand. Unlike the detection of syntactic or structural code clones, behavioral clone detection requires executing workloads or test cases to find code that executes similarly on the same inputs. However, a key problem in behavioral clone detection that has not received adequate attention is the “preponderance of the evidence” problem, which advocates for more convincing evidence from nontrivial test case executions to gain confidence in the behavioral similarities. In other words, similar outputs for some inputs matter more than for others. We present a novel system, SABER, to address the “pre-ponderance of the evidence” problem, for which we adapt the legal metaphor of “more likely to be true than not true” burden of proof. We develop a novel test case generation methodology with three primary dynamic analysis techniques for identifying important behavioral clones. Further, we investigate filtering and weighting schemes to guide developers toward the most convincing behavioral similarities germane to specific software engineering tasks, such as code review, debugging, and introducing new features.