Page 278 - 《软件学报》2024年第4期
P. 278

1856                                                       软件学报  2024  年第  35  卷第  4  期


                  5.6   未来工作
                    缺陷定位的目标是辅助开发人员进行代码调试. 本文中仅从定量的角度出发衡量我们提出的                               BEEP  方法对于
                 人工调试的帮助, 即分析       BEEP  的定位结果是否能够将缺陷代码元素排在靠前位置, 但是缺少了定性分析的环节,
                 即考察   BEEP  的预测结果能够帮助开发人员更快更好地修复缺陷. 一种合理的实验设置是, 将                        BEEP  的预测结果
                 展示给一部分开发人员, 而对于另一部分开发人员则不展示任何信息, 观察两组开发人员在修复相同缺陷时的表
                 现. 然而, 受到诸如工业界合作等因素的限制, 本文未能包含此部分内容, 故将其留作未来工作, 以便后续研究更好
                 地探索细粒度缺陷定位对开发人员的调试工作带来的影响.

                  6   总 结

                    缺陷定位方法旨在自动地找到与程序失效相关的代码元素, 从而在代码调试阶段为开发人员提供帮助. 本文
                 提出了一种基于指针网络的细粒度缺陷定位方法. 针对现有缺陷定位方法不能为开发人员提供细粒度的缺陷信息
                 这一问题, 本文提出利用神经网络和大数据预测与缺陷相关的代码令牌, 帮助开发人员更准确地定位缺陷代码. 本
                 文基于指针神经网络, 通过将缺陷程序表示为一组抽象语法树路径, 利用程序结构信息获取预测结果. 在                                3  个包含
                 大量真实程序中补丁案例的数据集上的实验表明, 本文提出的细粒度缺陷定位方法不仅可以有效预测缺陷代码令
                 牌以及修复该缺陷所必需的代码变换类型, 还显著优于基于统计信息和基于机器学习的基准方法. 此外, 在细粒度
                 缺陷定位信息的基础上, 我们设计了基于代码补全与基于启发式的补丁生成策略从而形成完整的程序修复方案.
                 在多个缺陷数据集上的结果表明, 基于令牌级别缺陷定位信息的程序修复在有效性和效率两方面都具有较好前景.

                 References:
                  [1]  Lou YL, Ghanbari A, Li X, Zhang LM, Zhang HT, Hao D, Zhang L. Can automated program repair refine fault localization? A unified
                     debugging approach. In: Proc. of the 29th ACM SIGSOFT Int’l Symp. on Software Testing and Analysis. ACM, 2020. 75–87. [doi: 10.
                     1145/3395363.3397351]
                  [2]  Parnin C, Orso A. Are automated debugging techniques actually helping programmers? In: Proc. of the 2011 Int’l Symp. on Software
                     Testing and Analysis. Toronto: ACM, 2011. 199–209. [doi: 10.1145/2001420.2001445]
                  [3]  Liu K, Wang SW, Koyuncu A, Kim K, Bissyandé T F, Kim D, Wu P, Klein J, Mao XG, Le Traon Y. On the efficiency of test suite based
                     program repair: A systematic assessment of 16 automated repair systems for Java programs. In: Proc. of the 42nd ACM/IEEE Int’l Conf.
                     on Software Engineering. Seoul: ACM, 2020. 615–627. [doi: 10.1145/3377811.3380338]
                  [4]  Long F, Rinard M. An analysis of the search spaces for generate and validate patch generation systems. In: Proc. of the 38th Int’l Conf. on
                     Software Engineering. Austin: ACM, 2016. 702–713. [doi: 10.1145/2884781.2884872]
                  [5]  Smith EK, Barr ET, Le Goues C, Brun Y. Is the cure worse than the disease? Overfitting in automated program repair. In: Proc. of the
                     10th Joint Meeting on Foundations of Software Engineering. Bergamo: ACM, 2015. 532–543. [doi: 10.1145/2786805.2786825]
                  [6]  Tian HY, Liu K, Kaboré AK, Koyuncu A, Li L, Klein J, Bissyandé TF. Evaluating representation learning of code changes for predicting
                     patch correctness in program repair. In: Proc. of the 35th IEEE/ACM Int’l Conf. on Automated Software Engineering. Melbourne: ACM,
                     2020. 981–992. [doi: 10.1145/3324884.3416532]
                  [7]  Wang SW, Wen M, Lin B, Wu HJ, Qin YH, Zou DQ, Mao XG, Jin H. Automated patch correctness assessment: How far are we? In:
                     Proc. of the 35th IEEE/ACM Int’l Conf. on Automated Software Engineering. Melbourne: ACM, 2020. 968–980. [doi: 10.1145/3324884.
                     3416590]
                  [8]  Xiong YF, Liu XY, Zeng MH, Zhang L, Huang G. Identifying patch correctness in test-based program repair. In: Proc. of the 40th Int’l
                     Conf. on Software Engineering. Gothenburg: ACM, 2018. 789–799. [doi: 10.1145/3180155.3180182]
                  [9]  Tao YD, Kim J, Kim S, Xu C. Automatically generated patches as debugging aids: A human study. In: Proc. of the 22nd ACM SIGSOFT
                     Int’l Symp. on Foundations of Software Engineering. Hong Kong: ACM, 2014. 64–74. [doi: 10.1145/2635868.2635873]
                 [10]  Just R, Jalali D, Ernst MD. Defects4J: A database of existing faults to enable controlled testing studies for Java programs. In: Proc. of
                     2014 Int’l Symp. on Software Testing and Analysis. San Jose: ACM, 2014. 437–440. [doi: 10.1145/2610384.2628055]
                 [11]  Martinez M, Monperrus M. ASTOR: A program repair library for Java (demo). In: Proc. of the 25th Int’l Symp. on Software Testing and
                     Analysis. Saarbrücken: ACM, 2016. 441–444. [doi: 10.1145/2931037.2948705]
                 [12]  Li Y, Wang SH, Nguyen TN, van Nguyen S. Improving bug detection via context-based code representation learning and attention-based
   273   274   275   276   277   278   279   280   281   282   283