Bartłomiej Bodziechowski 1, Eryk Ciepiela 2, Marian Bubak 1,2 1 AGH University of Science and Technology, Department of Computer Science AGH, 2 AGH University.

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

Software Metrics for Object Oriented Design
Lecture 9 Improving Software Design CSC301-Winter 2011 – University of Toronto – Department of Computer Science Hesam C. Esfahani
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.
Page 1 Building Reliable Component-based Systems Chapter 7 - Role-Based Component Engineering Chapter 7 Role-Based Component Engineering.
Design Metrics Software Engineering Fall 2003 Aditya P. Mathur Last update: October 28, 2003.
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.
1 SOFTWARE QUALITY ASSURANCE Basic Principles. 2 Requirements System Design Detailed Design Implementation Installation & Testing Maintenance SW Quality:
Object Oriented Metrics XP project group – Saskia Schmitz.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Software Process and Product Metrics
Software Metrics *** state of the art, weak points and possible improvements Gordana Rakić, Zoran Budimac Department of Mathematics and Informatics, Faculty.
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.
An Introduction to Software Architecture
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.
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.
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.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 12-5 Software Engineering Design Goals.
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.
Incremental Design Why incremental design? Goal of incremental design Tools for incremental design  UML diagrams  Design principles  Design patterns.
Elements of OO Abstraction Encapsulation Modularity Hierarchy: Inheritance & Aggregation 4 major/essential elements3 minor/helpful elements Typing Concurrency.
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,
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
PC204 Lecture 5 Programming Methodologies Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved.
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
OOAD UNIT V B RAVINDER REDDY PROFESSOR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING.
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
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.
Chapter 10 Software quality. This chapter discusses n Some important properties we want our system to have, specifically correctness and maintainability.
Design Metrics CS 406 Software Engineering I Fall 2001 Aditya P. Mathur Last update: October 23, 2001.
Architecting Complexity HOW UNDERSTANDING COMPLEXITY PROMOTES SIMPLICITY.
Mantas Radzevičius ifm-2/2
Object Oriented Metrics
Pragmatics 4 Hours.
A Hierarchical Model for Object-Oriented Design Quality Assessment
Software Metrics 1.
Course Notes Set 12: Object-Oriented Metrics
Design Characteristics and Metrics
Towards a Multi-paradigm Complexity Measure
Copyright © by Curt Hill
Object-Oriented Metrics
CS427: Software Engineering I
Design Metrics Software Engineering Fall 2003
Design Metrics Software Engineering Fall 2003
Software Metrics Validation using Version control
Mei-Huei Tang October 25, 2000 Computer Science Department SUNY Albany
An Introduction to Software Architecture
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
Object Oriented Design & Analysis
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Bartłomiej Bodziechowski 1, Eryk Ciepiela 2, Marian Bubak 1,2 1 AGH University of Science and Technology, Department of Computer Science AGH, 2 AGH University of Science and Technology, ACC Cyfronet AGH,

Quality of software under development assured by Dynamic analysis - testing Static analysis - metrics Problems connected with software under development: Rigidity – The system is hard to change because every change forces many other changes. Fragility – Changes cause the system to break in conceptually unrelated places. Immobility – It's hard to disentangle the system into reusable components. Viscosity – Doing things right is harder than doing things wrong. Metric definition: A rule for quantifying some characteristics or attribute of a computer software entity. Key point: to find relation between metric results and external quality features: functionality, reliability, portability, efficiency, maintainability (ISO 9126).

Assessment of usefulness of software static metrics in software engineering, Application of software static metrics for GridSpace2 and indication of areas that need to be reviewed and potentially need refactoring, Identifying areas for which static software metrics could be applied for object oriented software, Research and grouping of static software metrics based on available literature and studies Review of open source tools implementing static software metrics for Java programming language.

GS2 is a platform for creating scientific computing application (in silico experiments) with Polish and European data center resources, Developed by Distributed Computing Environments Team working at CYFRONET AGH. Important features of GS2 from metrics point of view : Relatively big projects consist of 400 classes divided into 70 packages, Multilayered application, Developed by the team of programmers, Under constant changes due to the need of adaptation to still changing context and environment of working, Written in Java.

Counts Object- oriented pardigms Areas Laws and principles Artifacts Dependencies Inheritance Encapsulation Polymorphism Cohesion Law of Demeter SOLID Packages Others Single responsibility principle Open close principle Liskov substitution principle Interface segragation principle Dependency inversion principle Cohesion Couplings Reuse/release equivalency principle Common reuse principle Common close principle Acyclic dependency principle Stable dependenciy principle Stable abstractions principle Duplicated code Unit testing covarage Red – not covered by metrics

Size and complexity Object oriented metrics Metrics Duplicates and unit testing covarage Counts of artifacts Counts of couplings MOOD (metrics of object- oriented design) by F.Abreu Chidamber-Kemerer set of metrics R. Martina set of metrics for packages and modules Other laws and principles Readability, good practice and potential bugs for Java

Proposals of metrics in scientific publications and in tools (mainly size and complexity), Verification of metrics: Theoretical – understanding the theoretical basis, Practical – relationships with external features of software quality, Expected values for the metrics: Resulting from definition, Proposed based on evaluation of software identified as high quality. Metric definition: A rule for quantifying some characteristics or attribute of a computer software entity.

Response For a Class Number of methods that can be invoked in response on massage received by object of considered class Typical values: , review recommended for >200 (L. Rosenberg NASA) To high value means: High internal complexity, To big responsibility set for the class, High cost of testing and maintainability. Coupling Between Objects Number of classes that are connected with considered class in relationships other then inheritance (efferent couplings), The lower the better values, High values means that class is more sensitive for changes in other place of system – difficulties with maintainability. Weighted Method per Class Weight of methods is cyclomatic complexity of McCabea. 60% of classes has WMC [0;20], 36% WMC [20;100], review recommended for >100 (L.R. NASA)

Depth of Inheritance Tree The maximum number of levels of parent classes, High DIT – high specialization of class, reducing duplicates, Low DIT – weak usage of inheritances and usage of existing packages. Number of Children Is the number of direct descendents of class, Low value again means weak usage of inheritance High value – to big responsibility, difficulties in testing Lack of Cohesion Of Methods Indicates lack of cohesion of methods inside the class, It is differences between number of pairs of methods invoking different attributes P and number of pairs of methods invoking at least one common attribute Q : LCOM1 = P - Q, if P > Q LCOM1 = 0 otherwise

7 tools implementing metrics: Stan: results in the form of histograms, visualization of dependencies on all level of abstractions, RefactorIT: a lot of different metrics, creation of report with precise results for all artifacts useful to carry out self- analysis Sonar: the highest numbers or releases, support for refactoring JDepend, Ckjm, Simian, Cobertura, 3 tools based on rule-set which are checking code for good practice, readability and potential bugs PMD, Checkstyle, Findbugs

Integrate metrics tools in software development process (Eclipse, Maven plugins) Assess the quality of measuring feature for whole system. Histograms are the best to do it. Indicate artifacts with metrics values outside of the recomendations Review of these artifacts Decision about refactoring

Level: m – methods, c – classes, p – packages, s - system

7 different tools were used: Stan, RefactorIT, Sonar, Simian, PMD, Checkstyle, Findbugs. Most important results: Good results obtained for counts metrics of artifacts and couplings (for different metrics only from a few to max 14 classes out of recommended values, Metrics CBO, RFC i WMC results similar like for counts metrics (violations offen for the same classes), Inheritance used mainly by using external packages (high values of DIT and low values for NOC), ClassesWMC ew.workbench.client.ui.SnippetPanel 136 sshexecutor.SSHFileManager 120 sshexecutor.ModifiedSCPClient 118 core.execution.ExperimentSessionBase 109 ew.workbench.client.ui.ExperimentPan 78

Ca. 7% classes needed to be divided to smaller (lack of cohesion) LCOM4>1, Breaking of Stable Abstractions principle, 42% of classes break Law of Demeter, 40% packages involved in cycles braking – breaking Acyclic Dependency Principle Law level of duplicates ~5% - good result Unit tests - line covarage 17%

Using software static metrics is useful in keeping high quality of software under development, There are many areas that can be checked by metrics (object-oriented paradigms, laws, principles) but lack of studies for using metrics in the context of design patterns, Values of metrics stay in correlation with external quality features: functionality, reliability, portability, efficiency, maintainability (studies for MOOD and CK set of metrics), Threshold values of metrics set up based on software identified as high quality software or proposal inside tools which roots are not known – cautious recommended. Violation of threshold doesnt mean need of refactoring – it is only yellow light informing about higher risk of potential failure. Tools based on rules sets (PMD, Checkstyle, Findbugs) needed to be used during code writing, can not be used for audits, Open source tools contains bugs e.g. DIT in Stan, or EP in RefactorIT, Using metrics can help to better understand the software especially its complexity.

Improvement of definitions of existing metrics based on better understanding of theoretical basis, Further studies between metrics violations and problems with external quality features: functionality, reliability, portability, efficiency, maintainability are needed. Studies on using static metrics in context of design pattern. New metrics definitions.