Dependencies between modules can trigger ripple effects when changes are made, making maintenance complex and costly, so minimizing these dependencies is crucial. Consequently, understanding what drives dependencies is important. One potential factor is code smells, which are symptoms in code that indicate design issues and reduce code quality. When multiple code smells interact through static dependencies, their combined impact on quality can be even more severe. While individual code smells have been widely studied, the influence of their interactions remains underexplored. In this study, we aim to investigate whether and how the distribution of static dependencies changes in the presence of code smell interactions. We conducted a dependency analysis on 116 open-source Java systems to quantify these interactions by comparing cases where code smell interactions exist and where they do not. Our results suggest that overall, code smell interactions are linked to a significant increase in total dependencies in 28 out of 36 cases, and that all code smells are associated with a consistent change direction (increase or decrease) in certain dependency types when interacting with other code smells. Consequently, this information can be used to support more accurate code smell detection and prioritization, as well as to develop more effective refactoring strategies.


翻译:模块间的依赖关系会在修改时引发连锁反应,导致维护工作变得复杂且成本高昂,因此最小化这些依赖至关重要。相应地,理解驱动依赖关系的因素具有重要意义。代码异味是其中一个潜在因素,它们是代码中预示设计问题并降低代码质量的症状。当多个代码异味通过静态依赖关系相互作用时,它们对质量的综合影响可能更为严重。尽管单个代码异味已得到广泛研究,但其相互作用的影​​响仍未充分探索。在本研究中,我们旨在探究代码异味相互作用的存在是否会改变静态依赖关系的分布模式,以及如何改变。我们对116个开源Java系统进行了依赖分析,通过比较存在代码异味相互作用与不存在的情况来量化这些相互作用。结果表明:总体而言,在36个案例中有28个案例显示代码异味相互作用与总依赖关系的显著增加相关;并且所有代码异味在与其它代码异味相互作用时,均与特定依赖类型的一致变化方向(增加或减少)相关联。因此,这些信息可用于支持更精确的代码异味检测与优先级排序,并有助于制定更有效的重构策略。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
163+阅读 · 2019年10月12日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
18+阅读 · 2022年11月21日
Arxiv
31+阅读 · 2021年6月30日
Arxiv
12+阅读 · 2020年12月10日
Arxiv
12+阅读 · 2019年2月26日
Arxiv
24+阅读 · 2018年10月24日
VIP会员
相关VIP内容
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
相关论文
Arxiv
18+阅读 · 2022年11月21日
Arxiv
31+阅读 · 2021年6月30日
Arxiv
12+阅读 · 2020年12月10日
Arxiv
12+阅读 · 2019年2月26日
Arxiv
24+阅读 · 2018年10月24日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员