2011 18th Working Conference on Reverse Engineering 2011
DOI: 10.1109/wcre.2011.36
|View full text |Cite
|
Sign up to set email alerts
|

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

Abstract: Abstract-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 imple… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
9
0

Year Published

2014
2014
2024
2024

Publication Types

Select...
4
2

Relationship

0
6

Authors

Journals

citations
Cited by 7 publications
(9 citation statements)
references
References 17 publications
0
9
0
Order By: Relevance
“…In short, the LoD requires that a client object must only send messages to objects that are in its immediate scope, which enforces information hiding and makes all coupling explicit. Guo et al show that violations of the LoD lead to more defects [21] 2 . Guo et al's study also shows that violations of the LoD are very common in the Eclipse plugins they evaluated.…”
Section: Methods Chainsmentioning
confidence: 99%
See 2 more Smart Citations
“…In short, the LoD requires that a client object must only send messages to objects that are in its immediate scope, which enforces information hiding and makes all coupling explicit. Guo et al show that violations of the LoD lead to more defects [21] 2 . Guo et al's study also shows that violations of the LoD are very common in the Eclipse plugins they evaluated.…”
Section: Methods Chainsmentioning
confidence: 99%
“…2. Example code (3) is a simplified version of a violation of LoD in the JDT core presented in [21].…”
Section: Commentsmentioning
confidence: 99%
See 1 more Smart Citation
“…For the given method this exception already reduces the number of violations again by 6 and we reached a reduction from 21 potential violations down to 11. 14 (D3) Refactoring: Lift access to figure forward. As we are now able to put aside the obviously irrelevant accesses to the two "Data Classes", let us explore whether the remaining 11 violations are meaningful.…”
Section: Observations In Elbowhandleconstrainx(int)mentioning
confidence: 99%
“…I3) The extension of the idea is just given by naming the two classes. I4) Since the suggested adaptation is a result of 14 Although the comment claims that the DrawingEditor is a "Mediator" that decouples its "participants" (view, drawing, tools), it exposes them via the methods view(), drawing(), tool(). Consequently methods referring to the DrawingEditor may depend also on Drawing, DrawingView or Tool, potentially resulting in "Law of Demeter" violations.…”
mentioning
confidence: 99%