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. However, recent studies found that complexity metrics may be unreliable indicators for understandability of the source code and therefore may have less impact on software quality. To explore the relationship between quality and changes, 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 fine-tuning a state-of-the art deep learning model created 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 and other changes. In addition, we investigate which files are targets of quality improvements. We find that quality improving commits are smaller than other 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 other files.
翻译:静态分析工具还包括复杂程度和大小的边界值,为开发者提供警告;然而,最近的研究发现,复杂程度指标对于源代码的可理解性来说可能是不可靠的指标,因此对软件质量的影响可能较小。为了探索质量和变化之间的关系,我们利用开发者的意图,即它们自己的代码基础的质量改进是什么。我们手工将54个爪哇开放源项目的2 533个随机抽样分类为质量改进质量,这取决于开发者检查承诺信息的意图。我们通过预先确定的指导方针区分精确性和纠正性维护,并将这些数据作为改进源代码的地面真相,以微调源代码,为自然语言处理创造的艺术深层次学习模型。我们提供的基准表明,深层次学习模型能够被有信心地用于进行意向分类。我们用这个模型将我们的数据集增加到125 482个。基于由此生成的数据集,我们调查大小差异和纠正性源代码的精确性维护情况,而我们则在改进其他质量和精确源码的质量方面进行更小的修改。我们用这个模型来测量其它质量的变化,我们用一个比其他质量的更小的源码进行更精确的修改。我们去研究。