HIST (Historical Information for Smell deTection) - Replication Package
收藏DataCite Commons2020-09-04 更新2024-07-25 收录
下载链接:
https://figshare.com/articles/dataset/HIST_Historical_Information_for_Smell_deTection_Replication_Package/1157374/1
下载链接
链接失效反馈官方服务:
资源简介:
Bad code smells are symptoms of poor design and implementation choices that may hinder code comprehensibility. While most of the detection techniques rely on structural information, many bad code smells are intrinsically characterized by how code elements change over time. In this paper, we propose HIST (Historical Information for Smell deTection), an approach exploiting change history information to detect instances of five different bad code smells, namely Divergent Change, Shotgun Surgery, Parallel Inheritance, Blob, and Feature Envy. We evaluate HIST in two empirical studies. The first, conducted on twenty open source projects, aimed at assessing the accuracy of HIST in detecting instances of the above mentioned bad code smells. In this study we compare HIST with state-of-the-art smell detectors based on source code analysis. The results indicate that HIST’s precision ranges between 72% and 86%, and its recall ranges between 58% and 100%. More importantly, the results indicate that HIST is able to identify bad code smells that cannot be identified through approaches solely based on code analysis. Then, we conducted a second study aimed at investigating to what extent the bad code smells detected by HIST (and by the competitive code analysis techniques) reflect developers’ perception of poor design and implementation choices. We involved twelve developers of four open source projects that recognized as design/implementation problems more than 75% of the bad code smell instances identified by HIST.
代码坏味道(Bad code smells)是不良设计与实现决策的表征,此类决策可能会损害代码的可理解性。尽管多数检测技术依赖代码结构信息,但诸多代码坏味道的本质特征,在于代码元素随时间推移的演化模式。本文提出了HIST(Historical Information for Smell deTection),一种利用变更历史信息来检测5种不同代码坏味道实例的方法,即发散式变更(Divergent Change)、霰弹式修改(Shotgun Surgery)、平行继承(Parallel Inheritance)、Blob以及特征依恋(Feature Envy)。
本文通过两项实证研究对HIST进行评估。第一项研究针对20个开源项目展开,旨在评估HIST在检测上述各类代码坏味道实例时的准确性;本研究还将HIST与基于源代码分析的当前最优坏味道检测工具进行了对比。实验结果显示,HIST的精确率(Precision)区间为72%至86%,召回率(Recall)区间为58%至100%;更为关键的是,HIST能够识别出仅基于代码分析的方法无法检测到的代码坏味道实例。
随后开展的第二项研究,则旨在探究HIST(以及对比的代码分析技术)所检测出的代码坏味道,在多大程度上契合开发者对不良设计与实现决策的主观认知。本研究邀请了4个开源项目的12名开发者参与,这些开发者认可了HIST所识别出的代码坏味道实例中75%以上属于设计或实现层面的问题。
提供机构:
figshare
创建时间:
2016-01-19



