arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.14591cs.SEcs.AI
收藏

基于软件开发过程中代码变更度量聚类的源代码变更自动分类

Automated Classification of Source Code Changes Based on Metrics Clustering in the Software Development Process

Saint Petersburg State University of Information Technologies, Mechanics and Optics (ITMO University)(圣彼得堡信息技术、力学与光学国立大学(ITMO大学))

Evgenii Kniazev

AI总结:

本文提出基于度量聚类的自动化方法,用于软件开发过程中源代码变更的分类,通过聚类和专家映射提高审查效率。

摘要:

本文提出了一种基于变更度量聚类的自动化方法,用于在软件开发过程中对源代码变更进行分类。该方法包含两个步骤:首先对每个代码变更计算的度量向量进行聚类,然后由专家将聚类结果映射到预定义的变更类别。变更自动分配到聚类中,而聚类到类别的映射则由专家完成。自动化分配步骤大大减少了代码变更审查所需的时间。使用k-means算法和度量向量之间的余弦相似度进行聚类。采用十一个源代码度量,包括代码行、环形复杂度、文件计数、接口变更和结构变更。该方法在五个软件系统上进行了验证,包括两个开源项目(Subversion和NHibernate),并展示了分类纯度P_C=0.75±0.05和熵E_C=0.37±0.06,在显著性水平为0.05的情况下。

英文摘要:

This paper presents an automated method for classifying source code changes during the software development process based on clustering of change metrics. The method consists of two steps: clustering of metric vectors computed for each code change, followed by expert mapping of the resulting clusters to predefined change classes. The distribution of changes into clusters is performed automatically, while the mapping of clusters to classes is carried out by an expert. Automation of the distribution step substantially reduces the time required for code change review. The k-means algorithm with a cosine similarity measure between metric vectors is used for clustering. Eleven source code metrics are employed, covering lines of code, cyclomatic complexity, file counts, interface changes, and structural changes. The method was validated on five software systems, including two open-source projects (Subversion and NHibernate), and demonstrated classification purity of P_C = 0.75 +/- 0.05 and entropy of E_C = 0.37 +/- 0.06 at a significance level of 0.05.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑