Abstract

Informative identifiers are crucial for the comprehensibility and maintainability of programs. Exploring properties of identifiers and investigating their impact on software artifacts have been an important research focus. However, to enable such capabilities, fundamentally we need to have comprehensive understanding on the main characteristics of identifiers at the first place, which is unfortunately not sufficiently studied. For example, it remained unclear what Part of Speech (POS) tags that developers commonly use to define identifiers. To answer such open issues, we conducted a large-scale empirical study on the naturalness of identifiers, based on 5,000 open source Java and Android projects, concerning five dimensions of identifiers: distributions, compositions, POS tags, lengths, and initializations of identifiers. Results of the empirical study contain five key findings for identifiers in programs, including, e.g., the observation that the three POS tags (i.e., nouns, verbs, and adjectives) are the most commonly used ones when developers define identifiers. Furthermore, based on our findings, we provide implications and insights for developers, researchers, and Integrated Development Environments (IDEs) in the context that identifier-related activities are performed or functionalities are enabled.

Highlights

  • Source code analyses and comprehension are important activities for developers to review and reuse existing knowledge in programs [1]

  • EMPIRICAL RESULTS we report the results of our empirical study, which is organized according to the types of analyses and Research Questions (RQs)

  • We provide the exact number and percentage for each category of identifiers in Table 2 and Table 3, which have not been reported in a large scale of open source projects in the previous studies

Read more

Summary

Introduction

Source code analyses and comprehension are important activities for developers to review and reuse existing knowledge in programs [1]. Informative and high-quality source code lexicon plays a crucial role in accelerating these activities. Among the various types of source code lexicon, identifiers account for almost 70% in programs [2], [3]. Identifiers can reflect the understanding and cognition of developers to the concepts and behaviors involved in programs of the software under development [5]. Identifiers should uniquely express their corresponding concepts and behaviors within a limited length [6]. It is required for developers to construct concise, consistent, and meaningful identifiers to improve the comprehensibility of programs, especially for the large and complex software

Objectives
Methods
Results
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.