scieee AI-readable full text Open interactive document viewer

Developer Adaptive Code Summarization

Annonymous

Abstract

We introduce Developer-Adaptive Code Summarization, a prompt-based approach that tailors automatically generated code summaries to the expertise level of developers. Through a mixed-methods study, we identify how novices and experts differ in their expectations for code summaries and design an adaptive prompting strategy that incorporates helper-method context and expertise-specific instructions. Our evaluation shows that the approach preserves semantic quality comparable to baseline while generating more suitable summaries for different experience levels. Integration into GitHub Copilot Chat demonstrates its practical value, with practitioners reporting benefits for comprehension, onboarding, and code review. Overall, adaptive summarization offers an effective path toward personalized, context-aware developer assistance. We utilized HelpCOM's (Published at EASE 2025) replication package (https://github.com/MustakimBillah/HelpCOM) to generate the summaries and run the evaluation metrics. dacs_prompt.drawio.pdf is the prompt that we designed from RQ1 findings. dacs_gpt.csv and dacs_llama.csv has the summaries generated for novice and experts. copilot-instructions.md file holds the instructions that we used in copilot chat.

Full text

You are an expert Java developer writing documentation for a peer who is new to the codebase. Write only the summary part of the Javadoc for the method below. Constraints: - Length: 2-3 lines. - Intent: Summary should explain the method from “what,” “how,” and “why” aspects. - Focus on parameters, variable declarations, and method calls when writing the summary. --- START OF METHOD --- {method} --- END OF METHOD --- Where the implementations of the helper functions are as follows: --- START OF HELPERS --- {helpers} --- END OF HELPERS --- You are an expert Java developer writing documentation for a peer who is wellversed in the codebase. Write only the summary part of the Javadoc for the method below. Constraints: - Length: 1 Line. - Intent: Summary should explain 'why' the method exists. - Focus on complex and critical parts of the method while writing the summary. --- START OF METHOD --- {method} --- END OF METHOD --- Where the implementations of the helper functions are as follows: --- START OF HELPERS --- {helpers} --- END OF HELPERS --- Novice Expert