首页> 外国专利> METHOD FOR GENERATION OF CODE ANNOTATIONS BASED ON PROGRAM ANALYSIS AND RECURRENT NEURAL NETWORK

METHOD FOR GENERATION OF CODE ANNOTATIONS BASED ON PROGRAM ANALYSIS AND RECURRENT NEURAL NETWORK

机译:基于程序分析和递归神经网络的代码标注生成方法

摘要

Disclosed is a method for generation of code annotations based on program analysis and a recurrent neural network, comprising the following steps: building a large-scale code library; extracting information included in each Java method within a Java project and dependency information thereof; according to the extracted information and in combination with a heuristic method, filtering and reconstructing the execution code portion of each Java method; obtaining annotations matching the execution code; assembling the filtered code and the corresponding annotations into a code/annotation pair set, and using same as a training set for a code annotation generation model; by means of the obtained training set, using an encoding-decoding model to perform code annotation generation model training; after the model training is complete, performing prediction. The method generates simple and clear annotations, can help developers to understand code functions, accelerates software maintenance processes, and increases software product quality.
机译:本发明公开了一种基于程序分析和递归神经网络的代码注释生成方法,包括以下步骤:建立大规模代码库;提取包括在Java项目中的每个Java方法中的信息及其依赖信息;根据提取的信息,结合启发式方法,过滤并重构每个Java方法的执行代码部分;获取与执行代码匹配的注释;将过滤后的代码和相应的注释组装成代码/注释对集合,并用作代码注释生成模型的训练集;通过获取的训练集,使用编解码模型进行代码标注生成模型训练;模型训练完成后,执行预测。该方法生成简单明了的注释,可以帮助开发人员理解代码功能,加速软件维护过程并提高软件产品质量。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号