Automatic Generation of Code Comments Based on Comment Reuse and Program Parsing

2019 2nd International Conference on Safety Produce Informatization (IICSPI)(2019)

引用 1|浏览0
暂无评分
摘要
In order to solve the problem of rare comments and low quality, a method of automatically generating code comments by comment reuse and program parsing is proposed. First, the clone code is detected by Nicad, and the codes and their comments are extracted. Then, through a series of heuristic rules such as dedrying and generalization, the code and the relatively simple code comments are streamlined and optimized. For complex code comments with obvious semantic characteristics, the program parsing method is used to optimize, finally, the comments are mapped to the code to automatically generate comments for the target code. In order to verify the validity of the experiment, the code comments in the 14 target software were manually verified, the comment results were evaluated, and then the five softwares were compared with the previous methods of ours team. The experimental results show that 33.69% of the code comments are good, the generated comments are 14.13% higher than the previous experimental methods, and the quality is improved by about 5%.
更多
查看译文
关键词
code comment,clone detection,comment optimization,program parsing,automatic generation of code comment
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要