Page 23 - 《软件学报》2021年第6期
P. 23

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
         Journal of Software,2021,32(6):1597−1611 [doi: 10.13328/j.cnki.jos.006239]   http://www.jos.org.cn
         ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563


                                                    ∗
         大粒度 Pull Request 描述自动生成

               1
                                      1
                       1
                              1
         邝   砾 ,   施如意 ,   赵雷浩 ,   张   欢 ,   高洪皓  2
         1
          (中南大学  计算机学院,湖南  长沙  410083)
         2 (上海大学  计算机工程与科学学院,上海  200444)
         通讯作者:  高洪皓, E-mail: gaohonghao@shu.edu.cn

         摘   要:  在 GitHub 平台中,许多项目贡献者在提交 Pull Request(PR)时往往会忽略提交 PR 描述,这使得提交的 PR
         容易被评审者忽略或者拒绝.因此,自动生成 PR 描述以帮助项目贡献者提高 PR 通过率是很有必要的.然而,现有 PR
         描述生成方法的表现会受到 PR 粒度影响,无法有效为大粒度的 PR 生成描述.因此,该工作专注于大粒度 PR 描述的
         自动生成.首先对 PR 中的文本信息进行预处理,将文本中的单词作为辅助节点构建词-句异质图,以建立 PR 语句间
         的联系;随后对异质图进行特征提取,并将提取后的特征输入至图神经网络进行图表示学习,通过节点间的消息传
         递,使句子节点学习到更丰富的内容信息;最后,选择带有关键信息的句子组成 PR 描述.此外,针对 PR 数据集缺少人
         工标注的真实标签而无法进行监督学习的问题,使用强化学习指导 PR 描述的生成,以最小化获得奖励的负期望为
         目标训练模型,该过程与标签无关,并且直接提升了生成结果的表现.在真实的数据集上进行了实验,实验结果表明,
         提出的大粒度 PR 描述生成方法在 F1 值和可读性上优于现有方法.
         关键词: Pull Request 描述;异质图神经网络;强化学习;非结构性文档;摘要生成
         中图法分类号: TP311


         中文引用格式:  邝砾,施如意,赵雷浩,张欢,高洪皓.大粒度 Pull Request 描述自动生成.软件学报,2021,32(6):1597−1611.
         http://www. jos.org.cn/1000-9825/6239.htm
         英文引用格式:  Kuang L, Shi RY, Zhao LH, Zhang H, Gao  HH. Automatic generation of  large-granularity pull request
         description. Ruan Jian Xue Bao/Journal of Software, 2021,32(6):1597−1611 (in Chinese). http://www.jos.org.cn/1000-9825/6239.
         htm
         Automatic Generation of Large-Granularity Pull Request Description

                  1
                                            1
                                                          1
                             1
         KUANG Li ,  SHI Ru-Yi ,   ZHAO Lei-Hao ,  ZHANG Huan ,  GAO Hong-Hao 2
         1 (School of Computer Science and Engineering, Central South University, Changsha 410083, China)
         2 (School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China)
         Abstract:    In  GitHub platform,  many project  contributors often ignore the descriptions of pull requests (PRs) when submitting PRs,
         making their PRs easily neglected or rejected by reviewers. Therefore, it is necessary to generate PR descriptions automatically to help
         increase PR pass rate. The performances of existing PR description generation methods are usually affected by PR granularity, so it is
         difficult to generate descriptions for large-granularity PRs effectively. For such reasons, this work focuses on generating descriptions for
         large-granularity PRs. The text information is first preprocessed in PR and word-sentence heterogeneous graphs are constructed where the
         words are used as secondary nodes, so as to establish the connections between PR sentences. Subsequently, feature extraction is performed
         on the heterogeneous graphs, and then the features are input into graph neural network for further graph representation learning, from
         which the sentence nodes can learn more abundant content information through message delivery between nodes. Finally, the sentences

            ∗  基金项目:  国家重点研发计划(2018YFB1003800);  国家自然科学基金(61772560)
              Foundation item:  National  Key  R&D Program  of  China (2018YFB1003800);  National Natural Science Foundation of  China
         (61772560)
              本文由“形式化方法与应用”专题特约编辑姜宇副教授推荐.
              收稿时间: 2020-08-09;  修改时间: 2020-10-26;  采用时间: 2020-12-19; jos 在线出版时间: 2021-02-07
   18   19   20   21   22   23   24   25   26   27   28