{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,16]],"date-time":"2026-06-16T08:23:20Z","timestamp":1781598200116,"version":"3.54.5"},"reference-count":63,"publisher":"Association for Computing Machinery (ACM)","issue":"5","license":[{"start":{"date-parts":[[2023,7,22]],"date-time":"2023-07-22T00:00:00Z","timestamp":1689984000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-nc\/4.0\/"}],"funder":[{"name":"Guangdong Key Area R&D Program","award":["2020B010164002"],"award-info":[{"award-number":["2020B010164002"]}]},{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["61902441, 61902105, 62032025"],"award-info":[{"award-number":["61902441, 61902105, 62032025"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Hong Kong RGC Project","award":["PolyU15224121"],"award-info":[{"award-number":["PolyU15224121"]}]},{"name":"Hong Kong ITF Project","award":["GHP\/052\/19SZ"],"award-info":[{"award-number":["GHP\/052\/19SZ"]}]},{"name":"Research and Development Program of Shenzhen","award":["SGDX20190918101201696"],"award-info":[{"award-number":["SGDX20190918101201696"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2023,9,30]]},"abstract":"<jats:p>Code comments are one of the important documents to help developers review and comprehend source code. In recent studies, researchers have proposed many deep learning models to generate the method header comments (i.e., method comment), which have achieved encouraging results. The comments in the method, which is called inline comment, are also important for program comprehension. Unfortunately, they have not received enough attention in automatic generation when comparing with the method comments. In this paper, we compare and analyze the similarities and differences between the method comments and the inline comments. By applying the existing models of generating method comments to the inline comment generation, we find that these existing models perform worse on the task of inline comment generation. We then further explore the possible reasons and obtain a number of new observations. For example, we find that there are a lot of templates (i.e., comments with the same or similar structures) in the method comment dataset, which makes the models perform better. Some terms were thought to be important (e.g., API calls) in the comment generation by previous study does not significantly affect the quality of the generated comments, which seems counter-intuitive. Our findings may give some implications for building the approaches of method comment or inline comment generation in the future.<\/jats:p>","DOI":"10.1145\/3582570","type":"journal-article","created":{"date-parts":[[2023,2,13]],"date-time":"2023-02-13T12:48:55Z","timestamp":1676292535000},"page":"1-26","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":22,"title":["A Comparative Study on Method Comment and Inline Comment"],"prefix":"10.1145","volume":"32","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9548-0208","authenticated-orcid":false,"given":"Yuan","family":"Huang","sequence":"first","affiliation":[{"name":"School of Software Engineering, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5687-2655","authenticated-orcid":false,"given":"Hanyang","family":"Guo","sequence":"additional","affiliation":[{"name":"School of Software Engineering, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3409-9382","authenticated-orcid":false,"given":"Xi","family":"Ding","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5940-7719","authenticated-orcid":false,"given":"Junhuai","family":"Shu","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8234-3186","authenticated-orcid":false,"given":"Xiangping","family":"Chen","sequence":"additional","affiliation":[{"name":"Guangdong Key Laboratory for Big Data Analysis and Simulation of Public Opinion, School of Communication and Design, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9082-3208","authenticated-orcid":false,"given":"Xiapu","family":"Luo","sequence":"additional","affiliation":[{"name":"Department of Computing, The Hong Kong Polytechnic University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7878-4330","authenticated-orcid":false,"given":"Zibin","family":"Zheng","sequence":"additional","affiliation":[{"name":"School of Software Engineering, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3756-3483","authenticated-orcid":false,"given":"Xiaocong","family":"Zhou","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Sun Yat-sen University"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2023,7,22]]},"reference":[{"key":"e_1_3_2_2_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2013.6693113"},{"key":"e_1_3_2_3_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2015.7081848"},{"key":"e_1_3_2_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380383"},{"key":"e_1_3_2_5_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2015.7081826"},{"key":"e_1_3_2_6_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.knosys.2008.03.033"},{"key":"e_1_3_2_7_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2007.4362639"},{"key":"e_1_3_2_8_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2016.42"},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10515-006-7738-4"},{"key":"e_1_3_2_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3240471"},{"key":"e_1_3_2_11_2","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v32i1.11963"},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSC.2014.2347293"},{"key":"e_1_3_2_13_2","volume-title":"Proceedings of the Software Practice and Experience","author":"Huang Y.","year":"2019","unstructured":"Y. Huang, N. Jia, and J. Shu. 2019. Does your code need comment. In Proceedings of the Software Practice and Experience."},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2020.2979701"},{"key":"e_1_3_2_15_2","doi-asserted-by":"publisher","DOI":"10.1109\/TR.2019.2931725"},{"key":"e_1_3_2_16_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2019.8667994"},{"key":"e_1_3_2_17_2","unstructured":"Srinivasan Iyer Ioannis Konstas Alvin Cheung and Luke Zettlemoyer. 2016. Summarizing source code using a neural attention model. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) Association for Computational Linguistics Berlin 2073\u20132083."},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2020.106373"},{"key":"e_1_3_2_19_2","unstructured":"Ilya Sutskever Oriol Vinyals and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems Vol. 27 Curran Associates Inc."},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/3196321.3196334"},{"key":"e_1_3_2_21_2","doi-asserted-by":"crossref","unstructured":"Uri Alon Omer Levy and Eran Yahav. 2019. code2seq: Generating sequences from structured representations of code. In International Conference on Learning Representations . https:\/\/openreview.net\/forum?id=H1gKYo09tX.","DOI":"10.1145\/3290353"},{"key":"e_1_3_2_22_2","first-page":"1","volume-title":"Proceedings of the 2019 International Joint Conference on Neural Networks","author":"Shido Y.","year":"2019","unstructured":"Y. Shido, Y. Kobayashi, and A. Yamamoto. 2019. Automatic source code summarization. In Proceedings of the 2019 International Joint Conference on Neural Networks. IEEE, 1\u20138."},{"key":"e_1_3_2_23_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-019-09730-9"},{"key":"e_1_3_2_24_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00087"},{"key":"e_1_3_2_25_2","doi-asserted-by":"publisher","DOI":"10.5220\/0007678100150026"},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-019-09694-w"},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2020.110754"},{"key":"e_1_3_2_28_2","doi-asserted-by":"publisher","DOI":"10.5555\/3304889.3304975"},{"key":"e_1_3_2_29_2","first-page":"2091","volume-title":"Proceedings of the International Conference on Machine Learning","author":"Allamanis Miltiadis","year":"2016","unstructured":"Miltiadis Allamanis, Hao Peng, and Charles Sutton. 2016. A. convolutional attention network for extreme summarization of source code. In Proceedings of the International Conference on Machine Learning. 2091\u20132100."},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2015.7332514"},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2019.00152"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.1992.242525"},{"key":"e_1_3_2_33_2","first-page":"87","volume-title":"Proceedings of the 1996 International Conference on Software Maintenance.","author":"Manuel J.","year":"1996","unstructured":"J. Manuel, Juan Carlos Granja Barranco Garcia, and Alvarez. 1996. Maintainability as a key factor in maintenance productivity: A. case study. In Proceedings of the 1996 International Conference on Software Maintenance.IEEE Computer Society, 87."},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE-COMPANION.2009.5070980"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/1639950.1640047"},{"key":"e_1_3_2_36_2","first-page":"281","volume-title":"Proceedings of the IEEE International Conference on.","author":"Siy H.","year":"2001","unstructured":"H. Siy and L. Votta. 2001. Does the modern code inspection have value? In Software Maintenance. In Proceedings of the IEEE International Conference on.281\u2013289."},{"key":"e_1_3_2_37_2","unstructured":"Mahmoud O. Elish and Jeff Offutt. 2002. The adherence of open source java programmers to standard coding practices. The 6th IASTED International Conference Software Engineering and Applications Vol. 6 Cambridge MA 193\u2013198."},{"key":"e_1_3_2_38_2","first-page":"179","volume-title":"Proceedings of the 2006 International Workshop on Mining Software Repositories","author":"Zhen Ming","year":"2006","unstructured":"Ming Zhen, Ahmed E. Jiang, and Hassan. 2006. Examining the evolution of code comments in postgresql. In Proceedings of the 2006 International Workshop on Mining Software Repositories. ACM, 179\u2013180."},{"key":"e_1_3_2_39_2","unstructured":"Abdulkadir Seker Banu Diri and Halil Arslan. 2020. New developer metrics: Are comments as crucial as code contributions? CoRR abs\/2006.16349 (2020). arXiv:2006.16349 https:\/\/arxiv.org\/abs\/2006.16349."},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","DOI":"10.1145\/3341105.3374009"},{"key":"e_1_3_2_41_2","first-page":"53","volume-title":"Proceedings of the 2019 IEEE\/ACM 27th International Conference on Program Comprehension.","author":"Wen F.","year":"2019","unstructured":"F. Wen, C. Nagy, and G. Bavota. 2019. A. large-scale empirical study on code. In Proceedings of the 2019 IEEE\/ACM 27th International Conference on Program Comprehension.IEEE, 53\u201364."},{"key":"e_1_3_2_42_2","doi-asserted-by":"publisher","DOI":"10.1145\/3387904.3389258"},{"key":"e_1_3_2_43_2","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416546"},{"key":"e_1_3_2_44_2","first-page":"2021","volume-title":"Proceedings of the Conference on Empirical Methods in Natural Language Processing.","author":"Shi Ensheng","unstructured":"Ensheng Shi, Yanlin Wang, Lun Du, Hongyu Zhang, Shi Han, Dongmei Zhang, and Hongbin Sun. ([n. d.]). CAST: Enhancing code summarization with hierarchical splitting and reconstruction of abstract syntax trees. In Proceedings of the Conference on Empirical Methods in Natural Language Processing.2021."},{"key":"e_1_3_2_45_2","doi-asserted-by":"publisher","DOI":"10.1145\/1858996.1859006"},{"key":"e_1_3_2_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/2597008.2597799"},{"key":"e_1_3_2_47_2","doi-asserted-by":"publisher","DOI":"10.1109\/MSR.2017.63"},{"key":"e_1_3_2_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/1985793.1985808"},{"key":"e_1_3_2_49_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2013.6613830"},{"key":"e_1_3_2_50_2","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2019.2931579"},{"key":"e_1_3_2_51_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2019.03.010"},{"key":"e_1_3_2_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/2597008.2597149"},{"key":"e_1_3_2_53_2","doi-asserted-by":"crossref","unstructured":"M. A. Possatto and D. Lucr\u00e9dio. 2015. Automatically propagating changes from reference implementations to code generation templates. Information and Software Technology 67 (2015) 65\u201378.","DOI":"10.1016\/j.infsof.2015.06.009"},{"key":"e_1_3_2_54_2","doi-asserted-by":"publisher","DOI":"10.1002\/smr.374"},{"key":"e_1_3_2_55_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00086"},{"key":"e_1_3_2_56_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2011.47"},{"key":"e_1_3_2_57_2","volume-title":"Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics","author":"Papineni K.","year":"2002","unstructured":"K. Papineni, S. Roukos, and T. Ward. 2002. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics. 311\u2013318."},{"key":"e_1_3_2_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/2808117.2808125"},{"key":"e_1_3_2_59_2","doi-asserted-by":"publisher","DOI":"10.1109\/TIFS.2016.2639339"},{"key":"e_1_3_2_60_2","doi-asserted-by":"publisher","DOI":"10.1109\/QRS51102.2020.00045"},{"key":"e_1_3_2_61_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P18-1007"},{"key":"e_1_3_2_62_2","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3238190"},{"key":"e_1_3_2_63_2","doi-asserted-by":"publisher","DOI":"10.1145\/3434280"},{"key":"e_1_3_2_64_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2022.111515"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3582570","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3582570","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T18:09:13Z","timestamp":1750183753000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3582570"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,7,22]]},"references-count":63,"journal-issue":{"issue":"5","published-print":{"date-parts":[[2023,9,30]]}},"alternative-id":["10.1145\/3582570"],"URL":"https:\/\/doi.org\/10.1145\/3582570","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,7,22]]},"assertion":[{"value":"2021-06-25","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2023-01-05","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2023-07-22","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}