Recommending verbs for rename method using association rule mining

Recommending verbs for rename method using association rule mining
复制标题

DOI:
10.1109/csmr-wcre.2014.6747186
复制
发表时间:
2014-02
期刊:
2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE)
影响因子:
--
通讯作者:
Yuki Kashiwabara;Yuya Onizuka;T. Ishio;Yasuhiro Hayase;Tetsuo Yamamoto;Katsuro Inoue
Yuki Kashiwabara;Yuya Onizuka;T. Ishio;Yasuhiro Hayase;Tetsuo Yamamoto;Katsuro Inoue
中科院分区:
其他
文献类型:
--
作者:
Yuki Kashiwabara;Yuya Onizuka;T. Ishio;Yasuhiro Hayase;Tetsuo Yamamoto;Katsuro Inoue

文献摘要

被引文献

相似文献

标识符是程序可读性的关键因素之一。面向对象程序中的方法名是重要的标识符,因为方法名用于理解方法的行为,而无需读取程序的一部分。众所周知,根据一般准则,每个方法名都应该由动词和对象组成。然而,一致地命名方法并不容易,因为每个开发人员可能对方法名称中使用的动词和对象有不同的理解。为了使开发人员能够一致且轻松地命名方法,我们首先关注方法名中使用的动词。在本文中,我们提出了一种为方法名推荐候选动词的技术,以便开发人员可以为方法名使用一致的动词。给定一个方法,我们通过使用关联规则,推荐在与给定方法相似的许多其他方法中使用的动词列表。我们已经从445个OSS项目中提取了关联规则,并将这些规则应用到两个项目中。结果,提取的规则可以为我们方法覆盖的60.6%的方法推荐前10个候选中的当前动词。此外,我们还确定了四组有意义的动词推荐规则。
An identifier is one of the crucial elements for program readability. Method names in an object-oriented program are important identifiers because method names are used for understanding the behavior of the methods without reading a part of the program. It is well-known that each method name should consist of a verb and objects according to general guidelines. However, it is not easy to name methods consistently since each of the developers may have a different understanding of the verbs and objects used in the method names. As a first step to enable developers to name methods consistently and easily, we focus on the verbs used in the method names. In this paper, we present a technique to recommend candidate verbs for a method name so that developers can use consistent verbs for method names. Given a method, we recommend a list of verbs used in many other methods similar to the given method, by using association rules. We have extracted association rules from 445 OSS projects and applied these rules to two projects. As a result, the extracted rules could recommend the current verbs in the top 10 candidates for 60.6% of the methods covered by our approach. Furthermore, we have identified four meaningful groups of rules for verb recommendation.