检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:林锴 陶传奇 黄志球[1,2,4] LIN Kai;TAO Chuanqi;HUANG Zhiqiu(College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China;Ministry Key Laboratory for Safety-Critical Software Development and Verification,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China;State Key Laboratory for Novel Software Technology,Nanjing University,Nanjing 210023,China;Collaborative Innovation Center of Novel Software Technology and Industrialization,Nanjing 210093,China)
机构地区:[1]南京航空航天大学计算机科学与技术学院,南京211106 [2]南京航空航天大学高安全系统的软件开发与验证技术工信部重点实验室,南京211106 [3]南京大学计算机软件新技术国家重点实验室,南京210023 [4]软件新技术与产业化协同创新中心,南京210093
出 处:《计算机科学与探索》2023年第3期667-677,共11页Journal of Frontiers of Computer Science and Technology
基 金:国家重点研发计划(2018YFB1003900);国家自然科学基金(61602267,61402229);计算机软件新技术国家重点实验室基金(KFKT2018B19);中央高校基本科研业务费专项资金(NS2019058)。
摘 要:为了保证软件的健壮性以及系统的可靠性,异常处理被广泛应用于软件开发过程中。开发者们希望选择合适的异常处理代码以防止出现程序崩溃或者内存泄漏等问题。然而开发者,尤其是新手,由于缺乏经验很难编写出正确或规范的异常处理代码。为了协助开发者编写正确的异常处理代码,提出了面向异常处理的代码智能化推荐方法,即DeepEHCR。该方法通过构建API调用树来表示异常发生位置的上下文信息,然后根据上下文信息,利用自注意力网络推荐相应的异常处理策略。针对处理异常这一具体策略,利用Transformer模型进一步推荐处理异常相关的API序列。实验表明DeepEHCR在异常处理策略推荐和API序列推荐上都有较高的性能。在异常处理策略推荐方面,Accuracy、Precision、Recall以及F1-score的值分别达到了89.78%、89.98%、89.34%以及89.59%。在API序列推荐方面,Hit@1/3/5的值分别达到了57.83%、69.73%、74.79%。除此之外,DeepEHCR在修复真实的异常漏洞方面也优于现有研究工作。Exception handling is widely used in program development to ensure software robustness and system reliability.Users want to select the right exception handling code to prevent program crashes or memory leaks.However,it is difficult for users,especially novices,to write proper exception handling code due to lack of experience.In order to assist developers to write correct exception handling code,this paper proposes DeepEHCR,an intelligent code recommendation approach for exception handling.It constructs API call tree to represent the context code information of the location where the exception occurs,and uses the self-attention network to recommend the exception handling strategy that the context code needs to take.For the strategy of HANDLE,the Transformer model is employed to further recommend related API sequence to handle exceptions.Experimental results show that DeepEHCR has high performance in both exception handling strategy recommendation and API sequence recommendation.In terms of exception handling strategy recommendation,the values of Accuracy,Precision,Recall and F1-score reach89.78%,89.98%,89.34%and 89.59%,respectively.In terms of API sequence recommendation,the values of Hit@1/3/5reach 57.83%,69.73%and 74.79%,respectively.In addition,DeepEHCR outperforms baselines on fixing real exception bugs.
分 类 号:TP391[自动化与计算机技术—计算机应用技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.222