跳到主要导航 跳到搜索 跳到主要内容

Nomenest omen: Exploring and exploiting similarities between argument and parameter names

  • Hui Liu
  • , Qiurong Liu
  • , Cristian Alexandru Staicu
  • , Michael Pradel
  • , Yue Luo
  • Beijing Institute of Technology
  • Technische Universität Darmstadt

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Programmer-provided identifier names convey information about the semantics of a program. This information can complement traditional program analyses in various software engineering tasks, such as bug finding, code completion, and documentation. Even though identifier names appear to be a rich source of information, little is known about their properties and their potential usefulness. This paper presents an empirical study of the lexical similarity between arguments and parameters of methods, which is one prominent situation where names can provide otherwise missing information. The study involves 60 real-world Java programs. We find that, for most arguments, the similarity is either very high or very low, and that short and generic names often cause low similarities. Furthermore, we show that inferring a set of low-similarity parameter names from one set of programs allows for pruning such names in another set of programs. Finally, the study shows that many arguments are more similar to the corresponding parameter than any alternative argument available in the call site's scope. As applications of our findings, we present an anomaly detection technique that identifies 144 renaming opportunities and incorrect arguments in 14 programs, and a code recommendation system that suggests correct arguments with a precision of 83%.

源语言英语
主期刊名Proceedings - 2016 IEEE/ACM 38th IEEE International Conference on Software Engineering Companion, ICSE 2016
出版商IEEE Computer Society
1063-1073
页数11
ISBN(电子版)9781450339001, 9781450342056
DOI
出版状态已出版 - 14 5月 2016
活动2016 IEEE/ACM 38th IEEE International Conference on Software Engineering, ICSE 2016 - Austin, 美国
期限: 14 5月 201622 5月 2016

出版系列

姓名Proceedings - International Conference on Software Engineering
14-22-May-2016
ISSN(印刷版)0270-5257

会议

会议2016 IEEE/ACM 38th IEEE International Conference on Software Engineering, ICSE 2016
国家/地区美国
Austin
时期14/05/1622/05/16

指纹

探究 'Nomenest omen: Exploring and exploiting similarities between argument and parameter names' 的科研主题。它们共同构成独一无二的指纹。

引用此