Identifying change patterns of API misuses from code changes

来源 :中国科学:信息科学(英文版) | 被引量 : 0次 | 上传用户:thskaoyan
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
Library or framework APIs are difficult to learn and use,leading to unexpected software behaviors or bugs.Hence,various API mining techniques have been introduced to mine API usage patterns about the co-occurring of API calls or pre-conditions of API calls.However,they fail to mine patterns about an API call itself (e.g.,whether the arguments of the API call are correctly set and whether the API is suitably chosen over other similar APIs).To bridge this gap,we propose CPAM to identify change patterns (in the form of a pair of APIs before and after code changes) to fix API misuses,using historical code changes.Given a set of target APIs and a corpus of open-source projects,CPAM first selects the commits that potentially fix API misuses from the corpus,then extracts changes to API misuses in each selected commit,and finally identifies change patterns of API misuses.We implement CPAM for Java,and conduct large-scale evaluation,targeting Java SE APIs and using a corpus of 1162 Java projects.Our experimental results demonstrateCPAM's effectiveness and efficiency.By applying identified change patterns to bug detection,we find 44 new bugs,and 18 of them have been confirmed and fixed.
其他文献
近年来,南京市江宁区着力构建“引才、育才、留才”一体化机制,全区人才工作扎实推进、亮点纷呈,为南京创新名城建设注入了强劲动能.rn突出高端引领,构筑现代化人才治理体系r
期刊
全面推进乡村振兴,人才是关键.近年来,广东省清远市委市政府紧紧围绕打造全国破解城乡二元结构试验区、粤东西北“入珠融湾”先行市、全省乡村振兴排头兵的工作目标,由市委组
期刊
Few-shot text classification targets at the situation where a model is developed to classify newly incoming query instances after acquiring knowledge from a few
近年来,德化紧紧抓住陶瓷这一支柱产业,立足陶瓷技能人才基础和队伍现状,着力打造舒心、舒适、舒畅的成长沃土.rn在“暖”上用情,营造“近者悦远者来”的舒心.先后出台陶瓷技
期刊
江西上饶坚持将产业作为人才工作的实践指向,充分依托驻外办事机构、异地上饶商会、领军龙头企业,在全国范围内布局驻外人才工作联络站,不断延伸人才联络“触角”,拓展人才招
期刊
近年来,宁德在青年人才引进、培养、服务等方面狠下功夫,加速集聚各类优秀青年人才,不断夯实宁德全方位高质量发展的人才基础.rn强化党管人才,不断完善政策机制rn树立人才是
期刊
近年来,重庆市江津区牢固树立人才是第一资源理念,持续用力抓体制机制改革、抓政策优化完善、抓引育渠道拓展、抓引领服务保障,推动“津鹰计划”与“重庆英才计划”有机衔接,
期刊
In this study,we discuss global adaptive stabilization for a class of uncertain nonlinear systems.The input powers of the system are unknown,and the upper bound
江苏省苏州市相城区积极推动全区五大功能片区全面融人长三角区域一体化发展,坚持围绕产业链布局人才链,加速实现人才集聚和产业发展同频共振、互促共进,以开放、服务、创新
期刊
The unmanned aerial vehicle (UAV) is a promising enabler of Internet of Things (IoT) owing to its highly flexible features.Combined with wireless power transfer