arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2010.14331cs.SE
收藏

多语言设计容易出错吗?实证研究

Are Multi-language Design Smells Fault-prone? An Empirical Study

Mouna Abidi, Md Saidur Rahman, Moses Openja, Foutse Khomh

摘要:

如今,现代应用程序是使用以不同程序设计语言编写的组件开发的。这些系统引入了若干优点。然而,随着语文数量的增加,与开发和维护这些系统有关的挑战也随之增加。在这种情况下,开发人员可能会引入设计气味(即,反模式和代码气味),这是糟糕的设计和实现选择的症状。设计气味被定义为糟糕的设计和编码选择,尽管满足功能需求,但会对软件程序的质量产生负面影响。对单语言系统的研究表明,设计气味的存在会影响代码的理解,从而使系统更难维护。然而,这些研究只针对单语言系统,并没有考虑不同的程序设计语言之间的相互作用。在本文中,我们提出了一种方法来检测JNI系统的上下文中的多语言设计气味。然后,我们调查这些设计气味的流行程度。具体来说,我们在9个开源JNI项目的98个版本中检测到15种设计气味。我们的研究结果表明,设计气味是普遍的,在选定的项目,并坚持在整个版本的系统。我们观察到,在分析的系统中,33.95%的文件涉及Java和C/C++之间的通信包含多语言设计气味的发生。有些气味比其他气味更普遍,例如,未使用的参数,太多的分散,未使用的方法声明。我们的结果表明,具有多语言设计气味的文件通常比没有这些气味的文件与错误的关联更大,并且特定气味比其他气味与错误倾向的关联更大。

英文摘要:

Nowadays, modern applications are developed using components written in different programming languages. These systems introduce several advantages. However, as the number of languages increases, so does the challenges related to the development and maintenance of these systems. In such situations, developers may introduce design smells (i.e., anti-patterns and code smells) which are symptoms of poor design and implementation choices. Design smells are defined as poor design and coding choices that can negatively impact the quality of a software program despite satisfying functional requirements. Studies on mono-language systems suggest that the presence of design smells affects code comprehension, thus making systems harder to maintain. However, these studies target only mono-language systems and do not consider the interaction between different programming languages. In this paper, we present an approach to detect multi-language design smells in the context of JNI systems. We then investigate the prevalence of those design smells. Specifically, we detect 15 design smells in 98 releases of nine open-source JNI projects. Our results show that the design smells are prevalent in the selected projects and persist throughout the releases of the systems. We observe that in the analyzed systems, 33.95% of the files involving communications between Java and C/C++ contains occurrences of multi-language design smells. Some kinds of smells are more prevalent than others, e.g., Unused Parameters, Too Much Scattering, Unused Method Declaration. Our results suggest that files with multi-language design smells can often be more associated with bugs than files without these smells, and that specific smells are more correlated to fault-proneness than others.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑