Software code quality is a construct with three dimensions: maintainability, reliability, and functionality. Although many firms have incorporated code quality metrics in their operations, evaluating these metrics still lacks consistent standards. We categorized distinct metrics into two types: 1) monotonic metrics that consistently influence code quality; and 2) non-monotonic metrics that lack a consistent relationship with code quality. To consistently evaluate them, we proposed a distribution-based method to get metric scores. Our empirical analysis includes 36,460 high-quality open-source software (OSS) repositories and their raw metrics from SonarQube and CK. The evaluated scores demonstrate great explainability on software adoption. Our work contributes to the multi-dimensional construct of code quality and its metric measurements, which provides practical implications for consistent measurements on both monotonic and non-monotonic metrics.
翻译:软件代码质量是一个包含可维护性、可靠性和功能性三个维度的概念。尽管许多企业已将代码质量度量纳入其运营流程,但这些度量的评估仍缺乏一致标准。我们将不同度量分为两类:1)单调性度量,其始终影响代码质量;2)非单调性度量,其与代码质量的关系不一致。为统一评估这些度量,我们提出了一种基于分布的方法来计算度量得分。我们的实证分析涵盖了来自SonarQube和CK的36,460个高质量开源软件仓库及其原始度量数据。评估得分对软件采用情况展现出良好的解释力。本研究对代码质量的多维概念及其度量方法做出了贡献,为单调性度量和非单调性度量的一致衡量提供了实践启示。