Code quality is a crucial construct in open-source software (OSS) with three dimensions: maintainability, reliability, and functionality. To accurately measure them, we divide 20 distinct metrics into two types: 1) threshold-type metrics that influence code quality in a monotonic manner; 2) non-threshold-type metrics that lack a monotonic relationship to evaluate. We propose a distribution-based method to provide scores for metrics, which demonstrates great explainability on OSS adoption. Our empirical analysis includes more than 36,460 OSS projects and their raw metrics from SonarQube and CK. Our work contributes to the understanding of the multi-dimensional construct of code quality and its metric measurements.
翻译:代码质量是开源软件(OSS)中的一个关键概念,涵盖三个维度:可维护性、可靠性和功能性。为精确测量这些维度,我们将20种不同度量指标分为两类:1)阈值型指标,以单调方式影响代码质量;2)非阈值型指标,缺乏单调评估关系。我们提出了一种基于分布的方法为指标评分,该方法在开源软件的采用过程中展现出极强的可解释性。我们的实证分析涵盖超过36,460个开源软件项目及其来自SonarQube和CK的原始度量数据。本研究有助于深化对代码质量多维结构及其度量方法的理解。