论文标题

代码气味检测和可视化:系统文献综述

Code smells detection and visualization: A systematic literature review

论文作者

Reis, José Pereira dos, Abreu, Fernando Brito e, Carneiro, Glauco de Figueiredo, Anslow, Craig

论文摘要

上下文:代码气味(CS)倾向于损害软件质量,并要求开发人员在整个生命周期中维护和发展应用程序的更多努力。长期以来,它们已通过称为重构操作的相应缓解溶液进行分类。目的:该SLR具有双重目标:第一个是识别文献中讨论的主要代码气味检测技术和工具,第二个是分析已应用视觉技术来支持前者的程度。方法:在此SLR中,我们的搜索字符串确定了超过83项主要的科学存储库中索引的主要研究。然后,遵循现有的二级研究最佳实践,我们应用了包含/排除标准来选择最相关的作品,提取其功能并对其进行分类。结果:我们发现,最常用的代码气味检测方法是基于搜索的(30.1%)和基于公表示的(24.1%)。大多数研究(83.1%)使用开源软件,Java语言占据了第一个位置(77.1%)。在代码气味方面,上帝级别(51.8%),特征嫉妒(33.7%)和长长的方法(26.5%)是最受欢迎的方法。机器学习技术用于35%的研究。大约80%的研究仅检测代码的气味,而无需提供可视化技术。在基于可视化的方法中,使用了几种方法,例如:城市隐喻,3D可视化技术。结论:我们确认CS的检测是一项非琐碎的任务,并且在以下方面仍有很多工作要做:降低与CS的定义和检测相关的主观性;增加检测到的CS和支持的编程语言的多样性;构建和共享Oracles和数据集,以促进CS检测和可视化技术验证实验的复制。

Context: Code smells (CS) tend to compromise software quality and also demand more effort by developers to maintain and evolve the application throughout its life-cycle. They have long been catalogued with corresponding mitigating solutions called refactoring operations. Objective: This SLR has a twofold goal: the first is to identify the main code smells detection techniques and tools discussed in the literature, and the second is to analyze to which extent visual techniques have been applied to support the former. Method: Over 83 primary studies indexed in major scientific repositories were identified by our search string in this SLR. Then, following existing best practices for secondary studies, we applied inclusion/exclusion criteria to select the most relevant works, extract their features and classify them. Results: We found that the most commonly used approaches to code smells detection are search-based (30.1%), and metric-based (24.1%). Most of the studies (83.1%) use open-source software, with the Java language occupying the first position (77.1%). In terms of code smells, God Class (51.8%), Feature Envy (33.7%), and Long Method (26.5%) are the most covered ones. Machine learning techniques are used in 35% of the studies. Around 80% of the studies only detect code smells, without providing visualization techniques. In visualization-based approaches several methods are used, such as: city metaphors, 3D visualization techniques. Conclusions: We confirm that the detection of CS is a non trivial task, and there is still a lot of work to be done in terms of: reducing the subjectivity associated with the definition and detection of CS; increasing the diversity of detected CS and of supported programming languages; constructing and sharing oracles and datasets to facilitate the replication of CS detection and visualization techniques validation experiments.

扫码加入交流群

加入微信交流群

微信交流群二维码

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