检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:胡天翔 谢睿 叶蔚[1] 张世琨[1] HU Tian-Xiang;XIE Rui;YE Wei;ZHANG Shi-Kun(National Enginering Rearch Center for Software Enginering,Peking University,Beijing 100871,China)
机构地区:[1]北京大学软件工程国家工程研究中心,北京100871
出 处:《软件学报》2023年第4期1695-1710,共16页Journal of Software
基 金:中国博士后科学基金(2021M700216)。
摘 要:通过生成源代码片段的简短自然语言描述,可帮助开发人员理解代码并减少文档工作.近期,关于代码摘要的研究工作主要采用深度学习模型,这些模型中的大多数都在由独立代码摘要对组成的大型数据集上进行训练.尽管取得了良好的效果,这些工作普遍忽略了代码片段和摘要的项目级上下文信息,而开发人员在编写文档时往往高度依赖这些信息.针对该问题,研究了一种与开发者行为和代码摘要工具实现更加一致的代码摘要场景——项目级代码摘要,其中,创建了用于项目特定代码摘要的数据集,该数据集包含800k方法摘要对及其生命周期信息,用于构建特定时刻准确的项目项目上下文;提出了一种新颖的深度学习方法,利用高度相关的代码片段及其相应的摘要来表征上下文语义,并通过迁移学习整合从大规模跨项目数据集中学到的常识.实验结果表明:基于项目级上下文的代码摘要模型不仅能够比通用代码摘要模型获得显著的性能提升,同时,针对特定项目能够生成更一致的摘要.Code summarization generates brief natural language descriptions of source code pieces,which can assist developers to understand code and reduce documentation workload.Recent research efforts on code summarization mainly adopt deep learning models.Most of these models are trained on large datasets,consisting of independent code-summary pairs.Despite the technical advances,most of these works,referred as general code summarization models,ignore the project-level contextual information of code pieces and summaries,which developers would heavily rely on when writing documentation.This study investigates project-specific code summarization,a scenario that is much more consistent with human behavior and tool implementation of code summarization.Specifically,a novel deep learning approach is proposed that leverages highly relevant code pieces and their corresponding summaries to characterize contextual semantics,and integrates common knowledge learned from large-scale cross-project dataset via transfer learning.The dataset is created and released for project-specific code summarization,consisting of 800k method-summary pairs along with their lifecycle information for re-producing accurate code context.Experimental results on this dataset demonstrate that the proposed technique can not only gain huge improvement over general code summarization model,but also generates more consistent summaries within a project.
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.30