Course Notes Set 12: Object-Oriented Metrics

Slides:



Advertisements
Similar presentations
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and are provided with permission by R.S.
Advertisements

SPEC Workshop 2008 Laboratory for Computer Architecture1/27/2008 On the Object Orientedness of C++ programs in SPEC CPU 2006 Ciji Isen & Lizy K. John University.
Metrics for OO Design Distinct & measurable characteristics of OO design:- Size:-it is defined as – population,volume,length & functionality Population.
Software Metrics for Object Oriented Design
Software Metrics Software Engineering.
Prediction of fault-proneness at early phase in object-oriented development Toshihiro Kamiya †, Shinji Kusumoto † and Katsuro Inoue †‡ † Osaka University.
Figures – Chapter 24.
Metrics for Object Oriented Design Shyam R. Chidamber Chris F. Kemerer Presented by Ambikadevi Damodaran.
Applying and Interpreting Object Oriented Metrics
March 25, R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity Comment percentage Length of identifiers Depth of conditional.
Nov R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity* Comment percentage Length of identifiers Depth of conditional.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Object Oriented Design
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
Object-Oriented Metrics. Characteristics of OO ● Localization ● Encapsulation ● Information hiding ● Inheritence ● Object abstraction.
Design Metrics Software Engineering Fall 2003 Aditya P. Mathur Last update: October 28, 2003.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Object-Oriented Metrics
March R. McFadyen1 Software Metrics Software metrics help evaluate development and testing efforts needed, understandability, maintainability.
1 Complexity metrics  measure certain aspects of the software (lines of code, # of if-statements, depth of nesting, …)  use these numbers as a criterion.
Predicting Class Testability using Object-Oriented Metrics M. Bruntink and A. van Deursen Presented by Tom Chappell.
Object Oriented Metrics XP project group – Saskia Schmitz.
Chapter 9: Software Metrics
Software Metrics.
Metrics.
Lecture 17 Software Metrics
Chidamber & Kemerer Suite of Metrics
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
Object-Oriented Metrics Alex Evans Jonathan Jakse Cole Fleming Matt Keran Michael Ababio.
Japan Advanced Institute of Science and Technology
Paradigm Independent Software Complexity Metrics Dr. Zoltán Porkoláb Department of Programming Languages and Compilers Eötvös Loránd University, Faculty.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Measurement & Metrics
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15b: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 Chapter 15 Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
1 OO Metrics-Sept2001 Principal Components of Orthogonal Object-Oriented Metrics Victor Laing SRS Information Services Software Assurance Technology Center.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
SOFTWARE PROCESS AND PROJECT METRICS
Concepts of Software Quality Yonglei Tao 1. Software Quality Attributes  Reliability  correctness, completeness, consistency, robustness  Testability.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Metrics and lessons learned for OO projects Kan Ch 12 Steve Chenoweth, RHIT Above – New chapter, same Halstead. He also predicted various other project.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Daniel Liu & Yigal Darsa - Presentation Early Estimation of Software Quality Using In-Process Testing Metrics: A Controlled Case Study Presenters: Yigal.
Object-Oriented (OO) estimation Martin Vigo Gabriel H. Lozano M.
Ontology Support for Abstraction Layer Modularization Hyun Cho, Jeff Gray Department of Computer Science University of Alabama
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Object Oriented Metrics
Software Engineering Lecture 19: Object-Oriented Testing & Technical Metrics.
1 OO Technical Metrics CIS 375 Bruce R. Maxim UM-Dearborn.
Software Engineering Object Oriented Metrics. Objectives 1.To describe the distinguishing characteristics of Object-Oriented Metrics. 2.To introduce metrics.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Design Metrics CS 406 Software Engineering I Fall 2001 Aditya P. Mathur Last update: October 23, 2001.
Object Oriented Metrics
A Hierarchical Model for Object-Oriented Design Quality Assessment
Design Characteristics and Metrics
Object-Oriented Metrics
CS427: Software Engineering I
Design Metrics Software Engineering Fall 2003
Chapter 30 Product Metrics
Design Metrics Software Engineering Fall 2003
Information flow-Test coverage measure
Mei-Huei Tang October 25, 2000 Computer Science Department SUNY Albany
CS223: Software Engineering
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
Software Metrics using EiffelStudio
Software Engineering: A Practitioner’s Approach, 6/e Chapter 15 Product Metrics for Software copyright © 1996, 2001, 2005 R.S. Pressman & Associates,
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Course Notes Set 12: Object-Oriented Metrics Computer Science and Software Engineering Auburn University

Object-Oriented Metrics CK Metrics Proposed by Chidamber and Kemerer class-based metrics LK Metrics Proposed by Lorenz and Kidd class-based and operation-based MOOD Metrics Proposed by Harrison, Counsell, and Nithi class-based

CK Metrics Weighted methods per class (WMC) The sum of the complexity values for all the methods of a given class. They do not specify the specific complexity metric to use (e.g., cyclomatic complexity). Indicator of implementation and testing effort for a class. The higher the value, the more effort required. A possible indication of reusability. WMC should be kept low.

CK Metrics Depth of inheritance tree (DIT) The length of the longest path from the root of the inheritance hierarchy to a leaf class. As DIT increases, the lower classes in the hierarchy inherit a greater number of data and methods, thus making their behavior more difficult to understand and causing testing to require more effort. A large DIT value implies greater design complexity, but also greater reuse.

CK Metrics Number of children (NOC) A count of the number of classes immediately subordinate to a given class in the hierarchy. As the NOC value grows, reuse increases but the amount of testing also increases. Also, a large NOC value may indicate an inappropriate abstraction.

CK Metrics Coupling between classes (CBO) The amount of collaboration and interaction between a given class and the other classes in the system. As the CBO value increases, reusability decreases. Also, a high CBO indicates potential difficulty in modifying the class and the subsequent testing of the modifications. CBO should be kept low.

CK Metrics Response for a class (RFC) The number of methods that can potentially be executed in response to a message received by an object of a given class. As the RFC value increases, testing effort and design complexity also increase. RFC should be kept low.

CK Metrics Lack of cohesion in methods (LCOM) The number of methods in a given class that access one or more of the same instance variables. The higher the LCOM value, the lower the cohesion of methods, and greater the coupling. A high LCOM value could indicate the need to break the class apart into multiple classes.

LK Metrics Class size (CS) The total number of methods (both inherited and local) plus the total number of attributes (both inherited and local) encapsulated by a given class. Inherited members should be weighted more heavily than local members. Large values of CS could indicate that the class is too large; that is, that it encasulates too much behavior, structure, and responsibility. High CS values may also indicate lower reusability.

LK Metrics Number of operations overridden by a subclass (NOO) A count of the methods in subclasses that have been redefined. Large NOO values could indicate a design problem, since the model of the class seems to be violated.

LK Metrics Number of operations added by a subclass (NOA) A count of the new methods appearing in subclasses. A large NOA value could indicate a design abstraction violation. As CK DIT increases, NOA should decrease.

LK Metrics Specialization index (SI) The degree to which subclasses are differentiated from superclasses. SI is computed as NOO multiplied by the level at which the class resides in the inheritance hierarchy divided by the total number of methods defined by the class. A high SI could indicate a lack of conformance to superclass abstractions.

LK Metrics Average operation size (OSavg) Number of messages sent by a given method. A high OSavg value can indicate a poor allocation of responsibility within the class.

LK Metrics Operation complexity (OC) An indication of method complexity, such as cyclomatic complexity OC should be kept as low as possible.

LK Metrics Average number of parameters per operation (NPavg) An average method parameter list size Should be kept low

MOOD Metrics Method inheritance factor (MIF) The degree to which inheritance is used in the class hierarchy.

MOOD Metrics Coupling factor (CF) A measure of how dependent and interactive classes are

MOOD Metrics Polymorphism factor (PF) A measure of the relative amount of dynamic binding in a system. The number of methods that redefine inherited methods divided by the maximum number of possible distinct polymorphic situations.

OO Testing Metrics (Binder) LCOM Percent public and protected (PAP) Public access to data members (PAD) Number of root classes (NOR) Fan-in (FIN) NOC, DIT Class complexity metrics Polymorphism metrics

McCabe OO Metrics Percent Public Data (PCTPUB) Percentage of public and protected data within a class. Access to Public Data (PUBDATA) The number of accesses to public and protected data.

McCabe OO Metrics Percent of Unoverloaded Calls (PCTCALL) Number of unoverloaded calls in the system. Number of Roots (ROOTCNT) Total number of class hierarchy roots in the system. Fan-in (FANIN) Number of classes from which a given class is derived.

McCabe OO Metrics Maximum v(G) (MAXV) Maximum ev(G) (MAXEV) Maximum cyclomatic complexity for any single method within a given class. Maximum ev(G) (MAXEV) Maximum essential complexity for any single method within a given class. Hierarchy Quality (QUAL) Number of classes in a system that are dependent upon their descendents.

CK Metrics as Quality Indicators Empirical study by Basili and others. Collected CK metrics data on 8 medium-sized information management systems based on identical requirements. All 8 systems were developed with the same process model (modified waterfall) along with a well-known OOA/D method, and implemented in C++.

CK Metrics as Quality Indicators Analysis of the data shows that 5 of 6 CK metrics are useful to predict class fault-proneness during the early phases of the life cycle. Larger values of WMC, DIT, RFC, and CBO correlate with a greater probability of detecting a defect in a given class. Larger values of NOC correlate with a lower probability of detecting a defect in a given class. LCOM was not significant.