利用数据挖掘算法推荐源代码变更
Leveraging Data Mining Algorithms to Recommend Source Code Changes
AI总结:
本研究针对现有代码变更推荐数据挖掘方法缺乏横向对比的问题,采用四种经典频繁模式挖掘算法在7个开源项目上做实证评估,得出不同算法适配不同规模项目、FP-Growth执行效率最优的结论。
摘要:
研究背景:近期研究已运用数据挖掘技术开发可指导开发者完成源代码变更的方法。据我们所知,极少有研究对多种数据挖掘技术展开调研,或是将其结果与其他算法或基线进行对比。研究目标:本文提出一种利用四种数据挖掘算法自动推荐源代码变更的方法,我们不仅运用这些算法开展源代码变更推荐,还进行了实证评估。研究方法:本研究涵盖7个开源项目,从中提取了文件级别的源代码变更历史;我们使用了四种广泛应用的数据挖掘算法,即Apriori、FP-Growth、Eclat和Relim,从性能(精确率、召回率和F值)与执行时间两方面对这些算法进行比较。研究结果:我们的发现提供了实证依据:尽管部分频繁模式挖掘算法(如Apriori)在某些场景下表现优于其他算法,但该结果并非在所有软件项目中都一致,这更可能源于所研究项目的性质与特征,尤其是其变更历史。研究结论:Apriori似乎适用于大规模项目,而Eclat则更适合小规模项目;此外,就执行时间而言,FP-Growth是一种高效的方法。
英文摘要:
Context: Recent research has used data mining to develop techniques that can guide developers through source code changes. To the best of our knowledge, very few studies have investigated data mining techniques and--or compared their results with other algorithms or a baseline. Objectives: This paper proposes an automatic method for recommending source code changes using four data mining algorithms. We not only use these algorithms to recommend source code changes, but we also conduct an empirical evaluation. Methods: Our investigation includes seven open-source projects from which we extracted source change history at the file level. We used four widely data mining algorithms \ie{} Apriori, FP-Growth, Eclat, and Relim to compare the algorithms in terms of performance (Precision, Recall and F-measure) and execution time. Results: Our findings provide empirical evidence that while some Frequent Pattern Mining algorithms, such as Apriori may outperform other algorithms in some cases, the results are not consistent throughout all the software projects, which is more likely due to the nature and characteristics of the studied projects, in particular their change history. Conclusion: Apriori seems appropriate for large-scale projects, whereas Eclat appears to be suitable for small-scale projects. Moreover, FP-Growth seems an efficient approach in terms of execution time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。