Code review is a critical process in software development, contributing to the overall quality of the product by identifying errors early. A key aspect of this process is the selection of appropriate reviewers to scru...Code review is a critical process in software development, contributing to the overall quality of the product by identifying errors early. A key aspect of this process is the selection of appropriate reviewers to scrutinize changes made to source code. However, in large-scale open-source projects, selecting the most suitable reviewers for a specific change can be a challenging task. To address this, we introduce the Code Context Based Reviewer Recommendation (CCB-RR), a model that leverages information from changesets to recommend the most suitable reviewers. The model takes into consideration the paths of modified files and the context derived from the changesets, including their titles and descriptions. Additionally, CCB-RR employs KeyBERT to extract the most relevant keywords and compare the semantic similarity across changesets. The model integrates the paths of modified files, keyword information, and the context of code changes to form a comprehensive picture of the changeset. We conducted extensive experiments on four open-source projects, demonstrating the effectiveness of CCB-RR. The model achieved a Top-1 accuracy of 60%, 55%, 51%, and 45% on the Android, OpenStack, QT, and LibreOffice projects respectively. For Mean Reciprocal Rank (MRR), CCB achieved 71%, 62%, 52%, and 68% on the same projects respectively, thereby highlighting its potential for practical application in code reviewer recommendation.展开更多
When source code is over-specific to some concrete contexts, developers have to manually change the source code retrieved from the Internet. To solve this problem, we propose the context-aware change pattern(CACP). ...When source code is over-specific to some concrete contexts, developers have to manually change the source code retrieved from the Internet. To solve this problem, we propose the context-aware change pattern(CACP). For a piece of source code, we extract the changes and changes-relevant context from the past code changes, identifying CACP that is the abstract common part of the changes and context. By using CACP, the retrieved source code could be transformed into the suitable one according to different user needs. From the Github we extracted 7 topics, collected 5-6 code snippets per topic and performed 5 different experiments which illustrated that CACP improves code transformation accuracy by 73.84%.展开更多
基于大语言模型(Large Language Models,LLM)的代码补全技术为软件开发带来了新机遇。文章构建了一种基于LLM的智能代码补全系统,设计涵盖系统架构、上下文建模、提示构造、多语言支持等关键模块,采用静态与动态上下文融合策略,结合自定...基于大语言模型(Large Language Models,LLM)的代码补全技术为软件开发带来了新机遇。文章构建了一种基于LLM的智能代码补全系统,设计涵盖系统架构、上下文建模、提示构造、多语言支持等关键模块,采用静态与动态上下文融合策略,结合自定义Prompt模板,实现代码语义的精准建模与提示优化目标。在模型适配方面,引入迁移学习机制,增强跨语言泛化能力。性能评估实验结果表明,该系统在多种语言环境下均表现出了较高的补全准确率与响应效率,具备良好的实用价值与扩展潜力。展开更多
The paper will discuss the process of code-switching and its cognitive pragmatic motivation from the point of relevance.And code-switching is also regarded as a kind of communicative strategy.The process of the produc...The paper will discuss the process of code-switching and its cognitive pragmatic motivation from the point of relevance.And code-switching is also regarded as a kind of communicative strategy.The process of the production of code-switching is also the cooperation and mutual constrain of communicator’s cognitive environment and ability.Cognitive effect can be obtained through communicator’s processing cognitive environment with their cognitive ability.In this process,the cooperation of cognitive ability and cognitive environment gives a guarantee to successful communication with code-switching.展开更多
The existing query expansion(QE) methods cannot find the most users-requested source code version at times due to the over-expansion resulting from noises. To solve this problem, we propose a QE method based on evolvi...The existing query expansion(QE) methods cannot find the most users-requested source code version at times due to the over-expansion resulting from noises. To solve this problem, we propose a QE method based on evolving contexts(EC) that are added/deleted terms and their dependent terms during code evolution. On expanding a query, we appended the added terms as relevant terms, and excluded the deleted terms as noisy terms. We also developed a QE-integrating framework based on the Support Vector Machine(SVM) Ranking, called QESR, to simultaneously integrate multiple QE methods. Our experiment shows that QESR outperforms the state-of-the-art QE methods CodeHow and Query Expansion based on Crowd Knowledge(QECK) by 13%-16% in terms of precision when the first query result is inspected.展开更多
基金supported in part by the Science and Technology Development Fund(FDCT),Macao SAR,China(Nos.0047/2020/A1 and 0014/2022/A).
文摘Code review is a critical process in software development, contributing to the overall quality of the product by identifying errors early. A key aspect of this process is the selection of appropriate reviewers to scrutinize changes made to source code. However, in large-scale open-source projects, selecting the most suitable reviewers for a specific change can be a challenging task. To address this, we introduce the Code Context Based Reviewer Recommendation (CCB-RR), a model that leverages information from changesets to recommend the most suitable reviewers. The model takes into consideration the paths of modified files and the context derived from the changesets, including their titles and descriptions. Additionally, CCB-RR employs KeyBERT to extract the most relevant keywords and compare the semantic similarity across changesets. The model integrates the paths of modified files, keyword information, and the context of code changes to form a comprehensive picture of the changeset. We conducted extensive experiments on four open-source projects, demonstrating the effectiveness of CCB-RR. The model achieved a Top-1 accuracy of 60%, 55%, 51%, and 45% on the Android, OpenStack, QT, and LibreOffice projects respectively. For Mean Reciprocal Rank (MRR), CCB achieved 71%, 62%, 52%, and 68% on the same projects respectively, thereby highlighting its potential for practical application in code reviewer recommendation.
基金Supported by the National Natural Science Foundation of China(60373075,61640221,61562026,61672470)
文摘When source code is over-specific to some concrete contexts, developers have to manually change the source code retrieved from the Internet. To solve this problem, we propose the context-aware change pattern(CACP). For a piece of source code, we extract the changes and changes-relevant context from the past code changes, identifying CACP that is the abstract common part of the changes and context. By using CACP, the retrieved source code could be transformed into the suitable one according to different user needs. From the Github we extracted 7 topics, collected 5-6 code snippets per topic and performed 5 different experiments which illustrated that CACP improves code transformation accuracy by 73.84%.
文摘基于大语言模型(Large Language Models,LLM)的代码补全技术为软件开发带来了新机遇。文章构建了一种基于LLM的智能代码补全系统,设计涵盖系统架构、上下文建模、提示构造、多语言支持等关键模块,采用静态与动态上下文融合策略,结合自定义Prompt模板,实现代码语义的精准建模与提示优化目标。在模型适配方面,引入迁移学习机制,增强跨语言泛化能力。性能评估实验结果表明,该系统在多种语言环境下均表现出了较高的补全准确率与响应效率,具备良好的实用价值与扩展潜力。
文摘The paper will discuss the process of code-switching and its cognitive pragmatic motivation from the point of relevance.And code-switching is also regarded as a kind of communicative strategy.The process of the production of code-switching is also the cooperation and mutual constrain of communicator’s cognitive environment and ability.Cognitive effect can be obtained through communicator’s processing cognitive environment with their cognitive ability.In this process,the cooperation of cognitive ability and cognitive environment gives a guarantee to successful communication with code-switching.
基金Supported by the Science and Technology Project of Jiangxi Education Department(GJJ161151)the School-Level Team Building Project(JXTD1404)
文摘The existing query expansion(QE) methods cannot find the most users-requested source code version at times due to the over-expansion resulting from noises. To solve this problem, we propose a QE method based on evolving contexts(EC) that are added/deleted terms and their dependent terms during code evolution. On expanding a query, we appended the added terms as relevant terms, and excluded the deleted terms as noisy terms. We also developed a QE-integrating framework based on the Support Vector Machine(SVM) Ranking, called QESR, to simultaneously integrate multiple QE methods. Our experiment shows that QESR outperforms the state-of-the-art QE methods CodeHow and Query Expansion based on Crowd Knowledge(QECK) by 13%-16% in terms of precision when the first query result is inspected.