Challenge: Existing methods for code comments generate comments manually, but they suffer from poor scalability and high maintenance cost due to the expensive overhead of writing comment templates.
Approach: They propose a method to automatically generate code comments at a function level by targeting object-oriented programming languages.
Outcome: The proposed approach outperforms the state-of-the-art methods and is comparable with existing methods.

Similar Papers

An Intra-Class Relation Guided Approach for Code Comment Generation (2023.findings-eacl)

Copied to clipboard

Challenge: Recent work in code comment generation assumes that all information required to generate comments is encoded in the target function itself, yet in most realistic situations, it is hard to understand a function in isolation from the surrounding context.
Approach: They propose a graph-based learning framework to capture various relations among functions in a class file.
Outcome: The proposed method outperforms baseline models on automatic and human evaluation metrics on a Java dataset collected from real-world projects.
Comments as Natural Logic Pivots: Improve Code Generation via Comment Perspective (2024.findings-acl)

Copied to clipboard

Challenge: Existing studies decompose complex tasks into intermediate steps by prompting strategies, such as Chain-of-Thought and its variants.
Approach: They propose to use code comments as natural logic pivot between natural language and code language to boost the code generation ability of code LLMs.
Outcome: The proposed method significantly improves the code pass rate on humanEval and MBPP, while the robustness of the logical comment decoding strategy is higher than the Chain-of-thoughts prompting.
Leveraging Context-Aware Prompting for Commit Message Generation (2024.emnlp-main)

Copied to clipboard

Challenge: Existing methods for writing comprehensive commit messages focus on the changed lines or nearest context lines, but excessive contexts can lead to noise.
Approach: They propose a code model COMMIT that can generate automatic commit messages by combining a dataset with a context-aware prompt.
Outcome: The proposed model surpasses all existing models including pre-trained language models for code and large language models such as Code-LlaMa.
Learning to Update Natural Language Comments Based on Code Changes (2020.acl-main)

Copied to clipboard

Challenge: a novel approach to update comments based on code changes is proposed . a dataset of open-source software projects is used to train and evaluate the model .
Approach: They propose an approach that learns to correlate changes across two distinct language representations to generate a sequence of edits that are applied to the existing comment to reflect the source code modifications.
Outcome: The proposed model outperforms baselines and automatic metrics with respect to making edits.
Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedback (2024.findings-acl)

Copied to clipboard

Challenge: Large Language Models (LLMs) generate code for given contexts, such as incomplete code, class, data structure, or project-specific information.
Approach: They propose a compiler feedback-based code generation approach that leverages static analysis to identify mismatches between the generated code and the project's context.
Outcome: The proposed model outperforms retrieval-based code generation baselines and significantly outperfies the existing large language models.
TAG : Type Auxiliary Guiding for Code Comment Generation (2020.acl-main)

Copied to clipboard

Challenge: Existing code comment generation approaches ignore type information of interpretation of the code, e.g., operator, string, etc. Existing approaches ignore the type information due to the hierarchical dependence among the type.
Approach: They propose an encoder-decoder framework which considers the source code as an N-ary tree with type information associated with each node.
Outcome: The proposed framework is based on a Type Auxiliary Guiding encoder-decoder framework and a type-restricted Decoder to resolve training difficulties.
CodeRetriever: A Large Scale Contrastive Pre-Training Method for Code Search (2022.emnlp-main)

Copied to clipboard

Challenge: Existing code pre-training approaches often adopt (masked) language modeling as the training objective which targets on learning to predict (macked) tokens in a given code context.
Approach: They propose a code-text contrastive learning model which learns function-level code semantic representations through large-scale code corpus.
Outcome: The proposed model achieves new state-of-the-art with significant improvement over existing pre-trained models on eleven domain/language-specific code search tasks with six programming languages in different code granularity.
Turning the Tide: Repository-based Code Reflection (2025.findings-emnlp)

Copied to clipboard

Challenge: Code large language models (LLMs) enhance programming by understanding and generating code across languages.
Approach: a new benchmark evaluates code understanding and generation in repositories using code large language models.
Outcome: The proposed model improves code understanding and generation in repositories by evaluating 1,888 test cases across 6 programming languages.
Unified Pre-training for Program Understanding and Generation (2021.naacl-main)

Copied to clipboard

Challenge: PLUG is a programming language that is used for programming and language understanding and generation tasks.
Approach: They propose a sequence-to-sequence model that performs a broad spectrum of program and language understanding and generation tasks.
Outcome: The proposed model outperforms or rivals state-of-the-art models on code summarization, code generation, and code translation tasks in seven programming languages.
ReflectionCoder: Learning from Reflection Sequence for Enhanced One-off Code Generation (2025.acl-long)

Copied to clipboard

Challenge: Existing methods to enhance code generation performance include integrating compiler feedback.
Approach: They propose a method that integrates compiler feedback to improve one-off code generation performance.
Outcome: The proposed method improves one-off code generation performance on three benchmarks and can be applied to other domains that focus on final results and require long reasoning paths.

What is GenGO?

GenGO is an NLP powered publication search system. It currenctly indexes 30k+ papers from ACL Anthology, and implements multi-aspect summarization, semantic search, and more!

Information

About
Limitations