论文标题

多语言设计气味容易故障吗?一项实证研究

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

论文作者

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

论文摘要

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

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源