当前位置: X-MOL 学术Sci. China Inf. Sci. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Toward accurate detection on change barriers
Science China Information Sciences ( IF 7.3 ) Pub Date : 2021-02-07 , DOI: 10.1007/s11432-019-2902-5
Tingting Lv , Zhilei Ren , Xiaochen Li , Guojun Gao , He Jiang

In software development, it is easy to introduce code smells owing to the complexity of projects and the negligence of programmers. Code smells reduce code comprehensibility and maintainability, making programs error-prone. Hence, code smell detection is extremely important. Recently, machine learning-based technologies turn to be the mainstream detection approaches, which show promising performance. However, existing machine learning methods have two limitations: (1) most studies only focus on common smells, and (2) the proposed metrics are not effective when being used for uncommon code smell detection, e.g., change barrier based code smells. To overcome these limitations, this paper investigates the detection of uncommon change barrier based code smells. We study three typical code smells, i.e., Divergent Change, Shotgun Surgery, and Parallel Inheritance, which all belong to change barriers. We analyze the characteristics of change barriers and extract domain-specific metrics to train a Logistic Regression model for detection. The experimental results show that our method achieves 81.8%–100% precision and recall, outperforming existing algorithms by 10%–30%. In addition, we analyze the correlation and importance of the utilized metrics. We find our domain-specific metrics are important for the detection of change barriers. The results would help practitioners better design detection tools for such code smells.



中文翻译:

致力于准确检测变化壁垒

在软件开发中,由于项目的复杂性和程序员的疏忽,很容易引入代码异味。代码气味降低了代码的可理解性和可维护性,使程序容易出错。因此,代码气味检测非常重要。近来,基于机器学习的技术已成为主流的检测方法,显示出令人鼓舞的性能。但是,现有的机器学习方法有两个局限性:(1)大多数研究仅关注常见的气味,(2)所提出的度量标准在用于罕见的代码气味检测(例如基于更改障碍的代码气味)时无效。为了克服这些局限性,本文研究了基于不常见的更改障碍的代码气味的检测。我们研究了三种典型的代码气味,即发散变化,Shot弹枪外科手术,和并行继承,它们都属于变更障碍。我们分析变化障碍的特征,并提取特定领域的指标,以训练用于检测的Logistic回归模型。实验结果表明,我们的方法实现了81.8%–100%的精度和查全率,比现有算法高出10%–30%。此外,我们分析了所利用指标的相关性和重要性。我们发现特定领域的指标对于检测变更障碍非常重要。结果将帮助从业人员更好地设计用于此类代码气味的检测工具。8%–100%的精度和召回率,优于现有算法10%–30%。此外,我们分析了所利用指标的相关性和重要性。我们发现特定领域的指标对于检测变更障碍非常重要。结果将帮助从业人员更好地设计用于此类代码气味的检测工具。8%–100%的精度和召回率,优于现有算法10%–30%。此外,我们分析了所利用指标的相关性和重要性。我们发现特定领域的指标对于检测变更障碍非常重要。结果将帮助从业人员更好地设计用于此类代码气味的检测工具。

更新日期:2021-02-15
down
wechat
bug