首页> 外文会议>2111 18th Working Conference on Reverse Engineering >An Empirical Validation of the Benefits of Adhering to the Law of Demeter
【24h】

An Empirical Validation of the Benefits of Adhering to the Law of Demeter

机译:遵守得墨meter耳定律的好处的实证验证

获取原文

摘要

The Law of Demeter formulates the rule-of-thumb that modules in object-oriented program code should "only talk to their immediate friends". While it is said to foster information hiding for object-oriented software, solid empirical evidence confirming the positive effects of following the Law of Demeter is still lacking. In this paper, we conduct an empirical study to confirm that violating the Law of Demeter has a negative impact on software quality, in particular that it leads to more bugs. We implement an Eclipse plugin to calculate the amount of violations of both the strong and the weak form of the law in five Eclipse sub-projects. Then we discover the correlation between violations of the law and the bug-proneness and perform a logistic regression analysis of three sub-projects. We also combine the violations with other OO metrics to build up a model for predicting the bug-proneness for a given class. Empirical results show that violations of the Law of Demeter indeed highly correlate with the number of bugs and are early predictor of the software quality. Based on this evidence, we conclude that obeying the Law of Demeter is a straight-forward approach for developers to reduce the number of bugs in their software.
机译:得墨meter耳法则制定了经验法则,即面向对象程序代码中的模块应“仅与直系朋友交谈”。尽管据说它可以促进面向对象软件的信息隐藏,但仍缺乏确凿的经验证据来证明遵循德米特法则的积极作用。在本文中,我们进行了一项实证研究,以确认违反Demeter法则会对软件质量产生负面影响,尤其是它会导致更多错误。我们实现了一个Eclipse插件,以计算五个Eclipse子项目中违反法律的强者和弱者形式的数量。然后,我们发现违法行为与易错性之间的相关性,并对三个子项目进行逻辑回归分析。我们还将违规与其他OO指标结合起来,以建立一个模型来预测给定类的错误倾向。实证结果表明,违反Demeter法则的确与漏洞数量高度相关,并且是软件质量的早期预测指标。根据这些证据,我们得出结论,遵守Demeter法则对于开发人员减少软件错误的数量是一种直接的方法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号