[论文解读] A Pedagogical Evaluation and Discussion about the Lack of Cohesion in Method (LCOM) Metric Using Field Experiment
本研究基于三个工业系统(分别包含34、383和1,055个类)的现场数据,评估了方法缺乏凝聚力(LCOM)度量指标。通过描述性统计和Chidamber与Kemerer的度量套件,研究发现LCOM能有效识别出具有凝聚力和设计不良的类,其凝聚力率分别为78.8%、54%和30%,支持其在评估类凝聚力方面的有效性。
Chidamber and Kemerer first defined a cohesion measure for object-oriented software - the Lack of Cohesion in Methods (LCOM) metric. This paper presents a pedagogic evaluation and discussion about the LCOM metric using field data from three industrial systems. System 1 has 34 classes, System 2 has 383 classes and System 3 has 1055 classes. The main objectives of the study were to determine if the LCOM metric was appropriate in the measurement of class cohesion and the determination of properly and improperly designed classes in the studied systems. Chidamber and Kemerer's suite of metric was used as metric tool. Descriptive statistics was used to analyze results. The result of the study showed that in System 1, 78.8% (26 classes) were cohesive; System 2 54% (207 classes) were cohesive; System 3 30% (317 classes) were cohesive. We suggest that the LCOM metric measures class cohesiveness and was appropriate in the determination of properly and improperly designed classes in the studied system.
研究动机与目标
- 评估LCOM度量指标在真实世界软件系统中测量类凝聚力的适用性。
- 确定LCOM是否能可靠地区分工业代码库中设计良好与设计不良的类。
- 评估该度量指标在不同规模和复杂度系统中的表现。
- 基于实证现场数据,对LCOM的实用性进行教学性讨论。
提出的方法
- 使用三个工业系统中分别包含34、383和1,055个类的生产代码进行现场实验。
- 应用Chidamber与Kemerer的LCOM度量套件,为每个类计算凝聚力得分。
- 使用描述性统计分析LCOM值在各类中的分布与大小。
- 基于LCOM阈值和统计趋势,将类分类为具有凝聚力或不具凝聚力。
- 对不同系统间凝聚力百分比进行对比分析,以评估度量指标的一致性。
实验结果
研究问题
- RQ1LCOM度量指标是否在真实工业软件系统中有效衡量类凝聚力?
- RQ2LCOM是否能可靠地识别面向对象系统中设计合理与不合理的类?
- RQ3在不同规模和复杂度的系统中,凝聚力水平如何变化?
- RQ4LCOM度量指标在多样化工业代码库中是否保持一致的可解释性?
主要发现
- 在系统1(34个类)中,78.8%(26个类)根据LCOM值被分类为具有凝聚力。
- 在系统2(383个类)中,54%(207个类)被发现具有凝聚力。
- 在系统3(1,055个类)中,仅有30%(317个类)被识别为具有凝聚力。
- LCOM度量指标在所有三个系统中均表现出一致的适用性,能够可靠地区分具有凝聚力与不具凝聚力的类。
- 随着系统规模增大,凝聚力率下降,表明设计质量可能存在可扩展性挑战。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。