{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T06:53:36Z","timestamp":1790924016681,"version":"4.1.0"},"reference-count":72,"publisher":"Wiley","issue":"7","license":[{"start":{"date-parts":[[2026,7,26]],"date-time":"2026-07-26T00:00:00Z","timestamp":1785024000000},"content-version":"vor","delay-in-days":25,"URL":"http:\/\/creativecommons.org\/licenses\/by\/4.0\/"},{"start":{"date-parts":[[2026,7,1]],"date-time":"2026-07-01T00:00:00Z","timestamp":1782864000000},"content-version":"tdm","delay-in-days":0,"URL":"http:\/\/doi.wiley.com\/10.1002\/tdm_license_1.1"}],"content-domain":{"domain":["onlinelibrary.wiley.com"],"crossmark-restriction":true},"short-container-title":["J Software Evolu Process"],"published-print":{"date-parts":[[2026,7]]},"abstract":"<jats:title>ABSTRACT<\/jats:title>\n                  <jats:p>Current automated code summarization research focuses primarily on mimicking existing human\u2010written comments, ignoring the fact that many baseline comments are incomplete or misaligned with developer needs. This paper presents a novel approach to intentionally improve code comments along different quality axes by rewriting those comments with customized artificial intelligence (AI)\u2010based tools. We first conduct an empirical study with developers, followed by grounded theory to develop a theoretical construct we define as comment refocusing. This theory identifies seven distinct quality axes grouped into two dimensions: Internalization (anchoring comments in implementation logic) and Externalization (projecting comments into system context). Based on this theoretical foundation, we propose a two\u2010stage alignment procedure using reinforcement learning from AI feedback (RLAIF) followed by human feedback (RLHF) to steer large language models toward these quality axes. We implement this procedure using a large\u2010scale teacher model (GPT\u20104o) and distill the knowledge into smaller, privacy\u2010preserving models (e.g., jam, CodeLlama\u201013B) capable of in\u2010house deployment. Our evaluation demonstrates that our procedure improves code comments along the quality axes, satisfying specific developer\u2010defined quality goals. We release all data and source code in an online repository for reproducibility.<\/jats:p>","DOI":"10.1002\/smr.70157","type":"journal-article","created":{"date-parts":[[2026,7,26]],"date-time":"2026-07-26T14:49:28Z","timestamp":1785077368000},"update-policy":"https:\/\/doi.org\/10.1002\/crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["A Grounded Theory Study to Guide AI\u2010Driven Code Comment Improvement"],"prefix":"10.1002","volume":"38","author":[{"ORCID":"https:\/\/orcid.org\/0009-0004-0428-3164","authenticated-orcid":false,"given":"Maria","family":"Dhakal","sequence":"first","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1803-560X","authenticated-orcid":false,"given":"Chia\u2010Yi","family":"Su","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-0377-2059","authenticated-orcid":false,"given":"Robert","family":"Wallace","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Chris","family":"Fakhimi","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Aakash","family":"Bansal","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"},{"name":"Division of Computer Science and Engineering Louisiana State University  Baton Rouge Louisiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Toby","family":"Li","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yu","family":"Huang","sequence":"additional","affiliation":[{"name":"Department of Computer Science Vanderbilt University  Nashville Tennessee USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Collin","family":"McMillan","sequence":"additional","affiliation":[{"name":"Department of Computer Science and Engineering University of Notre Dame  Notre Dame Indiana USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"311","published-online":{"date-parts":[[2026,7,26]]},"reference":[{"key":"e_1_2_14_2_1","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2019.2931579"},{"key":"e_1_2_14_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3196321.3196334"},{"key":"e_1_2_14_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/2597008.2597149"},{"key":"e_1_2_14_5_1","doi-asserted-by":"crossref","unstructured":"W. U.Ahmad S.Chakraborty B.Ray andK. W.Chang \u201cA Transformer\u2010Based Approach for Source Code Summarization \u201d arXiv preprint arXiv:2005.00653 (2020).","DOI":"10.18653\/v1\/2020.acl-main.449"},{"key":"e_1_2_14_6_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2024.3364675"},{"key":"e_1_2_14_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2022.111515"},{"key":"e_1_2_14_8_1","volume-title":"Grounded Theory in Practice","author":"Strauss A.","year":"1997"},{"key":"e_1_2_14_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3613090"},{"key":"e_1_2_14_10_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10515-024-00421-4"},{"key":"e_1_2_14_11_1","unstructured":"B.Roziere J.Gehring F.Gloeckle et\u00a0al. \u201cCode Llama: Open Foundation Models for Code \u201d arXiv preprint arXiv:2308.12950 (2023)."},{"key":"e_1_2_14_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2019.00019"},{"key":"e_1_2_14_13_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00087"},{"key":"e_1_2_14_14_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2012.01.059"},{"key":"e_1_2_14_15_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2021.3106280"},{"issue":"2","key":"e_1_2_14_16_1","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3434280","article-title":"Why My Code Summarization Model Does Not Work: Code Comment Improvement With Category Prediction","volume":"30","author":"Chen Q.","year":"2021","journal-title":"ACM Transactions on Software Engineering and Methodology (TOSEM)"},{"key":"e_1_2_14_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3468264.3468588"},{"key":"e_1_2_14_18_1","unstructured":"H.Lee S.Phatale H.Mansoor et\u00a0al. \u201cRLAIF vs. RLHF: Scaling Reinforcement Learning From Human Feedback With AI Feedback \u201d arXiv preprint arXiv:2309.00267 (2023)."},{"key":"e_1_2_14_19_1","unstructured":"C. Y.Su A.Bansal Y.Huang T. J. J.Li andC.McMillan \u201cContext\u2010Aware Code Summary Generation \u201d arXiv preprint arXiv:2408.09006 (2024)."},{"key":"e_1_2_14_20_1","doi-asserted-by":"publisher","DOI":"10.1080\/07421222.2024.2415772"},{"key":"e_1_2_14_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3608134"},{"key":"e_1_2_14_22_1","doi-asserted-by":"crossref","unstructured":"T.Ahmed P.Devanbu C.Treude andM.Pradel \u201cCan LLMs Replace Manual Annotation of Software Engineering Artifacts?\u201d (2024).","DOI":"10.1109\/MSR66628.2025.00086"},{"key":"e_1_2_14_23_1","doi-asserted-by":"publisher","DOI":"10.1002\/smr.2706"},{"key":"e_1_2_14_24_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.1989.65192"},{"key":"e_1_2_14_25_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-13881-2_7"},{"key":"e_1_2_14_26_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2013.6613836"},{"key":"e_1_2_14_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/s11219-009-9075-x"},{"key":"e_1_2_14_28_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2017.8115624"},{"key":"e_1_2_14_29_1","doi-asserted-by":"publisher","DOI":"10.1142\/S0218194016500339"},{"key":"e_1_2_14_30_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.11"},{"key":"e_1_2_14_31_1","doi-asserted-by":"publisher","DOI":"10.1109\/MIUCC66482.2025.11196773"},{"key":"e_1_2_14_32_1","doi-asserted-by":"publisher","DOI":"10.1002\/smr.2718"},{"key":"e_1_2_14_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/1810295.1810335"},{"key":"e_1_2_14_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/1985793.1985808"},{"key":"e_1_2_14_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568247"},{"key":"e_1_2_14_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3387904.3389268"},{"key":"e_1_2_14_37_1","unstructured":"A.Bansal S.Jiang S.Haque andC.McMillan \u201cStatement\u2010Based Memory for Neural Source Code Summarization \u201d arXiv preprint arXiv:2307.11709 (2023)."},{"key":"e_1_2_14_38_1","unstructured":"J.Achiam S.Adler S.Agarwal et\u00a0al. \u201cGpt\u20104 Technical Report \u201d arXiv preprint arXiv:2303.08774 (2023)."},{"key":"e_1_2_14_39_1","doi-asserted-by":"crossref","unstructured":"Z.Feng D.Guo D.Tang et\u00a0al. \u201cCodeBERT: A Pre\u2010Trained Model for Programming and Natural Languages \u201d arXiv preprint arXiv:2002.08155 (2020).","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"e_1_2_14_40_1","unstructured":"W.Sun Y.Miao Y.Li et\u00a0al. \u201cSource Code Summarization in the Era of Large Language Models \u201d arXiv preprint arXiv:2407.07959 (2024)."},{"key":"e_1_2_14_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/1858996.1859006"},{"key":"e_1_2_14_42_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2013.6693113"},{"key":"e_1_2_14_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3238190"},{"key":"e_1_2_14_44_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2020.2979701"},{"key":"e_1_2_14_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416578"},{"key":"e_1_2_14_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3551349.3556917"},{"key":"e_1_2_14_47_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00073"},{"key":"e_1_2_14_48_1","unstructured":"M. A.Haider A. B.Mostofa S. S. B.Mosaddek A.Iqbal andT.Ahmed \u201cPrompting and Fine\u2010Tuning Large Language Models for Automated Code Review Comment Generation \u201d arXiv preprint arXiv:2411.10129 (2024)."},{"key":"e_1_2_14_49_1","volume-title":"The Discovery of Grounded Theory: Strategies for Qualitative Research","author":"Glaser B.","year":"1967"},{"key":"e_1_2_14_50_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2007.02.011"},{"key":"e_1_2_14_51_1","doi-asserted-by":"publisher","DOI":"10.1023\/B:EMSE.0000027786.04555.97"},{"key":"e_1_2_14_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884833"},{"key":"e_1_2_14_53_1","doi-asserted-by":"publisher","DOI":"10.2196\/70122"},{"key":"e_1_2_14_54_1","volume-title":"Basics of Grounded Theory Analysis","author":"Glaser B.","year":"1992"},{"key":"e_1_2_14_55_1","volume-title":"Basics of Qualitative Research: Techniques and Procedures for Developing Grounded Theory","author":"Corbin J.","year":"1998"},{"key":"e_1_2_14_56_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC52881.2021.00032"},{"key":"e_1_2_14_57_1","doi-asserted-by":"publisher","DOI":"10.1002\/smr.1768"},{"key":"e_1_2_14_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549145"},{"key":"e_1_2_14_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3359591.3359735"},{"key":"e_1_2_14_60_1","unstructured":"Prolific. \u201cProlific: An Online Participant Recruitment Platform \u201d (2025) https:\/\/www.prolific.com\/."},{"key":"e_1_2_14_61_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00057"},{"key":"e_1_2_14_62_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00123"},{"key":"e_1_2_14_63_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2022.111520"},{"key":"e_1_2_14_64_1","doi-asserted-by":"publisher","DOI":"10.1162\/089120105774321109"},{"key":"e_1_2_14_65_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236024.3236031"},{"key":"e_1_2_14_66_1","doi-asserted-by":"publisher","DOI":"10.3115\/981574.981594"},{"issue":"2","key":"e_1_2_14_67_1","article-title":"Assessing Agreement on Classification Tasks: The Kappa Statistic","volume":"22","author":"Carletta J.","year":"1996","journal-title":"Computational Linguistics"},{"key":"e_1_2_14_68_1","first-page":"46534","article-title":"Self\u2010Refine: Iterative Refinement With Self\u2010Feedback","volume":"36","author":"Madaan A.","year":"2024","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_2_14_69_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.socec.2010.10.008"},{"issue":"2","key":"e_1_2_14_70_1","first-page":"3","article-title":"LoRA: Low\u2010Rank Adaptation of Large Language Models","volume":"1","author":"Hu E. J.","year":"2022","journal-title":"ICLR"},{"key":"e_1_2_14_71_1","doi-asserted-by":"publisher","DOI":"10.1145\/3524610.3527909"},{"key":"e_1_2_14_72_1","unstructured":"T.Zhang V.Kishore F.Wu K. Q.Weinberger andY.Artzi \u201cBERTScore: Evaluating Text Generation With BERT \u201d arXiv preprint arXiv:1904.09675 (2019)."},{"key":"e_1_2_14_73_1","first-page":"1","article-title":"Wilcoxon Signed\u2010Rank Test","author":"Woolson R. F.","year":"2007","journal-title":"Wiley Encyclopedia of Clinical Trials"}],"container-title":["Journal of Software: Evolution and Process"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/pdf\/10.1002\/smr.70157","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/full-xml\/10.1002\/smr.70157","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/pdf\/10.1002\/smr.70157","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T06:13:40Z","timestamp":1790921620000},"score":1,"resource":{"primary":{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/10.1002\/smr.70157"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,7]]},"references-count":72,"journal-issue":{"issue":"7","published-print":{"date-parts":[[2026,7]]}},"alternative-id":["10.1002\/smr.70157"],"URL":"https:\/\/doi.org\/10.1002\/smr.70157","archive":["Portico"],"relation":{},"ISSN":["2047-7473","2047-7481"],"issn-type":[{"value":"2047-7473","type":"print"},{"value":"2047-7481","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,7]]},"assertion":[{"value":"2025-12-19","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-07-09","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-07-26","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}],"article-number":"e70157"}}