当前位置: X-MOL 学术J. Softw. Evol. Process › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Bad smell detection using quality metrics and refactoring opportunities
Journal of Software: Evolution and Process ( IF 2 ) Pub Date : 2020-02-21 , DOI: 10.1002/smr.2255
Bahareh Bafandeh Mayvan 1 , Abbas Rasoolzadegan 1 , Abbas Javan Jafari 2
Affiliation  

Bad smells are bad practices in developing software. These poor solutions significantly influence the understandability and maintainability of source code. Therefore, bad smell detection plays a vital role in the refactoring, maintaining, and measuring the quality of large and complex software systems. Researchers believe that bad smells should be precisely identified and addressed. However, bad smell detection is complicated by issues such as informal and inconsistent specifications of bad smells and high false positive rates in the detection process, all of which affect the success rate in detection. In this paper, we present a new method to detect bad smells in code by addressing the aforementioned issues. Our proposed method is a multi‐step process using software quality metrics and refactoring opportunities. In this method, after obtaining the bad smell formal specifications based on software metrics, we utilize them to achieve a set of candidates for each bad smell. Afterwards, each of the instances will be examined and compared with the corresponding refactoring situations specified for that bad smell. This examination strikes out the false positives created in the previous step. The evaluation of this method on four open‐source systems demonstrates the improved effectiveness of bad smell detection in code.

中文翻译:

使用质量指标和重构机会进行难闻气味检测

不良气味是开发软件时的不良做法。这些不良的解决方案会严重影响源代码的可理解性和可维护性。因此,不良气味检测在大型复杂软件系统的重构,维护和测量质量中起着至关重要的作用。研究人员认为,应准确地识别和解决难闻的气味。但是,不良气味的检测由于诸如臭味的非正式和不一致的规范以及检测过程中假阳性率高等问题而变得复杂,所有这些都会影响检测的成功率。在本文中,我们提出了一种通过解决上述问题来检测代码中难闻气味的新方法。我们提出的方法是一个使用软件质量指标和重构机会的多步骤过程。用这种方法 在基于软件指标获得难闻气味的正式规范后,我们利用它们来为每种难闻气味找到一组候选对象。之后,将检查每个实例并将其与为该难闻气味指定的相应重构情况进行比较。该检查剔除了在上一步中创建的误报。在四个开源系统上对该方法的评估表明,代码中不良气味检测的有效性得到了提高。
更新日期:2020-02-21
down
wechat
bug