Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality...
-
Upload
warren-cameron -
Category
Documents
-
view
216 -
download
4
Transcript of Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality...
![Page 1: Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96 Predictors.](https://reader035.fdocuments.us/reader035/viewer/2022072006/56649d0a5503460f949dd148/html5/thumbnails/1.jpg)
Metrics
![Page 2: Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96 Predictors.](https://reader035.fdocuments.us/reader035/viewer/2022072006/56649d0a5503460f949dd148/html5/thumbnails/2.jpg)
Basili’s work
• Basili et al., A Validation of Object-Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96
• Predictors of fault-prone classes?
• 8 medium sized information management systems
![Page 3: Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96 Predictors.](https://reader035.fdocuments.us/reader035/viewer/2022072006/56649d0a5503460f949dd148/html5/thumbnails/3.jpg)
Metric
• CBO metric: coupling between object classes: a class is coupled to another one if it uses its member functions and/or instance variables. CBO = number of classes to which a given class is coupled.
![Page 4: Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96 Predictors.](https://reader035.fdocuments.us/reader035/viewer/2022072006/56649d0a5503460f949dd148/html5/thumbnails/4.jpg)
Hypothesis
• H-CBO: Highly coupled classes are more fault-prone than weakly coupled classes.
![Page 5: Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96 Predictors.](https://reader035.fdocuments.us/reader035/viewer/2022072006/56649d0a5503460f949dd148/html5/thumbnails/5.jpg)
Result
• Indeed, highly coupled classes are more fault-prone than weakly coupled classes.
– Corollary: Classes that follow the LoD are less coupled and are therefore less fault-prone.
![Page 6: Metrics. Basili’s work Basili et al., A Validation of Object- Oriented Design Metrics As Quality Indicators, IEEE TSE Vol. 22, No. 10, Oct. 96 Predictors.](https://reader035.fdocuments.us/reader035/viewer/2022072006/56649d0a5503460f949dd148/html5/thumbnails/6.jpg)
Demeter Motivation
• V. Basili 1996: classes with less coupling are less error prone.
• Demeter reduces the coupling in two stages: – Following the Law of Demeter using standard
object-oriented techniques eliminates the obviously bad coupling.
– Traversal strategies reduce the coupling further by coupling only with (distant) stable friends.