Defect detection at commit check-in time prevents the introduction of defects into software systems. Current defect detection approaches rely on metric-based models which are not very accurate and whose results are not directly useful for developers. We propose a method to detect bug-inducing commits by comparing the incoming changes with all past commits in the project, considering both those that introduced defects and those that did not. Our method considers individual changes in the commit separately, at the method-level granularity. Doing so helps developers as they are informed of specific methods that need further attention instead of being told that the entire commit is problematic. Our approach represents source code as abstract syntax trees and uses tree kernels to estimate the similarity of the code with previous commits. We experiment with subtree kernels (STK), subset tree kernels (SSTK), or partial tree kernels (PTK). An incoming change is then classified using a K-NN classifier on the past changes. We evaluate our approach on the BigCloneBench benchmark and on the Technical Debt dataset, using the NiCad clone detector as the baseline. Our experiments with the BigCloneBench benchmark show that the tree kernel approach can detect clones with a comparable MAP to that of NiCad. Also, on defect detection with the Technical Debt dataset, tree kernels are least as effective as NiCad with MRR, F-score, and Accuracy of 0.87, 0.80, and 0.82 respectively.


翻译:在承诺检查时发现缺陷后,无法将缺陷引入软件系统。目前的缺陷检测方法依靠基于标准的模型,这些模型不十分准确,其结果对开发者没有直接用处。我们提出一种方法,通过将即将发生的变化与项目中过去的所有承诺进行比较来检测诱导错误的承诺,其中既考虑到引入缺陷的变化,也考虑到部分树内核的承诺。我们的方法在方法层面的颗粒度上分别考虑承诺的个别变化。这样做有助于开发者了解需要更多关注的具体方法,而不是被告知整个承诺有问题。我们的方法代表了源代码,作为抽象的合成树,并且使用树内核来估计代码与以往承诺的相似性。我们试验了子树内核(STK)、子树内核(SSTK)或部分树内核(PTK),然后在方法上使用K-NN分类器对承诺进行分类。我们评价了我们在BigCloneBennch基准和技术债务数据集方面的做法,利用NiC克隆最低的数值探测器来估计该代码与以前的承诺测试基准。我们用BIC的试验可以用来作为BC的基核检测基准。

0
下载
关闭预览

相关内容

专知会员服务
156+阅读 · 2021年3月6日
【经典书】算法C语言实现,Algorithms in C. 672页pdf
专知会员服务
82+阅读 · 2020年8月13日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
155+阅读 · 2019年10月12日
【新书】Python编程基础,669页pdf
专知会员服务
195+阅读 · 2019年10月10日
LibRec 精选:AutoML for Contextual Bandits
LibRec智能推荐
7+阅读 · 2019年9月19日
CCF推荐 | 国际会议信息10条
Call4Papers
8+阅读 · 2019年5月27日
Hierarchically Structured Meta-learning
CreateAMind
26+阅读 · 2019年5月22日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
0+阅读 · 2021年8月18日
Arxiv
1+阅读 · 2021年8月18日
Arxiv
0+阅读 · 2021年8月17日
Arxiv
4+阅读 · 2018年6月14日
Arxiv
3+阅读 · 2018年6月5日
VIP会员
相关资讯
LibRec 精选:AutoML for Contextual Bandits
LibRec智能推荐
7+阅读 · 2019年9月19日
CCF推荐 | 国际会议信息10条
Call4Papers
8+阅读 · 2019年5月27日
Hierarchically Structured Meta-learning
CreateAMind
26+阅读 · 2019年5月22日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
可解释的CNN
CreateAMind
17+阅读 · 2017年10月5日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Top
微信扫码咨询专知VIP会员