AUTOGENICS: Automated Generation of Context-Aware Inline Comments for Code Snippets on Programming Q&A Sites Using LLM
Suborno Deb Bappon, Saikat Mondal, Banani Roy

TL;DR
AUTOGENICS is a tool that leverages large language models to automatically generate context-aware inline comments for code snippets on Stack Overflow, improving readability and understanding for developers.
Contribution
The paper introduces AUTOGENICS, a novel system that enhances LLM-generated inline comments by incorporating question context and noise reduction, addressing limitations of previous comment generation methods.
Findings
LLMs can generate effective inline comments for SO code snippets.
AUTOGENICS outperforms standard LLMs in comment quality metrics.
User surveys confirm perceived usefulness of AUTOGENICS comments.
Abstract
Inline comments in the source code facilitate easy comprehension, reusability, and enhanced readability. However, code snippets in answers on Q&A sites like Stack Overflow (SO) often lack comments because answerers volunteer their time and often skip comments or explanations due to time constraints. Existing studies show that these online code examples are difficult to read and understand, making it difficult for developers (especially novices) to use them correctly and leading to misuse. Given these challenges, we introduced AUTOGENICS, a tool designed to integrate with SO to generate effective inline comments for code snippets in SO answers exploiting large language models (LLMs). Our contributions are threefold. First, we randomly select 400 answer code snippets from SO and generate inline comments for them using LLMs. We then manually evaluate these comments' effectiveness using…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Software Engineering Techniques and Practices
