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.


翻译:本文提出一种基于变更度量聚类的软件开发过程中源代码变更自动分类方法。该方法包含两个步骤:首先对每个代码变更计算得到的度量向量进行聚类,随后由专家将生成的聚类映射至预定义的变更类别。变更在聚类间的分配过程自动执行,而聚类到类别的映射则由专家完成。分配步骤的自动化显著减少了代码变更审查所需时间。聚类过程采用k-means算法,以度量向量间的余弦相似度作为度量标准。该方法采用十一项源代码度量指标,涵盖代码行数、圈复杂度、文件数量、接口变更及结构变更等方面。通过在五个软件系统(包括Subversion和NHibernate两个开源项目)上的验证,本方法在0.05显著性水平下实现了分类纯度P_C = 0.75 +/- 0.05与熵值E_C = 0.37 +/- 0.06。

0
下载
关闭预览

相关内容

【AAAI2021】对比聚类,Contrastive Clustering
专知会员服务
78+阅读 · 2021年1月30日
专知会员服务
16+阅读 · 2021年1月23日
Transformer文本分类代码
专知会员服务
118+阅读 · 2020年2月3日
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
深度自进化聚类:Deep Self-Evolution Clustering
我爱读PAMI
15+阅读 · 2019年4月13日
干货 :基于用户画像的聚类分析
数据分析
22+阅读 · 2018年5月17日
【干货】深入理解变分自编码器
专知
21+阅读 · 2018年3月22日
【干货】深入理解自编码器(附代码实现)
【干货】一文读懂什么是变分自编码器
专知
12+阅读 · 2018年2月11日
机器学习之确定最佳聚类数目的10种方法
炼数成金订阅号
13+阅读 · 2017年10月12日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
14+阅读 · 2008年12月31日
VIP会员
相关资讯
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
深度自进化聚类:Deep Self-Evolution Clustering
我爱读PAMI
15+阅读 · 2019年4月13日
干货 :基于用户画像的聚类分析
数据分析
22+阅读 · 2018年5月17日
【干货】深入理解变分自编码器
专知
21+阅读 · 2018年3月22日
【干货】深入理解自编码器(附代码实现)
【干货】一文读懂什么是变分自编码器
专知
12+阅读 · 2018年2月11日
机器学习之确定最佳聚类数目的10种方法
炼数成金订阅号
13+阅读 · 2017年10月12日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
14+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员