Generating Comments From Source Code with CCGs

10/15/2018
by   Sergey Matskevich, et al.
0

Good comments help developers understand software faster and provide better maintenance. However, comments are often missing, generally inaccurate, or out of date. Many of these problems can be avoided by automatic comment generation. This paper presents a method to generate informative comments directly from the source code using general-purpose techniques from natural language processing. We generate comments using an existing natural language model that couples words with their individual logical meaning and grammar rules, allowing comment generation to proceed by search from declarative descriptions of program text. We evaluate our algorithm on several classic algorithms implemented in Python.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/25/2019

A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniques

As an integral part of source code files, code comments help improve pro...
research
05/12/2021

Assessing Semantic Frames to Support Program Comprehension Activities

Software developers often rely on natural language text that appears in ...
research
06/12/2018

Deep Learning to Detect Redundant Method Comments

Comments in software are critical for maintenance and reuse. But apart f...
research
06/10/2023

Bootstrapping Code-Text Pretrained Language Model to Detect Inconsistency Between Code and Comment

Comments on source code serve as critical documentation for enabling dev...
research
03/03/2023

APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentation

Code comments are significantly helpful in comprehending software progra...
research
02/08/2022

Towards Property-Based Tests in Natural Language

We consider a new approach to generate tests from natural language. Rath...
research
03/19/2021

API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentations

Code comments can help in program comprehension and are considered as im...

Please sign up or login with your details

Forgot password? Click here to reset