{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,9]],"date-time":"2026-01-09T15:37:58Z","timestamp":1767973078368,"version":"3.49.0"},"reference-count":46,"publisher":"World Scientific Pub Co Pte Ltd","issue":"03","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Int. J. Soft. Eng. Knowl. Eng."],"published-print":{"date-parts":[[2026,3,15]]},"abstract":"<jats:p>The automatic generation of code comments is a crucial aspect in software engineering as it allows the description of source code functions in natural language. In recent years, researchers have utilized advanced machine translation models, particularly transformer-based models, to achieve remarkable results in the task of code summarization. Despite these advancements, current methods still face some challenges. First, existing models fail to incorporate the rich structural information of the code well, resulting in inadequate summary statements. Second, most generative models are too sensitive to the editing of code text, which results in insufficient generalization ability of the model. To address these issues, we proposed a new model named SPA-Trans(Structure Position-aware Attention Transformer-based model). SPA-Trans uses a distance matrix based on the relative distance of nodes in the AST (Abstract Syntax Tree) to represent the structural correlation between each token, enhancing the model\u2019s ability to capture structural information of the source code. Additionally, in order to reduce the sensitivity of the model to code editing, we used the adversarial training method in the embedding layer to simulate code editing, which improves the generalization of the model. Our experiments on real-world datasets in Java and Python validate the effectiveness of our proposed method.<\/jats:p>","DOI":"10.1142\/s0218194025500512","type":"journal-article","created":{"date-parts":[[2025,8,30]],"date-time":"2025-08-30T04:11:30Z","timestamp":1756527090000},"page":"343-361","source":"Crossref","is-referenced-by-count":0,"title":["Modeling Structural Features with Structure Position-Aware Attention for Code Summarization"],"prefix":"10.1142","volume":"36","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6517-2055","authenticated-orcid":false,"given":"Jian","family":"Luo","sequence":"first","affiliation":[{"name":"School of Cyber Science and Engineering, Wuhan University, Wuhan 430072, Hubei, P.\u00a0R.\u00a0China"},{"name":"Key Laboratory of Aerospace Information Security and Trusted Computing, Ministry of Education, Wuhan 430072, Hubei, P.\u00a0R.\u00a0China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Zhiheng","family":"Qu","sequence":"additional","affiliation":[{"name":"School of Cyber Science and Engineering, Wuhan University, Wuhan 430072, Hubei, P.\u00a0R.\u00a0China"},{"name":"Key Laboratory of Aerospace Information Security and Trusted Computing, Ministry of Education, Wuhan 430072, Hubei, P.\u00a0R.\u00a0China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5261-0191","authenticated-orcid":false,"given":"Bo","family":"Cai","sequence":"additional","affiliation":[{"name":"School of Cyber Science and Engineering, Wuhan University, Wuhan 430072, Hubei, P.\u00a0R.\u00a0China"},{"name":"Key Laboratory of Aerospace Information Security and Trusted Computing, Ministry of Education, Wuhan 430072, Hubei, P.\u00a0R.\u00a0China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"219","published-online":{"date-parts":[[2025,12,6]]},"reference":[{"key":"S0218194025500512BIB001","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3182538"},{"key":"S0218194025500512BIB002","doi-asserted-by":"publisher","DOI":"10.1145\/3196321.3196334"},{"key":"S0218194025500512BIB003","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2013.6613830"},{"key":"S0218194025500512BIB004","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2011.28"},{"key":"S0218194025500512BIB005","doi-asserted-by":"publisher","DOI":"10.1145\/1858996.1859006"},{"key":"S0218194025500512BIB006","doi-asserted-by":"publisher","DOI":"10.1109\/WCRE.2010.13"},{"key":"S0218194025500512BIB007","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2013.6613829"},{"key":"S0218194025500512BIB008","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2013.6693113"},{"key":"S0218194025500512BIB009","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2015.7081848"},{"key":"S0218194025500512BIB010","doi-asserted-by":"publisher","DOI":"10.3115\/v1\/D14-1179"},{"key":"S0218194025500512BIB011","volume-title":"Proc. 3rd Int. Conf. Learning Representations","author":"Bahdanau D.","year":"2015"},{"key":"S0218194025500512BIB012","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v32i1.11963"},{"key":"S0218194025500512BIB013","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P16-1195"},{"key":"S0218194025500512BIB014","unstructured":"W. Zaremba, I. Sutskever and O. Vinyals, Recurrent neural network regularization, CoRR (2014), arXiv:1409.2329."},{"key":"S0218194025500512BIB015","first-page":"5998","volume-title":"Advances in Neural Information Processing Systems 30","author":"Vaswani A.","year":"2017"},{"key":"S0218194025500512BIB016","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.acl-main.449"},{"key":"S0218194025500512BIB017","doi-asserted-by":"publisher","DOI":"10.1145\/3192366.3192412"},{"key":"S0218194025500512BIB018","volume-title":"Proc. 6th Int. Conf. Learning Representations","author":"Allamanis M.","year":"2018"},{"key":"S0218194025500512BIB019","volume-title":"Proc. 7th Int. Conf. Learning Representations","author":"Alon U.","year":"2019"},{"key":"S0218194025500512BIB020","doi-asserted-by":"publisher","DOI":"10.1145\/3290353"},{"key":"S0218194025500512BIB021","volume-title":"Proc. 7th Int. Conf. Learning Representations","author":"Fernandes P.","year":"2019"},{"key":"S0218194025500512BIB022","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v30i1.10139"},{"key":"S0218194025500512BIB023","doi-asserted-by":"publisher","DOI":"10.1109\/IJCNN.2019.8851751"},{"key":"S0218194025500512BIB024","unstructured":"J. Harer, C. P. Reale and P. Chin, Tree-transformer: A transformer-based method for correction of tree-structured data, CoRR (2019), arXiv:abs\/1908.00449."},{"key":"S0218194025500512BIB025","doi-asserted-by":"publisher","DOI":"10.1145\/3387904.3389268"},{"key":"S0218194025500512BIB026","doi-asserted-by":"publisher","DOI":"10.1145\/3524610.3527905"},{"key":"S0218194025500512BIB027","volume-title":"Proc. 9th Int. Conf. Learning Representations","author":"Z\u00fcgner D.","year":"2021"},{"key":"S0218194025500512BIB028","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.findings-acl.93"},{"key":"S0218194025500512BIB029","doi-asserted-by":"publisher","DOI":"10.24963\/ijcai.2018\/314"},{"key":"S0218194025500512BIB030","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3238206"},{"key":"S0218194025500512BIB031","volume-title":"Proc. 3rd Int. Conf. Learning Representations","author":"Goodfellow I. J.","year":"2015"},{"key":"S0218194025500512BIB032","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D15-1166"},{"key":"S0218194025500512BIB033","volume-title":"Proc. 5th Int. Conf. Learning Representations","author":"Miyato T.","year":"2017"},{"key":"S0218194025500512BIB034","volume-title":"Proc. 3rd Int. Conf. Learning Representations","author":"Kingma D. P.","year":"2015"},{"key":"S0218194025500512BIB035","first-page":"6559","volume-title":"Advances in Neural Information Processing Systems 32: Annual Conf. Neural Information Processing Systems 2019","author":"Wei B.","year":"2019"},{"key":"S0218194025500512BIB036","first-page":"311","volume-title":"Proc. 40th Annual Meeting of the Association for Computational Linguistics","author":"Papineni K.","year":"2002"},{"key":"S0218194025500512BIB037","first-page":"65","volume-title":"Proc. Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and\/or Summarization","author":"Banerjee S.","year":"2005"},{"key":"S0218194025500512BIB038","first-page":"74","volume-title":"Workshop on Text Summarization Branches Out, Post-Conference Workshop of ACL 2004","author":"Lin C.-Y.","year":"2004"},{"key":"S0218194025500512BIB039","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P16-1078"},{"key":"S0218194025500512BIB040","unstructured":"N. Xue, W. Li, Y. Liu, X. Li, F. Niu, M. Chen, T. Gu, S. Liu, H. Jiang and M. Sun, Codet5+: Open code pre-trained models for code understanding and generation, arXiv:2305.07759."},{"key":"S0218194025500512BIB041","unstructured":"OpenAI, Gpt-4o technical report, Technical Report, OpenAI (2024)."},{"key":"S0218194025500512BIB042","volume-title":"Advances in Neural Information Processing Systems","author":"Feng H.","year":"2023"},{"key":"S0218194025500512BIB043","doi-asserted-by":"publisher","DOI":"10.1145\/3196321.3196334"},{"key":"S0218194025500512BIB044","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.482"},{"key":"S0218194025500512BIB045","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.acl-long.431"},{"key":"S0218194025500512BIB046","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510154"}],"container-title":["International Journal of Software Engineering and Knowledge Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.worldscientific.com\/doi\/pdf\/10.1142\/S0218194025500512","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,1,9]],"date-time":"2026-01-09T09:12:57Z","timestamp":1767949977000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.worldscientific.com\/doi\/10.1142\/S0218194025500512"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,12,6]]},"references-count":46,"journal-issue":{"issue":"03","published-print":{"date-parts":[[2026,3,15]]}},"alternative-id":["10.1142\/S0218194025500512"],"URL":"https:\/\/doi.org\/10.1142\/s0218194025500512","relation":{},"ISSN":["0218-1940","1793-6403"],"issn-type":[{"value":"0218-1940","type":"print"},{"value":"1793-6403","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,12,6]]}}}