Identifying and Summarizing Systematic Code Changes via Rule Inference

Identifying and Summarizing Systematic Code Changes via Rule Inference
复制标题

DOI:
10.1109/tse.2012.16
复制
发表时间:
2013
影响因子:
7.4
通讯作者:
Miryung Kim;D. Notkin;D. Grossman;G. Wilson
Miryung Kim;D. Notkin;D. Grossman;G. Wilson
中科院分区:
计算机科学1区
文献类型:
--
作者:
Miryung Kim;D. Notkin;D. Grossman;G. Wilson

文献摘要

被引文献

相似文献

程序员通常需要对两个或多个程序版本之间的程序进行进化。关于程序更改的推理具有挑战性,因为程序员如何思考变化与现有程序差异工具如何代表这种变化之间存在显着差距。例如,即使对锁定协议的修改在概念上是简单而系统的,在代码级别上,DIFF提取了每个文件的分散文本添加和删除。为了使程序员能够在高级别上推论程序差异,本文提出了一种基于规则的程序差异方法,该方法会自动发现并将系统变化作为逻辑规则。为了证明这种方法的可行性,我们以Java中的两个不同的抽象级别实例化了此方法:首先在应用程序编程接口(API)名称和签名级别上,第二位于代码元素的级别(例如类型,方法,方法,,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法,方法和签名和字段)和结构依赖性(例如,方法呼叫,字段访问和亚型关系)。通过将其应用于多个开源项目以及与大型电子商务公司的专业软件工程师的焦点小组研究来证明这种方法的好处。
Programmers often need to reason about how a program evolved between two or more program versions. Reasoning about program changes is challenging as there is a significant gap between how programmers think about changes and how existing program differencing tools represent such changes. For example, even though modification of a locking protocol is conceptually simple and systematic at a code level, diff extracts scattered text additions and deletions per file. To enable programmers to reason about program differences at a high level, this paper proposes a rule-based program differencing approach that automatically discovers and represents systematic changes as logic rules. To demonstrate the viability of this approach, we instantiated this approach at two different abstraction levels in Java: first at the level of application programming interface (API) names and signatures, and second at the level of code elements (e.g., types, methods, and fields) and structural dependences (e.g., method-calls, field-accesses, and subtyping relationships). The benefit of this approach is demonstrated through its application to several open source projects as well as a focus group study with professional software engineers from a large e-commerce company.