arrow
返回

What really changes when developers intend to improve their source code: a commit-level study of static metric value and static analysis warning changes

delete2023-01-14
delete6
delete
OA
AI
A
Alexander Trautsch *
J
Johannes Erbel
S
Steffen Herbold
J
Jens Grabowski
DOI:10.1007/s10664-022-10257-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Many software metrics are designed to measure aspects that are believed to be related to software quality. Static software metrics, e.g., size, complexity and coupling are used in defect prediction research as well as software quality models to evaluate software quality. Static analysis tools also include boundary values for complexity and size that generate warnings for developers. While this indicates a relationship between quality and software metrics, the extent of it is not well understood. Moreover, recent studies found that complexity metrics may be unreliable indicators for understandability of the source code. To explore this relationship, we leverage the intent of developers about what constitutes a quality improvement in their own code base. We manually classify a randomized sample of 2,533 commits from 54 Java open source projects as quality improving depending on the intent of the developer by inspecting the commit message. We distinguish between perfective and corrective maintenance via predefined guidelines and use this data as ground truth for the fine-tuning of a state-of-the art deep learning model for natural language processing. The benchmark we provide with our ground truth indicates that the deep learning model can be confidently used for commit intent classification. We use the model to increase our data set to 125,482 commits. Based on the resulting data set, we investigate the differences in size and 14 static source code metrics between changes that increase quality, as indicated by the developer, and changes unrelated to quality. In addition, we investigate which files are targets of quality improvements. We find that quality improving commits are smaller than non-quality improving commits. Perfective changes have a positive impact on static source code metrics while corrective changes do tend to add complexity. Furthermore, we find that files which are the target of perfective maintenance already have a lower median complexity than files which are the target of non-pervective changes. Our study results provide empirical evidence for which static source code metrics capture quality improvement from the developers point of view. This has implications for program understanding as well as code smell detection and recommender systems.
Keyword:
Static code analysis
Quality evolution
Software metrics
Software quality

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

U
University of Gottingen
学者数:
2.5W
论文数: 2.1W
被引数: 36
U
University of Passau
学者数:
692
论文数: 680
被引数: 515
引用论文

引用论文

err
IF0
err
err0
PREAI
err
err分享
err收藏
Spatial patterns of the semi-aquatic rodentNectomys squamipesin Atlantic forest streams
err2015-08-06
err0
errOAAI
errDaniela Oliveira Lima; Gabriela Medeiros Pinho; Fernando A. S. Fernandez
err分享
err收藏
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Automatically Assessing Code Understandability自动评估代码可理解性
err2021-03-01
err48
errOAAI
errScalabrino, Simone; Bavota, Gabriele; Vendome, Christopher; Linares-Vasquez, Mario; Poshyvanyk, Denys; Oliveto, Rocco
err分享
err收藏
学者 查看更多内容