Software Metrics using EiffelStudio

Slides:



Advertisements
Similar presentations
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.
Advertisements

CLUSTERING SUPPORT FOR FAULT PREDICTION IN SOFTWARE Maria La Becca Dipartimento di Matematica e Informatica, University of Basilicata, Potenza, Italy
Software Metrics for Object Oriented Design
1 Predicting Bugs From History Software Evolution Chapter 4: Predicting Bugs from History T. Zimmermann, N. Nagappan, A Zeller.
Prediction of fault-proneness at early phase in object-oriented development Toshihiro Kamiya †, Shinji Kusumoto † and Katsuro Inoue †‡ † Osaka University.
Figures – Chapter 24.
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.
Design Metrics Software Engineering Fall 2003 Aditya P. Mathur Last update: October 28, 2003.
Software engineering for real-time systems
© S. Demeyer, S. Ducasse, O. Nierstrasz Duplication.1 7. Problem Detection Metrics  Software quality  Analyzing trends Duplicated Code  Detection techniques.
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.
Comp 587 Parker Li Bobby Kolski. Automated testing tools assist software engineers to gauge the quality of software by automating the mechanical aspects.
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
1 NASA OSMA SAS02 Software Reliability Modeling: Traditional and Non-Parametric Dolores R. Wallace Victor Laing SRS Information Services Software Assurance.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Lecture 17 Software 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.
Paradigm Independent Software Complexity Metrics Dr. Zoltán Porkoláb Department of Programming Languages and Compilers Eötvös Loránd University, Faculty.
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.
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 Metrics (Part II). Product Metrics  Product metrics are generally concerned with the structure of the source code (example LOC).  Product metrics.
Concepts of Software Quality Yonglei Tao 1. Software Quality Attributes  Reliability  correctness, completeness, consistency, robustness  Testability.
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.
An Automatic Software Quality Measurement System.
Software Metrics Cmpe 550 Fall Software Metrics.
SOFTWARE METRICS. Software Process Revisited The Software Process has a common process framework containing: u framework activities - for all software.
BASIS PATH TESTING.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Lecture 28: Software metrics.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology Mining Source Code Elements for Comprehending Object- Oriented.
Agent program is the one part(class)of Othello program. How many test cases do you have to test? Reversi [Othello]
Object-Oriented (OO) estimation Martin Vigo Gabriel H. Lozano M.
Metrics "A science is as mature as its measurement tools."
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.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
Static Software Metrics Tool
Object Oriented Metrics
BASIS PATH TESTING.
Metrics of Software Quality
Assessment of Geant4 Software Quality
Software Metrics 1.
Course Notes Set 12: Object-Oriented Metrics
Cyclomatic complexity
Design Characteristics and Metrics
Towards a Multi-paradigm Complexity Measure
Object-Oriented Metrics
CS427: Software Engineering I
Design Metrics Software Engineering Fall 2003
Design Metrics Software Engineering Fall 2003
Information flow-Test coverage measure
Mei-Huei Tang October 25, 2000 Computer Science Department SUNY Albany
Halstead software science measures and other metrics for source code
Information Flow Metric
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
1. Cyclomatic complexity
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Software Metrics using EiffelStudio With material by Yi Wei & Marco Piccioni June 2007

What is a software metric, and why A software metric is a measure of some property of a piece of software or its specifications. quality must be clearly defined quantitative methods have proved powerful in other sciences “You can’t control what you can't measure” -- Tom DeMarco

What to measure Product properties Lines of Code Number of classes Cohesion & Coupling Conformance of code to OO principles Process properties Man-month spent on software Number of bugs introduced per hour Ratio of debugging/developing time CMM, PSP

Traditional Metrics McCabe Cyclomatic Complexity (CC) Source Lines of Code (SLOC) Comment Percentage (CP)

McCabe Cyclomatic Complexity A measure based on a connected graph of the module (shows the topology of control flow within the program) Definition M = E − N + P where M = cyclomatic complexity E = the number of edges of the graph N = the number of nodes of the graph P = the number of connected components.

Example of Cyclomatic Complexity if condition then code 1 else code 2 end E = 4, N = 4, P = 2, M = 4 – 4 + 2 = 2

Source Lines of Code A measure of the number of physical lines of code Different counting strategies: Blank lines Comment lines Automatically generated lines EiffelBase has 63,474 lines, Vision2 has 153,933 lines, EiffelStudio (Windows GUI) has 1,881,480 lines in all compiled classes. Code used in examples given here and below are got from revision 68868 in Origo subversion server.

Comment Percentage Ratio of the number of commented lines of code divided by the number of non-blank lines of code. Critique: If you need to comment your code, you better refactor it.

OO metrics Weighted Methods Per Class (WMC) Depth of Inheritance Tree of a Class (DIT) Number of Children (NOC) Coupling Between Objects (CBO) Response for a Class (RFC)

Weighted Methods Per Class Sum of the complexity of each feature contained in the class. Feature complexity: (e.g. cyclomatic complexity) When feature complexity assumed to be 1, WMC = number of features in class In Eiffel base, there are 5,341 features, In Vision2 (Windows), there are 10,315 features, In EiffelStudio (Windows GUI), there are 89,630 features.

Depth of Inheritance Tree of a Class Length of the longest path of inheritance ending at the current module for CHAIN, DIT=7

Number of Children Number of immediate subclasses of a class. In Eiffel base, there are 3 classes which have more than 10 immediate subclasses: ANY COMPARABLE HASHABLE And of course, ANY has most children.

Coupling Between Objects Number of other classes to which a class is coupled, i.e., suppliers of a class. In Eiffel base, there are 3 classes which directly depend on more than 20 other classes, they are: STRING_8 STRING_32 TUPLE Class SED_STORABLE_FACILITIES indirectly depends on 91 other classes.

Response for a Class foo is do bar end bar is f1 f2 RFC=3 f1 foo bar Number of features that can potentially be executed in a feature, i.e., transitive closure of feature calls. foo is do bar end bar is f1 f2 RFC=3 f1 foo bar f2

Metrics tool in EiffelStudio A code quality checking tool with seamlessly working style: Coding – Metricing – Problem solving – Coding Highly customizable: Define your own metrics to match particular requires Metric archive comparison: Compare measurement of your software to others Automatic metric quality checking: Get warned when some quality criterion are not met

Metrics tool – Evaluate metric

Metrics tool – Investigate result

Metrics tool – Define new metric

Metrics tool – Metric History

Metrics tool - Archive