ON THE CONGRUENCE OF MODULARITY AND CODE COUPLING



Similar documents
Chapter 24 - Quality Management. Lecture 1. Chapter 24 Quality management

Engineering Process Software Qualities Software Architectural Design

Using Library Dependencies for Clustering

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Metrics for Analyzing the Quality of Model Transformations

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

CSC408H Lecture Notes

Web Applications Development and Software Process Improvement in Small Software Firms: a Review

Automatic generation of fully-executable code from the Domain tier of UML diagrams

Solutions to Trust. NEXThink V5 What is New?

II. TYPES OF LEVEL A.

Certified PHP Developer VS-1054

CS 111 Classes I 1. Software Organization View to this point:

Cisco Data Center 3.0 Roadmap for Data Center Infrastructure Transformation

I. INTRODUCTION NOESIS ONTOLOGIES SEMANTICS AND ANNOTATION

Service-Oriented Architectures

Object Oriented Design

COURSE CODE : 4072 COURSE CATEGORY : A PERIODS / WEEK : 4 PERIODS / SEMESTER : 72 CREDITS : 4

Yosemite National Park, California. CSE 114 Computer Science I Inheritance

Program Understanding with Code Visualization

Electronic Healthcare Design and Development

CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards

Quality Management. Objectives

Quality Management. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 27 Slide 1

Software cost estimation

IMPROVING JAVA SOFTWARE THROUGH PACKAGE STRUCTURE ANALYSIS

Code Qualities and Coding Practices

Java CPD (I) Frans Coenen Department of Computer Science

Core Issues Affecting Software Architecture in Enterprise Projects

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers

Construction Principles and Design Patterns. Flyweight, Bridge, Builder

Quality Management. Objectives. Topics covered. Process and product quality Quality assurance and standards Quality planning Quality control

Software Engineering

Keywords Aspect-Oriented Modeling, Rule-based graph transformations, Aspect, pointcuts, crosscutting concerns.

Software Development: The Waterfall Model

Variable Base Interface

STRUCTURE AND DESIGN OF SOFTWARE-DEFINED NETWORKS TEEMU KOPONEN NICIRA, VMWARE

Karunya University Dept. of Information Technology

11 November

International Journal of Advanced Research in Computer Science and Software Engineering

Module 1. Introduction to Software Engineering. Version 2 CSE IIT, Kharagpur

Software Engineering & Architecture

DESIGN FOR QUALITY: THE CASE OF OPEN SOURCE SOFTWARE DEVELOPMENT

The C Programming Language course syllabus associate level

Enterprise Architecture: Practical Guide to Logical Architecture

BENEFITS MANAGEMENT AND REALISATION

Supporting in- and off-hospital Patient Management Using a Web-based Integrated Software Platform

Code Obfuscation. Mayur Kamat Nishant Kumar

COURSE OUTLINE. Prerequisites: Course Description:

Design Metrics for Web Application Maintainability Measurement

SourceMeter SonarQube plug-in

Concepts and terminology in the Simula Programming Language

Keywords Class level metrics, Complexity, SDLC, Hybrid Model, Testability

CS 487. Week 8. Reference: 1. Software engineering, roger s. pressman. Reading: 1. Ian Sommerville, Chapter 3. Objective:

Building Applications with Protégé: An Overview. Protégé Conference July 23, 2006

Software Metrics. Lord Kelvin, a physicist. George Miller, a psychologist

A terminology model approach for defining and managing statistical metadata

How To Develop Software

September 18, Modular development in Magento 2. Igor Miniailo Magento

Chap 4. Using Metrics To Manage Software Risks

Does the Act of Refactoring Really Make Code Simpler? A Preliminary Study

Agile Testing: The Agile Test Automation Pyramid

Chapter 7: Software Engineering

The Concern-Oriented Software Architecture Analysis Method

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Cisco UCS Central Software

Object-oriented design methodologies

10 Best-Selling Modules For Home Information Technology Professionals

Software Engineering. Software Engineering. Component-Based. Based on Software Engineering, 7 th Edition by Ian Sommerville

System Software Product Line

Reusable Knowledge-based Components for Building Software. Applications: A Knowledge Modelling Approach

Wireless Sensor Network Performance Monitoring

3 length + 23 size = 2

Visualizing and Understanding Code Duplication in Large Software Systems

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Getting Started With UML Class Modeling. An Oracle White Paper May 2007

Software Engineering Question Bank

DATA QUERY: ADVANCED DATA MODELLING

Making Software. What Really Works, and Why We Believe It. O'REILLY 8 Beijing Cambridge Farnham Koln Sebastopol Tokyo

Quality Management. Managing the quality of the software process and products

Transcription:

ON THE CONGRUENCE OF MODULARITY AND CODE COUPLING University of Trier Fabian Beck and Stephan Diehl

Modular Sofware Systems For human beings, the only way to manage a complex system or solve a problem is to break it up. (Baldwin and Clark, 2000) Software systems Complex systems Modularized on different levels

Modularity Principles Low Coupling and High Cohesion (Stevens, Myers, Constantine, 1974) few dependencies between modules (low coupling), many dependencies in the single modules (high cohesion) Information Hiding (Parnas, 1971/72) hide design decisions into modules Conway s Law (Conway, 1968) the modularization reflects the organization of the development team and others RC Martin s principles of package design, Separation of Concerns, Domain Knowledge, etc.

Research Question Modularity principles Theory Reality

Research Question Modularity principles? Theory Reality Which principles are really used in practice?

Approach Empirical study on software projects 16 open source Java systems modularity = classes contained in packages Analyze different concepts of code coupling Coupling concepts are related to design principles Measure the congruence of coupling and modularity Infer information on the usage of design principles

Code Coupling Concepts

Example /** * @author fabian */ class A { String name; B b = new B(); /** * @author fabian */ class B { String name; void dosomething() { b.dosomethingelse(); void dosomethingelse() { String tostring() { return name; String tostring() { return name;

Example /** * @author fabian */ class A { String name; B b = new B(); void dosomething() { b.dosomethingelse(); Usage /** * @author fabian */ class B { String name; void dosomethingelse() { String tostring() { return name; String tostring() { return name;

Example /** * @author fabian */ class A { String name; B b = new B(); Aggregation /** * @author fabian */ class B { String name; void dosomething() { b.dosomethingelse(); void dosomethingelse() { String tostring() { return name; String tostring() { return name;

Example /** * @author fabian */ class A { String name; B b = new B(); /** * @author fabian */ class B { String name; void dosomething() { b.dosomethingelse(); Code clone void dosomethingelse() { String tostring() { return name; String tostring() { return name;

Example /** * @author fabian */ class A { String name; B b = new B(); Ownership /** * @author fabian */ class B { String name; void dosomething() { b.dosomethingelse(); void dosomethingelse() { String tostring() { return name; String tostring() { return name;

Example /** * @author fabian */ class A { String name; B b = new B(); /** * @author fabian */ Code coupling class B { is String name; multi-dimensional. void dosomething() { void dosomethingelse() { b.dosomethingelse(); String tostring() { I. Structural Dependencies II. Evolution & Ownership III. Code Clones & Semantic return name; return name; String tostring() {

I. Structural Dependencies Structural static code dependencies Inheritance Aggregation Usage Direct Indirect (fan-out) external internal 9 combinations of structural dependencies

II. Evolution & Ownership Evolutionary Coupling (co-change) Two classes are coupled if they were frequently changed together. Code Ownership Two classes are coupled if they have similar owners.

III. Code Clones & Semantic Code Clones Two classes are coupled if they share a code clone. Semantic Similarity Two classes are coupled if they use similar vocabulary.

Relationships to Modularity Principles Coupling Concept Related Design Principle Direct structural dependencies Low Coupling and High Cohesion Indirect structural dependencies (external) Separation of Concerns Indirect structural dependencies (internal) Information Hiding Evolutionary coupling Information Hiding Code ownership Conway s Law Code clones? Semantic similarity Domain Knowledge based on theoretical considerations

Study

Coupling-Modularity Congruence Coupling Concept I Coupling Concept II

Coupling-Modularity Congruence Coupling Concept I Coupling Concept II a b a b congruent non-congruent

Coupling-Modularity Congruence Coupling Concept I Coupling Concept II a b a b congruent non-congruent Congruence Metric (simplified) The percentage of couplings not crossing module borders congruence = + Non-simplified: considering the hierarchical structure of the modularization

Coupling-modularity congruence (median) Inheritance Aggregation Usage Inheritance Aggregation Usage Inheritance Aggregation Usage baseline Results 1 0 Direct structural Indirect structural (external) Indirect structural (internal) Evolutionary coupling Code ownership Code clones Semantic similarity

Coupling-modularity congruence (median) Inheritance Aggregation Usage Inheritance Aggregation Usage Inheritance Aggregation Usage baseline Results 1 High congruence for structural coupling evolutionary coupling code clones 0 Direct structural Indirect structural (external) Indirect structural (internal) Evolutionary coupling Code ownership Code clones Semantic similarity

Coupling-modularity congruence (median) Inheritance Aggregation Usage Inheritance Aggregation Usage Inheritance Aggregation Usage baseline Results 1 2. 1. Inheritance reaches the highest congruence 1. internal indirect structural coupling 2. direct structural coupling 0 Direct structural Indirect structural (external) Indirect structural (internal) Evolutionary coupling Code ownership Code clones Semantic similarity

Coupling-modularity congruence (median) Different Types of Modules Coupling Concepts Package types core data gui io text util Similar congruence pattern for all package types (even for utility packages)

Discussion & Summary

Modularity Principles None of the principles is dominating Principles are applied to all types of modules alike Stronger principles Low Coupling and High Cohesion Explanation: High congruence of direct structural dependencies Information Hiding Explanation: High congruence of internal fan-out and evolutionary coupling Weaker principles Conway s Law, Separation of Concerns, Domain Knowledge

Summary Empirical study on 16 software projects High congruence between coupling and modularity structural dependencies (in particular, inheritance) evolutionary coupling code clones Different module types no type-specific congruence patterns Which modularity principles are really used in practice? Low Coupling and High Cohesion Information Hiding