Identifying change patterns of API misuses from code changes
Identifying change patterns of API misuses from code changes
复制标题
从代码更改中识别 API 滥用的更改模式
DOI:
10.1007/s11432-019-2745-5
复制
发表时间:
2021-02
期刊:
影响因子:
--
通讯作者:
Zhao Wenyun
中科院分区:
文献类型:
--
作者:
Liu Wenjian;Chen Bihuan;Peng Xin;Sun Qinghao;Zhao Wenyun
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 Cpamto 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, Cpamfirst 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 Cpamfor Java, and conduct large-scale evaluation, targeting Java SE APIs and using a corpus of 1162 Java projects. Our experimental results demonstrate Cpam’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.
登录
查看更多内容
DOI:
10.1016/j.jss.2017.05.039
发表时间:
2017-08
期刊:
J. Syst. Softw.
影响因子:
--
作者:
H. E. Salman
通讯作者:
H. E. Salman
DOI:
10.1145/3106237.3117771
发表时间:
2017-08
期刊:
Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering
影响因子:
--
作者:
Yaqin Zhou;Asankhaya Sharma
通讯作者:
Yaqin Zhou;Asankhaya Sharma
影响因子:
7.4
作者:
Chadd C. Williams;J. Hollingsworth
通讯作者:
Chadd C. Williams;J. Hollingsworth
DOI:
10.1145/3180155.3180260
发表时间:
2018-05
期刊:
2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE)
影响因子:
--
作者:
Tianyi Zhang;Ganesha Upadhyaya;Anastasia Reinhardt;Hridesh Rajan;Miryung Kim
通讯作者:
Tianyi Zhang;Ganesha Upadhyaya;Anastasia Reinhardt;Hridesh Rajan;Miryung Kim
DOI:
10.1007/978-3-642-03013-0_15
发表时间:
2009-07
期刊:
--
影响因子:
--
作者:
Hao Zhong;Tao Xie;Lu Zhang;J. Pei;Hong Mei
通讯作者:
Hao Zhong;Tao Xie;Lu Zhang;J. Pei;Hong Mei