Summarizing Source Code with Transferred API Knowledge
By Xing Hu, Ge Li, Xin Xia, David Lo, Shuai Lu, Zhi Jin. 2018
339 citations recorded by the source corpus.
Code summarization, aiming to generate succinct natural language description of source code, is extremely useful for code search and code comprehension. It has played an important role in software maintenance and evolution. Previous approaches generate summaries by retrieving summaries from similar code snippets. However, these approaches heavily rely on whether similar code snippets can be retrieved, how similar the snippets are, and fail to capture the API knowledge in the source code, which carries vital information about the functionality of the source code. In this paper, we propose a novel approach, named TL-CodeSum, which successfully uses API knowledge learned in a different but related task to code summarization. Experiments on large-scale real-world industry Java projects indicate that our approach is effective and outperforms the state-of-the-art in code summarization.
Subfields: Artificial Intelligence, Information Systems, Code Generation & Program Synthesis
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Prem Devanbu
- Toufique Ahmed
- Graham Neubig
- Wasi Uddin Ahmad
- Baishakhi Ray
- Saikat Chakraborty
- Kai-Wei Chang
- Huan Sun
In Information Systems
- Baishakhi Ray
- Prem Devanbu
- Saikat Chakraborty
- Toufique Ahmed
- Wasi Uddin Ahmad
- Ge Li
- Kai-Wei Chang
- Alexander LeClair
In Code Generation & Program Synthesis
- Prem Devanbu
- Toufique Ahmed
- Wasi Uddin Ahmad
- Baishakhi Ray
- Ge Li
- Saikat Chakraborty
- Graham Neubig
- Collin McMillan
Citations in the corpus
- Retrieval-based Neural Source Code Summarization (2020, methodology): “For fair comparison, we split PCSD into the training set, validation set and testing set with fractions of 60%, 20% and 20%, respectively, and split JCSD in proportion of 8 : 1 : 1 to keep the same split settings as baselines [23, 55].”
- Neural Detection of Semantic Code Clones Via Tree-Based Convolution (2019, methodology): “We evaluate our approach in this experimental setting since it is commonly used in other related work [20, 21, 22].”
- TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Search (2020, methodology): “[20] proposed TL-CodeSum to generate summaries by capturing semantics from the source code with the assistance of API knowledge.”
- Code Generation as a Dual Task of Code Summarization (2019, methodology): “We conduct our experiments on Java and Python projects collected from GitHub used by previous work [Hu et al., 2018a,b, Wan et al., 2018].”
- A Neural Model for Generating Natural Language Summaries of Program Subroutines (2019, neutral): “Other related AI/data approaches in generating summaries of subroutines includes 1) work by Hu et al. [28] focusing on creating summaries from sequences of API calls, and 2) CODE-NN by Iyer et al. [19] which, similar to [22], creates a custom word representation of code which it then feeds to an…”
- A Transformer-based Approach for Source Code Summarization (2020, methodology): “Among other noteworthy works, API usage information (Hu et al., 2018b), reinforcement learning (Wan et al., 2018), dual learning (Wei et al., 2019), retrieval-based techniques (Zhang et al., 2020) are leveraged to further enhance the code summarization models.”
- CoCoGUM: Contextual Code Summarization with Multi-Relational GNN on UMLs (2020, methodology): “The NMT-based models are also widely used to generate summaries for code snippets [7–10, 14, 15, 59].”
- Multilingual training for Software Engineering (2021, methodology): “Deep learning models have been widely applied to code summarization, with papers reporting substantial gains in performance over recent years [1, 2, 7, 18, 19, 24–28, 30, 38–42, 50, 54, 55, 66, 67, 69–74].”
- Improved Code Summarization via a Graph Neural Network (2020, methodology): “3 Metrics For our quantitative metrics we use both BLEU [43] and ROUGE [32] to evaluate our model performance. BLEU scores are a standard evaluation metric in the source code summarization literature [24, 25, 29]. BLEU is a text similarity metric that compares overlapping n-grams between two given t”
- CoDesc: A Large Code–Description Parallel Dataset (2021, methodology): “Furthermore, other datasets used are DeepCom (Hu et al., 2018a), CONCODE 3 (Iyer et al., 2018), FunCom 4 (LeClair and McMillan, 2019) - datasets created for code summarization.”
- CoaCor: Code Annotation for Code Retrieval with Reinforcement Learning (2019, methodology): “Note that one can use the same scoring model for Fr and Fa as in [9, 21], but for most of the prior work [13, 19, 20, 58], which consider either code retrieval or code annotation, researchers usually develop their own models and objective functions for Fr or Fa .”
- MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languages (2022, background): “Code intelligence is a nascent but rapidly developing application of language processing, brewing an increasing number of code-relevant applications such as code summarization (Allamanis et al., 2016; Hu et al., 2018; Ahmad et al., 2020) and natural language (NL) to code generation (Ling et al.”
- BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions (2024, background): “2 A complex programming task often requires the invocation of diverse function call sequences as tools [51, 25, 50].”