paper-with-me

홈 › Papers

Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization

2025-03-13 · Weisong Sun, Yiran Zhang, Jie Zhu, Zhihui Wang, Chunrong Fang, Yonglong Zhang, Yebo Feng, JiangPing Huang, Xingya Wang, Zhi Jin, Yang Liu

Commenting code is a crucial activity in software development, as it aids in facilitating future maintenance and updates. To enhance the efficiency of writing comments and reduce developers' workload, researchers has proposed various automated code summarization (ACS) techniques to automatically generate comments/summaries for given code units. However, these ACS techniques primarily focus on generating summaries for code units at the method level. There is a significant lack of research on summarizing higher-level code units, such as file-level and module-level code units, despite the fact that summaries of these higher-level code units are highly useful for quickly gaining a macro-level understanding of software components and architecture. To fill this gap, in this paper, we conduct a systematic study on how to use LLMs for commenting higher-level code units, including file level and module level. These higher-level units are significantly larger than method-level ones, which poses challenges in handling long code inputs within LLM constraints and maintaining efficiency. To address these issues, we explore various summarization strategies for ACS of higher-level code units, which can be divided into three types: full code summarization, reduced code summarization, and hierarchical code summarization. The experimental results suggest that for summarizing file-level code units, using the full code is the most effective approach, with reduced code serving as a cost-efficient alternative. However, for summarizing module-level code units, hierarchical code summarization becomes the most promising strategy. In addition, inspired by the research on method-level ACS, we also investigate using the LLM as an evaluator to evaluate the quality of summaries of higher-level code units. The experimental results demonstrate that the LLM's evaluation results strongly correlate with human evaluations.

📄 PDF Abstract BibTeX arXiv:2503.10737

Code (0)

등록된 구현이 없습니다.

Tasks

Code Summarization

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

Unsupervised Machine Commenting with Neural Variational Topic Model

2018-09-13 · Shuming Ma, Lei Cui, Furu Wei, Xu sun

Article comments can provide supplementary opinions and facts for readers, thereby increase the attraction and engagement of articles. Therefore, automatically commenting is helpful in improving the activeness of the com…

ArticlesmodelRetrieval

Public Sphere 2.0: Targeted Commenting in Online News Media

2019-02-21 · Ankan Mullick, Sayan Ghosh, Ritam Dutt, Avijit Ghosh 외

With the increase in online news consumption, to maximize advertisement revenue, news media websites try to attract and retain their readers on their sites. One of the most effective tools for reader engagement is commen…

Articles

Sentiment-oriented Transformer-based Variational Autoencoder Network for Live Video Commenting

2024-04-19 · Fengyi Fu, Shancheng Fang, Weidong Chen, Zhendong Mao

Automatic live video commenting is with increasing attention due to its significance in narration generation, topic explanation, etc. However, the diverse sentiment consideration of the generated comments is missing from…

Diversity

Multimodal Matching Transformer for Live Commenting

2020-02-07 · Chaoqun Duan, Lei Cui, Shuming Ma, Furu Wei 외

Automatic live commenting aims to provide real-time comments on videos for viewers. It encourages users engagement on online video sites, and is also a good benchmark for video-to-text generation. Recent work on this tas…

DecoderText Generation

Netizen-Style Commenting on Fashion Photos: Dataset and Diversity Measures

2018-01-31 · Wen Hua Lin, Kuan-Ting Chen, Hung Yueh Chiang, Winston Hsu

Recently, deep neural network models have achieved promising results in image captioning task. Yet, "vanilla" sentences, only describing shallow appearances (e.g., types, colors), generated by current works are not satis…

Cultural Vocal Bursts Intensity PredictionDiversityImage CaptioningTopic Models