{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,2,21]],"date-time":"2025-02-21T06:43:26Z","timestamp":1740120206334,"version":"3.37.3"},"reference-count":54,"publisher":"World Scientific Pub Co Pte Ltd","issue":"10","funder":[{"DOI":"10.13039\/501100001809","name":"NSFC","doi-asserted-by":"crossref","award":["62272214"],"award-info":[{"award-number":["62272214"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Cooperation Fund of Huawei-Nanjing University Next Generation Programming Innovation Lab","award":["YBN2019105178SW32"],"award-info":[{"award-number":["YBN2019105178SW32"]}]},{"name":"Nanjing University-Huawei Joint Laboratory of New Software Technology","award":["TC20230202021-2023-X"],"award-info":[{"award-number":["TC20230202021-2023-X"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Int. J. Soft. Eng. Knowl. Eng."],"published-print":{"date-parts":[[2023,10]]},"abstract":"<jats:p> APIs play a crucial role in contemporary software development, streamlining implementation and maintenance processes. However, improper API usage can result in significant issues such as unexpected outcomes, security vulnerabilities and system crashes. To detect API misuses, current methods primarily rely on comparing established API usage patterns with target points for automated detection, mainly based on pre-validated datasets. Nonetheless, there is a scarcity of publicly available datasets on API misuses and their corresponding fixes, which hinders data-driven research. Moreover, most existing techniques concentrate on statically typed languages, such as Java and C, with only a few addressing dynamic languages like Python effectively, due to difficulties in handling dynamic features. Therefore, it is essential to identify Python API misuses and their fixes automatically and promptly. In this paper, we introduce HatPAM, a Hybrid Analysis and Attention-based Python API-Misuse Miner, which (a) provides a method for automatically mining true-positive commits related to Python API-misuse fixes from GitHub and (b) presents the subsequent processing for classifying Python API misuses in true-positive cases. Particularly, HatPAM applies hybrid static analysis and introduces a structure-based attention mechanism to examine syntax, semantics and structural features in Python code context, and considers the consistency between code and developers\u2019 natural intent to significantly reduce false-positive cases. Evaluation on six popular Python projects reveals that HatPAM outperforms various state-of-the-art baselines, achieving up to 92.2% Precision, 86.7% Recall and 89.3% F1-score, indicating its capability to identify and classify Python API-misuse commits. <\/jats:p>","DOI":"10.1142\/s0218194023500432","type":"journal-article","created":{"date-parts":[[2023,7,4]],"date-time":"2023-07-04T10:20:22Z","timestamp":1688466022000},"page":"1567-1597","source":"Crossref","is-referenced-by-count":1,"title":["Python API Misuse Mining and Classification Based on Hybrid Analysis and Attention Mechanism"],"prefix":"10.1142","volume":"33","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6986-0111","authenticated-orcid":false,"given":"Xincheng","family":"He","sequence":"first","affiliation":[{"name":"Department of Computer Science and Technology, Nanjing University, Nanjing, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Xiaojin","family":"Liu","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Technology, Nanjing University, Nanjing, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4815-2850","authenticated-orcid":false,"given":"Lei","family":"Xu","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Technology, Nanjing University, Nanjing, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"219","published-online":{"date-parts":[[2023,8,7]]},"reference":[{"key":"S0218194023500432BIB001","first-page":"673","volume-title":"2022 IEEE Int. Conf. Software Analysis, Evolution and Reengineering (SANER)","author":"Schlichtig M.","year":"2022"},{"issue":"12","key":"S0218194023500432BIB002","doi-asserted-by":"crossref","first-page":"1170","DOI":"10.1109\/TSE.2018.2827384","volume":"45","author":"Amann S.","year":"2018","journal-title":"IEEE Trans. Softw. Eng."},{"issue":"2","key":"S0218194023500432BIB004","doi-asserted-by":"crossref","first-page":"15","DOI":"10.1007\/s10515-021-00294-x","volume":"28","author":"Nielebock S.","year":"2021","journal-title":"Autom. Softw. Eng."},{"key":"S0218194023500432BIB005","first-page":"880","volume-title":"Proc. 2018 26th ACM Joint Meeting on European Software Engineering Conf. Symp. Foundations of Software Engineering","author":"Reinhardt A.","year":"2018"},{"key":"S0218194023500432BIB006","doi-asserted-by":"crossref","first-page":"2","DOI":"10.1007\/978-3-642-14107-2_2","volume-title":"ECOOP 2010 \u2014 Object-Oriented Programming: 24th European Conf.","author":"Monperrus M.","year":"2010"},{"key":"S0218194023500432BIB007","first-page":"383","volume-title":"Proc. 7th Joint Meeting of the European Software Engineering Conf. ACM SIGSOFT Symp. Foundations of Software Engineering","author":"Nguyen T. T.","year":"2009"},{"key":"S0218194023500432BIB008","doi-asserted-by":"crossref","first-page":"263","DOI":"10.1007\/s10515-011-0084-1","volume":"18","author":"Wasylkowski A.","year":"2011","journal-title":"Autom. Softw. Eng."},{"key":"S0218194023500432BIB009","first-page":"35","volume-title":"Proc. 6th Joint Meeting of the European Software Engineering Conf. ACM SIGSOFT Symp. Foundations of Software Engineering","author":"Wasylkowski A.","year":"2007"},{"key":"S0218194023500432BIB010","doi-asserted-by":"crossref","first-page":"370","DOI":"10.1007\/978-3-642-00593-0_25","volume-title":"Fundamental Approaches to Software Engineering: 12th Int. Conf., FASE 2009, Part of the Joint European Conf. Theory and Practice of Software (ETAPS 2009","author":"Acharya M.","year":"2009"},{"issue":"6","key":"S0218194023500432BIB011","doi-asserted-by":"crossref","first-page":"123","DOI":"10.1145\/1273442.1250749","volume":"42","author":"Ramanathan M. K.","year":"2007","journal-title":"ACM SIGPLAN Not."},{"key":"S0218194023500432BIB012","doi-asserted-by":"crossref","first-page":"283","DOI":"10.1109\/ASE.2009.72","volume-title":"2009 IEEE\/ACM Int. Conf. Automated Software Engineering","author":"Thummalapenta S.","year":"2009"},{"key":"S0218194023500432BIB013","doi-asserted-by":"crossref","first-page":"265","DOI":"10.1109\/MSR.2019.00053","volume-title":"2019 IEEE\/ACM 16th Int. Conf. Mining Software Repositories (MSR)","author":"Sven A.","year":"2019"},{"issue":"1","key":"S0218194023500432BIB014","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/2430536.2430541","volume":"22","author":"Monperrus M.","year":"2013","journal-title":"ACM Trans. Softw. Eng. Methodol."},{"key":"S0218194023500432BIB015","first-page":"1194","volume-title":"2021 IEEE 45th Annual Computers, Software, and Applications Conf. (COMPSAC)","author":"Singleton L.","year":"2021"},{"key":"S0218194023500432BIB017","first-page":"522","volume-title":"2023 IEEE 30rd Int. Conf. Software Analysis, Evolution, and Reengineering (SANER)","author":"Xincheng He L. X.","year":"2023"},{"issue":"8","key":"S0218194023500432BIB018","doi-asserted-by":"crossref","first-page":"2761","DOI":"10.1109\/TSE.2021.3069978","volume":"48","author":"Kang H. J.","year":"2021","journal-title":"IEEE Trans. Softw. Eng."},{"key":"S0218194023500432BIB019","doi-asserted-by":"crossref","first-page":"705","DOI":"10.1109\/ASE51524.2021.9678720","volume-title":"2021 36th IEEE\/ACM Int. Conf. Automated Software Engineering (ASE)","author":"Zhou J.","year":"2021"},{"key":"S0218194023500432BIB020","doi-asserted-by":"crossref","first-page":"427","DOI":"10.1145\/3460319.3464819","volume-title":"Proc. 30th ACM SIGSOFT Int. Symp. Software Testing and Analysis","author":"Zeng Z.","year":"2021"},{"key":"S0218194023500432BIB021","first-page":"1634","volume-title":"2021 IEEE\/ACM 43rd Int. Conf. Software Engineering (ICSE)","author":"He X.","year":"2021"},{"key":"S0218194023500432BIB022","doi-asserted-by":"publisher","DOI":"10.1142\/S0218194022500243"},{"key":"S0218194023500432BIB023","first-page":"1","volume-title":"34th European Conf. Object-Oriented Programming (ECOOP 2020)","author":"Lagouvardos S.","year":"2020"},{"key":"S0218194023500432BIB024","first-page":"470","volume-title":"2016 IEEE 23rd Int. Conf. Software Analysis, Evolution, and Reengineering (SANER)","volume":"1","author":"Beller M.","year":"2016"},{"key":"S0218194023500432BIB025","first-page":"925","volume-title":"2022 IEEE Int. Conf. Software Analysis, Evolution and Reengineering (SANER)","author":"Baker W.","year":"2022"},{"key":"S0218194023500432BIB026","first-page":"1","volume-title":"Proc. 15th ACM\/IEEE Int. Symp. Empirical Software Engineering and Measurement (ESEM)","author":"Wickert A.-K.","year":"2021"},{"key":"S0218194023500432BIB027","doi-asserted-by":"crossref","first-page":"11","DOI":"10.1109\/COMPSAC.2019.00012","volume-title":"2019 IEEE 43rd Annual Computer Software and Applications Conference (COMPSAC)","volume":"1","author":"Gu Z.","year":"2019"},{"key":"S0218194023500432BIB028","first-page":"129","volume-title":"Proc. 27th ACM SIGSOFT Int. Symp. Software Testing and Analysis","author":"Zhang Y.","year":"2018"},{"key":"S0218194023500432BIB029","doi-asserted-by":"crossref","first-page":"914","DOI":"10.1145\/3106237.3117771","volume-title":"Proc. 2017 11th Joint Meeting on Foundations of Software Engineering","author":"Zhou Y.","year":"2017"},{"key":"S0218194023500432BIB030","first-page":"579","volume-title":"2018 IEEE Int. Conf. Software Maintenance and Evolution (ICSME)","author":"Sabetta A.","year":"2018"},{"key":"S0218194023500432BIB031","doi-asserted-by":"crossref","first-page":"32","DOI":"10.1145\/3379597.3387461","volume-title":"Proc. 17th Int. Conf. Mining Software Repositories","author":"Chen Y.","year":"2020"},{"key":"S0218194023500432BIB032","first-page":"147","volume-title":"Proc. 2020 ACM SIGSAC Conf. Cloud Computing Security Workshop","author":"Ramsauer R.","year":"2020"},{"key":"S0218194023500432BIB033","doi-asserted-by":"crossref","first-page":"392","DOI":"10.1109\/ICSE.2013.6606585","volume-title":"2013 35th Int. Conf. Software Engineering (ICSE)","author":"Herzig K.","year":"2013"},{"key":"S0218194023500432BIB034","doi-asserted-by":"crossref","first-page":"34","DOI":"10.1109\/MSR.2019.00016","volume-title":"2019 IEEE\/ACM 16th Int. Conf. Mining Software Repositories (MSR)","author":"Hoang T.","year":"2019"},{"key":"S0218194023500432BIB035","doi-asserted-by":"crossref","first-page":"518","DOI":"10.1145\/3377811.3380361","volume-title":"Proc. ACM\/IEEE 42nd Int. Conf. Software Engineering","author":"Hoang T.","year":"2020"},{"key":"S0218194023500432BIB036","doi-asserted-by":"crossref","first-page":"461","DOI":"10.1145\/3324884.3416551","volume-title":"Proc. 35th IEEE\/ACM Int. Conf. Automated Software Engineering","author":"Ren X.","year":"2020"},{"key":"S0218194023500432BIB037","first-page":"183","volume-title":"2018 IEEE Int. Conf. Software Maintenance and Evolution (ICSME)","author":"Li H.","year":"2018"},{"key":"S0218194023500432BIB038","doi-asserted-by":"crossref","first-page":"1400","DOI":"10.1109\/SP40001.2021.00090","volume-title":"2021 IEEE Symp. Security and Privacy (SP)","author":"Li Z.","year":"2021"},{"issue":"7","key":"S0218194023500432BIB039","doi-asserted-by":"crossref","first-page":"2658","DOI":"10.1109\/TSE.2021.3067156","volume":"48","author":"Kechagia M.","year":"2021","journal-title":"IEEE Trans. Softw. Eng."},{"key":"S0218194023500432BIB040","first-page":"51","volume-title":"2022 IEEE Int. Conf. Software Analysis, Evolution and Reengineering (SANER)","author":"Nguyen-Truong G.","year":"2022"},{"key":"S0218194023500432BIB041","doi-asserted-by":"crossref","first-page":"437","DOI":"10.1145\/2610384.2628055","volume-title":"Proc. 2014 Int. Symp. Software Testing and Analysis","author":"Just R.","year":"2014"},{"key":"S0218194023500432BIB042","first-page":"468","volume-title":"2019 IEEE 26th Int. Conf. Software Analysis, Evolution and Reengineering (SANER)","author":"Madeiral F.","year":"2019"},{"key":"S0218194023500432BIB043","doi-asserted-by":"crossref","first-page":"10","DOI":"10.1145\/3196398.3196473","volume-title":"Proc. 15th Int. Conf. Mining Software Repositories","author":"Saha R. K.","year":"2018"},{"issue":"12","key":"S0218194023500432BIB044","doi-asserted-by":"crossref","first-page":"1236","DOI":"10.1109\/TSE.2015.2454513","volume":"41","author":"Le Goues C.","year":"2015","journal-title":"IEEE Trans. Softw. Eng."},{"key":"S0218194023500432BIB045","doi-asserted-by":"crossref","first-page":"55","DOI":"10.1145\/3135932.3135941","volume-title":"Proc. Companion of the 2017 ACM SIGPLAN Int. Conf. Systems, Programming, Languages, and Applications: Software for Humanity","author":"Lin D.","year":"2017"},{"key":"S0218194023500432BIB046","first-page":"15","volume-title":"Proc. 19th ACM SIGSOFT Symp. 13th European Conf. Foundations of Software Engineering","author":"Wu R.","year":"2011"},{"key":"S0218194023500432BIB047","first-page":"1726","volume-title":"Proc. 30th ACM Joint European Software Engineering Conf. Symp. Foundations of Software Engineering","author":"Nguyen T. G.","year":"2022"},{"key":"S0218194023500432BIB048","first-page":"1","volume-title":"2019 ACM\/IEEE Int. Symp. Empirical Software Engineering and Measurement (ESEM)","author":"Zafar S.","year":"2019"},{"issue":"4","key":"S0218194023500432BIB049","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/1082983.1083147","volume":"30","author":"\u015aliwerski J.","year":"2005","journal-title":"ACM Sigsoft Softw. Eng. Notes"},{"issue":"2","key":"S0218194023500432BIB050","doi-asserted-by":"crossref","first-page":"181","DOI":"10.1109\/TSE.2007.70773","volume":"34","author":"Kim S.","year":"2008","journal-title":"IEEE Trans. Softw. Eng."},{"issue":"6","key":"S0218194023500432BIB051","doi-asserted-by":"crossref","first-page":"757","DOI":"10.1109\/TSE.2012.70","volume":"39","author":"Kamei Y.","year":"2012","journal-title":"IEEE Trans. Softw. Eng."},{"key":"S0218194023500432BIB052","doi-asserted-by":"crossref","first-page":"703","DOI":"10.1007\/s10664-011-9186-4","volume":"17","author":"Monperrus M.","year":"2012","journal-title":"Empir. Softw. Eng."},{"key":"S0218194023500432BIB054","first-page":"511","volume-title":"Proc. 2016 24th ACM SIGSOFT Int. Symp. Foundations of Software Engineering","author":"Nguyen A. T.","year":"2016"},{"key":"S0218194023500432BIB055","doi-asserted-by":"crossref","first-page":"619","DOI":"10.1145\/3524610.3527901","volume-title":"Proc. 30th IEEE\/ACM Int. Conf. Program Comprehension","author":"Zhu H.","year":"2022"},{"key":"S0218194023500432BIB056","first-page":"21","volume-title":"Proc. 1988 Connectionist Models Summer School","volume":"1","author":"LeCun Y.","year":"1988"},{"key":"S0218194023500432BIB057","first-page":"1","volume-title":"2018 IEEE\/ACM 26th Int. Symp. Quality of Service (IWQoS)","author":"Zhang Z.","year":"2018"}],"container-title":["International Journal of Software Engineering and Knowledge Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.worldscientific.com\/doi\/pdf\/10.1142\/S0218194023500432","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2023,10,13]],"date-time":"2023-10-13T06:50:58Z","timestamp":1697179858000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.worldscientific.com\/doi\/10.1142\/S0218194023500432"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,8,7]]},"references-count":54,"journal-issue":{"issue":"10","published-print":{"date-parts":[[2023,10]]}},"alternative-id":["10.1142\/S0218194023500432"],"URL":"https:\/\/doi.org\/10.1142\/s0218194023500432","relation":{},"ISSN":["0218-1940","1793-6403"],"issn-type":[{"type":"print","value":"0218-1940"},{"type":"electronic","value":"1793-6403"}],"subject":[],"published":{"date-parts":[[2023,8,7]]}}}