Exploring the Characteristics of Identifiers: A Large-Scale Empirical Study on 5,000 Open Source Projects

Exploring the Characteristics of Identifiers: A Large-Scale Empirical Study on 5,000 Open Source Projects
复制标题

探索标识符的特征:对 5000 个开源项目的大规模实证研究

DOI:
10.1109/access.2020.3013694
复制
发表时间:
2020
期刊:
影响因子:
3.9
通讯作者:
Zhiqiu Huang
Zhiqiu Huang
中科院分区:
计算机科学3区
文献类型:
--
作者:
Jingxuan Zhang;Siyuan Liu;Junpeng Luo;Jiahui Liang;Zhiqiu Huang

文献摘要

相似文献

信息标识符对于程序的可理解性和可维护性至关重要。探索标识符的属性并调查其对软件工件的影响一直是一个重要的研究重点。然而,要实现这样的能力,从根本上来说,我们首先需要对标识符的主要特征有一个全面的了解,但遗憾的是,这方面的研究还不够充分。例如,目前尚不清楚开发人员通常使用哪些词性 (POS) 标签来定义标识符。为了回答这些悬而未决的问题,我们基于 5000 个开源 Java 和 Android 项目,对标识符的自然性进行了大规模的实证研究,涉及标识符的五个维度:标识符的分布、组成、POS 标签、长度和初始化。实证研究的结果包含程序中标识符的五个关键发现,例如,观察到三个词性标签(即名词、动词和形容词)是开发人员定义标识符时最常用的标签。此外,根据我们的发现,我们在执行与标识符相关的活动或启用功能的背景下为开发人员、研究人员和集成开发环境 (IDE) 提供影响和见解。
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.