On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifiers

On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifiers
复制标题

DOI:
10.1016/j.jss.2020.110740
复制
发表时间:
2020-07
期刊:
J. Syst. Softw.
影响因子:
--
通讯作者:
Christian D. Newman;Reem S. Alsuhaibani;M. J. Decker;Anthony S Peruma;D. Kaushik;Mohamed Wiem Mkaouer
Christian D. Newman;Reem S. Alsuhaibani;M. J. Decker;Anthony S Peruma;D. Kaushik;Mohamed Wiem Mkaouer
中科院分区:
其他
文献类型:
--
作者:
Christian D. Newman;Reem S. Alsuhaibani;M. J. Decker;Anthony S Peruma;D. Kaushik;Mohamed Wiem Mkaouer

文献摘要

相似文献

标识符构成了代码中的大部分文本。它们是最基本的媒介之一,开发人员通过它们描述他们创建的代码并理解其他人创建的代码。因此,如果研究人员要支持开发人员和自动化分析方法正确和最佳地理解和创建标识符,那么了解标识符命名实践中潜在的模式以及我们能够自动建模这些模式的准确程度至关重要。本文通过研究词性标注序列(称为语法模式)来研究标识符。这项工作提高了我们对这些模式的理解和建模的能力:(1)在不同类型的标识符中建立共同的命名模式,如类和属性名;(2)分析不同的模式如何影响理解;以及(3)研究用于词性标注的最新技术的准确性,这在自动建模标识符命名模式中是至关重要的,以确定他们的极限和改进的途径。为此,我们手动注释了来自20个开源系统的1,335个标识符的数据集,并使用该数据集来研究命名模式,语义和标签准确性。
Identifiers make up a majority of the text in code. They are one of the most basic mediums through which developers describe the code they create and understand the code that others create. Therefore, understanding the patterns latent in identifier naming practices and how accurately we are able to automatically model these patterns is vital if researchers are to support developers and automated analysis approaches in comprehending and creating identifiers correctly and optimally. This paper investigates identifiers by studying sequences of part-of-speech annotations, referred to as grammar patterns. This work advances our understanding of these patterns and our ability to model them by (1) establishing common naming patterns in different types of identifiers, such as class and attribute names; (2) analyzing how different patterns influence comprehension; and (3) studying the accuracy of state-of-the-art techniques for part-of-speech annotations, which are vital in automatically modeling identifier naming patterns, in order to establish their limits and paths toward improvement. To do this, we manually annotate a dataset of 1,335 identifiers from 20 open-source systems and use this dataset to study naming patterns, semantics, and tagger accuracy.