Skip to main navigation Skip to search Skip to main content

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

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

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%.

Original languageEnglish
Title of host publicationProceedings - 2016 IEEE/ACM 38th IEEE International Conference on Software Engineering Companion, ICSE 2016
PublisherIEEE Computer Society
Pages1063-1073
Number of pages11
ISBN (Electronic)9781450339001, 9781450342056
DOIs
Publication statusPublished - 14 May 2016
Event2016 IEEE/ACM 38th IEEE International Conference on Software Engineering, ICSE 2016 - Austin, United States
Duration: 14 May 201622 May 2016

Publication series

NameProceedings - International Conference on Software Engineering
Volume14-22-May-2016
ISSN (Print)0270-5257

Conference

Conference2016 IEEE/ACM 38th IEEE International Conference on Software Engineering, ICSE 2016
Country/TerritoryUnited States
CityAustin
Period14/05/1622/05/16

Keywords

  • Empirical study
  • Identifier names
  • Method arguments
  • Name-based program analysis
  • Static analysis

Fingerprint

Dive into the research topics of 'Nomenest omen: Exploring and exploiting similarities between argument and parameter names'. Together they form a unique fingerprint.

Cite this