在当前的软件开发环境中,海量的低质量、无意义的代码知识为开发人员进行代码复用造成了阻碍,大大降低了软件开发效率。为了快速准确地为开发人员推荐高质量的代码知识,提出了基于SBERT(sentence-BERT)模型的代码片段推荐方法CSRSB(code...在当前的软件开发环境中,海量的低质量、无意义的代码知识为开发人员进行代码复用造成了阻碍,大大降低了软件开发效率。为了快速准确地为开发人员推荐高质量的代码知识,提出了基于SBERT(sentence-BERT)模型的代码片段推荐方法CSRSB(code snippets recommendation based on sentence-BERT)。该方法首先获取海量的高质量数据来构建代码语料库,并基于深度学习模型SBERT为代码片段对应的自然语言描述和用户输入的自然语言查询生成具有丰富语义的句向量,通过比较点积相似度来实现代码片段的推荐。使用命中率、平均倒数排名和平均准确率这三个常用推荐评估指标与现有相关研究中的方法进行对比来验证该方法的有效性。实验结果表明,CSRSB在有效提高代码片段推荐准确度的同时也能够做到快速推荐。展开更多
应用程序接口(Application Programming Interfaces,API)在现代软件开发中起着重要的作用,开发人员经常需要为他们的编程任务搜索合适的API。但是随着信息产业的发展,API参考文档变得越发庞大,传统的搜索方式会因为互联网上的冗余和错...应用程序接口(Application Programming Interfaces,API)在现代软件开发中起着重要的作用,开发人员经常需要为他们的编程任务搜索合适的API。但是随着信息产业的发展,API参考文档变得越发庞大,传统的搜索方式会因为互联网上的冗余和错误信息给工程师的查询带来不便。与此同时,由于编程任务的自然语言描述与API文档中的描述之间存在词汇和知识上的差距,很难找到合适的API。基于这些问题,提出一种融合领域知识的API推荐算法ARDSQ(Recommendation base on Documentation and Solved Question)。ARDSQ能够根据工程师对某个功能的自然语言描述去知识库里检索到最为贴近的API。实验表明,与两种先进的API推荐算法(BIKER,DeepAPILearning)比较,ARDSQ在推荐系统关键评价指数(Hit-n,MRR,MAP)上都有较大的优势。展开更多
Code review is an important process to reduce code defects and improve software quality. In social coding communities like GitHub, as everyone can submit Pull-Requests, code review plays a more important role than eve...Code review is an important process to reduce code defects and improve software quality. In social coding communities like GitHub, as everyone can submit Pull-Requests, code review plays a more important role than ever before, and the process is quite time-consuming. Therefore, finding and recommending proper reviewers for the emerging Pull-Requests becomes a vital task. However, most of the current studies mainly focus on recommending reviewers by checking whether they will participate or not without differentiating the participation types. In this paper, we develop a two-layer reviewer recommendation model to recommend reviewers for Pull-Requests (PRs) in GitHub projects from the technical and managerial perspectives. For the first layer, we recommend suitable developers to review the target PRs based on a hybrid recommendation method. For the second layer, after getting the recommendation results from the first layer, we specify whether the target developer will technically or managerially participate in the reviewing process. We conducted experiments on two popular projects in GitHub, and tested the approach using PRs created between February 2016 and February 2017. The results show that the first layer of our recommendation model performs better than the previous work, and the second layer can effectively differentiate the types of participation.展开更多
文摘在当前的软件开发环境中,海量的低质量、无意义的代码知识为开发人员进行代码复用造成了阻碍,大大降低了软件开发效率。为了快速准确地为开发人员推荐高质量的代码知识,提出了基于SBERT(sentence-BERT)模型的代码片段推荐方法CSRSB(code snippets recommendation based on sentence-BERT)。该方法首先获取海量的高质量数据来构建代码语料库,并基于深度学习模型SBERT为代码片段对应的自然语言描述和用户输入的自然语言查询生成具有丰富语义的句向量,通过比较点积相似度来实现代码片段的推荐。使用命中率、平均倒数排名和平均准确率这三个常用推荐评估指标与现有相关研究中的方法进行对比来验证该方法的有效性。实验结果表明,CSRSB在有效提高代码片段推荐准确度的同时也能够做到快速推荐。
文摘应用程序接口(Application Programming Interfaces,API)在现代软件开发中起着重要的作用,开发人员经常需要为他们的编程任务搜索合适的API。但是随着信息产业的发展,API参考文档变得越发庞大,传统的搜索方式会因为互联网上的冗余和错误信息给工程师的查询带来不便。与此同时,由于编程任务的自然语言描述与API文档中的描述之间存在词汇和知识上的差距,很难找到合适的API。基于这些问题,提出一种融合领域知识的API推荐算法ARDSQ(Recommendation base on Documentation and Solved Question)。ARDSQ能够根据工程师对某个功能的自然语言描述去知识库里检索到最为贴近的API。实验表明,与两种先进的API推荐算法(BIKER,DeepAPILearning)比较,ARDSQ在推荐系统关键评价指数(Hit-n,MRR,MAP)上都有较大的优势。
基金Project(2016-YFB1000805)supported by the National Grand R&D Plan,ChinaProjects(61502512,61432020,61472430,61532004)supported by the National Natural Science Foundation of China
文摘Code review is an important process to reduce code defects and improve software quality. In social coding communities like GitHub, as everyone can submit Pull-Requests, code review plays a more important role than ever before, and the process is quite time-consuming. Therefore, finding and recommending proper reviewers for the emerging Pull-Requests becomes a vital task. However, most of the current studies mainly focus on recommending reviewers by checking whether they will participate or not without differentiating the participation types. In this paper, we develop a two-layer reviewer recommendation model to recommend reviewers for Pull-Requests (PRs) in GitHub projects from the technical and managerial perspectives. For the first layer, we recommend suitable developers to review the target PRs based on a hybrid recommendation method. For the second layer, after getting the recommendation results from the first layer, we specify whether the target developer will technically or managerially participate in the reviewing process. We conducted experiments on two popular projects in GitHub, and tested the approach using PRs created between February 2016 and February 2017. The results show that the first layer of our recommendation model performs better than the previous work, and the second layer can effectively differentiate the types of participation.