arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2212.03399cs.SE
收藏

利用源代码语法模式检测引入缺陷的提交:基于机器学习模型的方法

Utilizing Source Code Syntax Patterns to Detect Bug Inducing Commits using Machine Learning Models

Md Nadim, Banani Roy

AI总结:

本研究提出从源代码语法模式中提取特征来检测引入缺陷的提交,实验表明该方法在多种机器学习模型上提升了缺陷检测性能,并提供了更好的可解释性。

摘要:

使用基于机器学习(ML)的模型检测引入缺陷的提交(BIC)或即时(JIT)缺陷预测,需要从源代码或软件系统的历史维护数据中提取表格化特征值。已有研究利用源代码仓库的元数据(我们称之为GitHub统计,即GS)、基于n-gram的源代码文本处理以及开发者信息(例如开发者的经验)作为基于ML的缺陷检测模型中的特征值。然而,这些特征值并不代表开发者可能偏好的源代码语法风格或模式,而编程语言提供了多种有效的替代方案。本研究提出了一种从其源代码语法模式中提取特征的方法,以表示软件提交,并调查这些特征是否有助于检测软件系统中的缺陷倾向。我们使用了来自八个用Java、C++和Python编程语言编写的开源软件项目的六个手动标注和两个自动标注的数据集。我们的数据集包含642个手动标注和4,014个自动标注的有缺陷和无缺陷提交,分别来自六个和两个主题系统。这些主题系统包含不同数量的修订版本,并来自不同的应用领域。我们的调查表明,加入所提出的特征可以提高使用五种不同机器学习分类模型检测有缺陷和无缺陷软件提交的性能。我们提出的特征在使用深度信念网络生成的特征和分类模型检测有缺陷提交时也表现更好。本研究还实现了一个最先进的工具,以比较使用我们提出的特征和传统特征对预测的有缺陷提交的可解释性,结果发现我们提出的特征能更好地解释有缺陷提交的原因。

英文摘要:

Detecting Bug Inducing Commit (BIC) or Just in Time (JIT) defect prediction using Machine Learning (ML) based models requires tabulated feature values extracted from the source code or historical maintenance data of a software system. Existing studies have utilized meta-data from source code repositories (we named them GitHub Statistics or GS), n-gram-based source code text processing, and developer's information (e.g., the experience of a developer) as the feature values in ML-based bug detection models. However, these feature values do not represent the source code syntax styles or patterns that a developer might prefer over available valid alternatives provided by programming languages. This investigation proposed a method to extract features from its source code syntax patterns to represent software commits and investigate whether they are helpful in detecting bug proneness in software systems. We utilize six manually and two automatically labeled datasets from eight open-source software projects written in Java, C++, and Python programming languages. Our datasets contain 642 manually labeled and 4,014 automatically labeled buggy and non-buggy commits from six and two subject systems, respectively. The subject systems contain a diverse number of revisions, and they are from various application domains. Our investigation shows the inclusion of the proposed features increases the performance of detecting buggy and non-buggy software commits using five different machine learning classification models. Our proposed features also perform better in detecting buggy commits using the Deep Belief Network generated features and classification model. This investigation also implemented a state-of-the-art tool to compare the explainability of predicted buggy commits using our proposed and traditional features and found that our proposed features provide better reasoning about buggy.....

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑