评估面向对象类级代码质量指标的构念效度
Assessing the Construct Validity of Object-Oriented, Class-Level Code Quality Metrics
浏览论文内容
中文总结 AI 辅助
本研究通过EFA和CFA验证了24个类级面向对象代码质量指标的构念效度,揭示了规模、内聚、继承和耦合等构念,并发现耦合与继承为多维构念。
中文摘要 AI 辅助
背景:代码质量指标旨在衡量软件源代码的潜在属性。尽管已有众多代码指标被提出并应用,但其构念效度很少被评估。因此,代码指标实际测量其声称要测量的内容的程度往往不明确。目的:借鉴现代测量理论,我们通过使用探索性因子分析(EFA)识别其因子结构,来研究常见的类级面向对象代码质量指标的构念效度。这些指标通过三个软件工具从Apache Maven项目中提取:Designite、JHawk和Understand。因子结构随后在22个随机选择的符合预定资格标准的开源项目上使用验证性因子分析(CFA)进行验证。结果:在潜在因子结构中揭示了对应六个构念的24个代码质量指标:内聚性、入耦合、出耦合、规模、子继承(与子类相关)和父继承(与父类相关)。十个指标不对应任何已知的软件质量维度,并在EFA中被移除。另外十个指标在CFA中显示出低载荷,表明应从最终测量模型中移除。保留的构念为规模、内聚性、继承和耦合,其中继承和耦合识别出子类别。结论:我们的结果强有力地支持24个代码质量指标的构念效度。耦合和继承被揭示为多维构念,因为它们需要测量两个不同的概念,在我们的分析中显示为子类别,而复杂性可能更适合在多级模型中探讨。总体而言,我们的研究展示了应用现代测量理论和潜变量建模在验证软件代码质量指标中的价值。
英文摘要
Background: Code quality metrics are intended to measure latent properties of software source code. Although numerous code metrics have been proposed and used, their construct validity is rarely evaluated. Thus, the extent to which code metrics actually measure what they claim to measure is often unclear. Aim: Drawing from modern measurement theory, we investigate the construct validity of common class-level, object-oriented code quality metrics by identifying their factor structure using Exploratory Factor Analysis (EFA). The metrics were extracted from the Apache Maven project by three software tools: Designite, JHawk, and Understand. The factor structure was later verified using Confirmatory Factor Analysis (CFA) on 22 randomly selected open source projects meeting a predetermined eligibility criteria. Results: 24 code quality metrics that correspond to six constructs: Cohesion, In-Coupling, Out-Coupling, Size, Sub-Inheritance (related to subclasses), and Sup-Inheritance (related to superclasses) were revealed in the underlying factor structure. Ten metrics did not correspond to any known dimension of software quality and were removed in the EFA. Ten additional metrics exhibited low loadings in the CFA, suggesting their removal from the final measurement model. Size, Cohesion, Inheritance, and Coupling were the constructs retained, with subcategories identified for Inheritance and Coupling. Conclusions: Our results strongly support the construct validity of 24 code quality metrics. Coupling and Inheritance are revealed as multidimensional constructs, since they require measuring two different concepts, revealed as sub-categories in our analysis, and Complexity may be better explored in a multilevel model. Overall, our study demonstrates the value of applying modern measurement theory and latent variable modeling in validating software code quality metrics.
发表机构
- Dalhousie University(达尔豪斯大学)
- LUT University(拉彭兰塔理工大学)
机构由 AI 辅助整理,请以论文原文为准。