Recommending verbs for rename method using association rule mining
Authors:
- 1 February 2014
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 323-327
Abstract
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.Keywords
This publication has 9 references indexed in Scilit:
- Using IR methods for labeling source code artifacts: Is it worthwhile?2012
- Finding and fixing Java naming bugs with the Lancelot Eclipse plugin2012
- Building Domain Specific Dictionaries of Verb-Object Relation from Source Code2011
- Towards automatically generating summary comments for Java methods2010
- Fundamental Nano-Patterns to Characterize and Classify Java MethodsElectronic Notes in Theoretical Computer Science, 2010
- The Programmer's Lexicon, Volume I: The Verbs2007
- What’s in a Name? A Study of Identifiers2006
- Towards supporting on-demand virtual remodularization using program graphs2006
- Mining association rules between sets of items in large databases1993