AI-Mediated Code Comment Improvement
By: Maria Dhakal , Chia-Yi Su , Robert Wallace and more
Potential Business Impact:
Makes computer code easier to understand.
This paper describes an approach to improve code comments along different quality axes by rewriting those comments with customized Artificial Intelligence (AI)-based tools. We conduct an empirical study followed by grounded theory qualitative analysis to determine the quality axes to improve. Then we propose a procedure using a Large Language Model (LLM) to rewrite existing code comments along the quality axes. We implement our procedure using GPT-4o, then distil the results into a smaller model capable of being run in-house, so users can maintain data custody. We evaluate both our approach using GPT-4o and the distilled model versions. We show in an evaluation how our procedure improves code comments along the quality axes. We release all data and source code in an online repository for reproducibility.
Similar Papers
Enhancing Code Generation via Bidirectional Comment-Level Mutual Grounding
Software Engineering
Helps computers write better code with comments.
Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks
Software Engineering
Makes computer code easier to understand and write.
Towards Automated Detection of Inline Code Comment Smells
Software Engineering
Finds bad code notes to fix programs faster.