TU Darmstadt / ULB / TUbiblio

Nomen est Omen: Exploring and Exploiting Similarities between Argument and Parameter Names

Liu, Hui and Liu, Qiurong and Staicu, Cristian-Alexandru and Pradel, Michael and Luo, Yue (2016):
Nomen est Omen: Exploring and Exploiting Similarities between Argument and Parameter Names.
In: ICSE '16 Proceedings of the 38th International Conference on Software Engineering, ACM, Austin, Texas, ISBN 978-1-4503-3900-1,
DOI: 10.1145/2884781.2884841, [Conference or Workshop Item]

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

Item Type: Conference or Workshop Item
Erschienen: 2016
Creators: Liu, Hui and Liu, Qiurong and Staicu, Cristian-Alexandru and Pradel, Michael and Luo, Yue
Title: Nomen est Omen: Exploring and Exploiting Similarities between Argument and Parameter Names
Language: German
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 thecorresponding 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%.

Title of Book: ICSE '16 Proceedings of the 38th International Conference on Software Engineering
Number: 38
Publisher: ACM
ISBN: 978-1-4503-3900-1
Uncontrolled Keywords: Semantics, Java, Documentation, Open source software, Data collection
Divisions: Profile Areas
Profile Areas > Cybersecurity (CYSEC)
Event Location: Austin, Texas
Date Deposited: 14 Aug 2017 11:13
DOI: 10.1145/2884781.2884841
Identification Number: TUD-CS-2016-14766
Export:

Optionen (nur für Redakteure)

View Item View Item