Method name recommendation based on source code depository and feature matching

Yuan Gao, Hui Liu*, Xiao Zhong Fan, Zhen Dong Niu

*此作品的通讯作者

科研成果: 期刊稿件文章同行评审

6 引用 (Scopus)

摘要

Quality of method names is critical for the readability and maintainability of program. However, it is difficult for software engineers, especially non-English speaking, inexperienced engineers, to propose high quality method names. To address this issue, this paper proposes an approach to recommend method names. First, a method corpus is constructed from open source applications. For a given method f to be named, similar methods are retrieved from the method corpus. Names of these retrieved methods are divided into phrases, and features of these methods are extracted as well. A mapping between these phrases and features is also created to derive a list of candidate phrases and features for the method to be named. These phrases are finally constructed into candidate method names. The proposed approach is evaluated on 1 430 methods in open source applications. Evaluation results suggest that 22.7 percent of recommended method names are the same as original ones, and 57.9 percent has the same or almost the same keywords as original ones.

源语言英语
页(从-至)3062-3074
页数13
期刊Ruan Jian Xue Bao/Journal of Software
26
12
DOI
出版状态已出版 - 1 12月 2015

指纹

探究 'Method name recommendation based on source code depository and feature matching' 的科研主题。它们共同构成独一无二的指纹。

引用此