Skip to main content
QUICK REVIEW

[论文解读] A Survey on Machine Learning Techniques for Source Code Analysis

Tushar Sharma, Maria Kechagia|arXiv (Cornell University)|Oct 18, 2021
Software Engineering Research参考文献 350被引用 11
一句话总结

本综述整合了2011至2021年间关于机器学习在源代码分析中应用的479项原始研究,将12项软件工程任务进行分类,识别出关键的机器学习技术、工具和数据集,并突出显示了可复现性与硬件需求等挑战。该综述为研究人员和从业者提供了该新兴ML4SE领域内全面且结构化的概览。

ABSTRACT

The advancements in machine learning techniques have encouraged researchers to apply these techniques to a myriad of software engineering tasks that use source code analysis, such as testing and vulnerability detection. Such a large number of studies hinders the community from understanding the current research landscape. This paper aims to summarize the current knowledge in applied machine learning for source code analysis. We review studies belonging to twelve categories of software engineering tasks and corresponding machine learning techniques, tools, and datasets that have been applied to solve them. To do so, we conducted an extensive literature search and identified 479 primary studies published between 2011 and 2021. We summarize our observations and findings with the help of the identified studies. Our findings suggest that the use of machine learning techniques for source code analysis tasks is consistently increasing. We synthesize commonly used steps and the overall workflow for each task and summarize machine learning techniques employed. We identify a comprehensive list of available datasets and tools useable in this context. Finally, the paper discusses perceived challenges in this area, including the availability of standard datasets, reproducibility and replicability, and hardware resources.

研究动机与目标

  • 提供对机器学习在源代码分析中应用于多样化软件工程任务的全面且最新的综合分析。
  • 识别并分类该领域中最常使用的机器学习技术、工具和数据集。
  • 突出显示可复现性、缺乏标准数据集以及高硬件需求等持续存在的挑战。
  • 通过整合现有资源并指导未来的方法论改进,为研究人员和从业者提供支持。
  • 建立一个持续更新的开源文献库,以确保综述的持续相关性,并支持社区的持续扩展。

提出的方法

  • 在主要数字图书馆中开展广泛的文献检索,使用全面的搜索词集并进行迭代查询优化。
  • 应用严格的纳入与排除标准,筛选出479项聚焦于将机器学习技术应用于软件工程任务的源代码分析的原始研究。
  • 系统性地将研究归类为12个软件工程任务类别,每个类别下设子类别及工作流步骤。
  • 从每项研究中提取并综合元数据,包括机器学习技术、工具、数据集及实验设置。
  • 通过至少两名作者的双重评审验证数据提取的准确性与一致性。
  • 开发了一个公开的、开源的网站和电子表格(https://github.com/tushartushar/ML4SCA),作为持续扩展的文献资源库。

实验结果

研究问题

  • RQ1在源代码分析中,哪些软件工程任务最广泛地应用了机器学习技术?
  • RQ2该领域中最常使用的机器学习模型、工具和数据集是什么?
  • RQ3不同源代码分析任务之间,反复出现的工作流和方法论模式有哪些?
  • RQ4哪些关键挑战阻碍了基于机器学习的源代码分析研究的可复现性、可扩展性和可及性?
  • RQ5社区如何通过提升标准化、工具支持和资源可获得性来推动该领域的发展?

主要发现

  • 2011至2021年间,机器学习在源代码分析中的应用持续且稳步增长,共识别出479项原始研究。
  • 深度学习模型,尤其是基于神经网络的模型,在漏洞检测、代码摘要生成和缺陷预测等任务中被广泛使用。
  • 大量研究依赖代码嵌入(如CodeBERT、GraphCodeBERT)进行源代码表示,表明预训练模型已成为显著趋势。
  • 尽管相关研究数量众多,但仅有少数综述系统性地记录了可用的工具和数据集,这一空白正是本综述所填补的。
  • 可复现性与可重复性仍是主要挑战,表现为数据集使用不一致以及缺乏标准化的评估协议。
  • 硬件资源需求较高,特别是对于大规模深度学习模型,限制了缺乏机构基础设施的研究人员的使用。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。