Logo image
Can LLMs Capture Developers' Practical Needs for Code Summarization? An Empirical Study of Code Summary Optimization Behaviors on GitHub
Conference proceeding   Open access

Can LLMs Capture Developers' Practical Needs for Code Summarization? An Empirical Study of Code Summary Optimization Behaviors on GitHub

Xianwei Wu, Haifeng Shen and Guoping Rong
Proceedings of the 17th International Conference on Internetware, pp.499-511
ACM Other Conferences
Internetware '26: The 17th International Conference on Internetware, 17th (Gold Coast, Queensland, 18/07/2026–20/07/2026)
21/11/2026
pdf
Can LLMs Capture Developers' Practical Needs for Code Summarization?2.20 MBDownloadView
Published (Version of record) Open CC BY V4.0
url
Can LLMs Capture Developers' Practical Needs for Code Summarization?View
Published (Version of record) Open CC BY V4.0

Related links

Metrics

1 Record Views

Abstract

Code Summarization Code Summary Optimization Large Language Models Empirical Study
Large Language Models (LLMs) have recently demonstrated strong performance in automatic code summarization. However, it remains unclear whether this capability truly aligns with developers’ practical needs during real-world software maintenance. Critically, the community lacks an effective benchmark and evaluation methodology to systematically assess this alignment. To address this gap, we propose CSO-Bench, a novel benchmark comprising 4,845 Python instances (3,845 method-level and 1,000 class-level), specifically designed to reflect these practical needs. It captures real-world Code Summary Optimization practices, where developers actively refine summaries without modifying the underlying code logic. We characterize these refinement behaviors across four rigorous quality dimensions: factuality, completeness, clarity, and compliance. To enable systematic assessment, we introduce two complementary tasks—Summary Judgment and Summary Editing—to evaluate LLMs’ ability to recognize and improve summary quality. Leveraging a comprehensive framework that integrates automated metrics with an LLM-as-a-Judge protocol, we systematically evaluate seven mainstream LLMs (7B~685B parameters) under four prompting strategies (Vanilla, CoT, Few-Shot, and RAG). Our results reveal several findings: (i) LLMs’ summarization performance deviates from strict scaling laws; in certain dimensions, larger models or more elaborate prompts underperform smaller, simpler baselines. (ii) Although LLMs are relatively effective at defect identification in Summary Judgment, they struggle with Summary Editing and consistently perform worse at the class level than at the method level. (iii) Compared to the Vanilla baseline, CoT improves judgment performance by 6.18% at the method level and 4.54% at the class level, whereas RAG improves editing performance by over 50%, particularly in completeness and compliance. (iv) A qualitative analysis of failure modes uncovers ten recurring patterns, offering concrete directions for future research on reliable LLM-based code summarization.

Details

Logo image