SlideShare a Scribd company logo
Modularization Compass: 
Navigating the White Waters 
of Feature-Oriented Modularity 
Andrzej Olszak and Bo Nørregaard Jørgensen 
The Maersk Mc-Kinney Moller Institute 
University of Southern Denmark
Agenda 
1. Motivation 
2. Features 
3. Evolution of feature modularity 
4. Drift of modularity 
5. Evaluation 
6. Results
Motivation 
• Software systems have to evolve to 
accommodate new user expectations: 
– Add and enhance features 
– Fix existing features 
• Working with existing code is difficult: 
– Where is this feature implemented? 
– Why is this logic here? 
– Can this change break another feature? 
• It only gets more difficult over time!
Features – user’s perspective on code 
• Feature – unit of user-identifiable functionality of software 
– Scattering increases change scope and delocalization effects 
– Tangling increases change propagation and interleaving effects
Tracking the evolution of features 
Add feature Enhance 
feature 
FSCA=2 (2+2)/2 
(3+2)/2 
• Are these values low or high? 
– Should we aim for FSCA=1? What is the ‘optimal’ value? 
• How much can be improved by refactoring? 
– When to refactor? 
– What/how to refactor? 
?!
Drift of modularity as distance to ‘optimum’ 
• Drift is the distance between the actual and 
the ‘optimal’ values of a metric 
– ‘optimal’ = after applying optimal refactorings* 
Actual modularization 
Optimal modularization 
r1 r2 r3 r4 
Absolute 
value 
Drift 
– Distance from optimal design 
– Potential for refactoring
Calculating drift 
• Obtaining ‘optimal’ modularizations 
– Criteria for detecting ‘optimality’ 
– Efficient traversal of design space 
– Automated refactorings
Modularization goals 
• Feature + object-oriented criteria
Calculating drift by optimizing program 
structure 
• Multi-objective optimization of package structures to 
modularize features 
– Based on the move-class refactoring 
• MOGGA: genetic algorithm on a population of designs 
– Pareto-optimality 
– Grouping operators 
• Resulting designs established using automated code 
transformations
Example optimization results 
• MOGGA config: population of 300 designs over 500 iterations 
with 5% mutation prob. 
0.03 
0.025 
0.02 
0.015 
0.01 
0.005 
0 
fsca 
JHotDraw SVG 
Scattering -55% 
Feature 
Original 
Automated 
0.045 
0.04 
0.035 
0.03 
0.025 
0.02 
0.015 
0.01 
0.005 
0 
ftang 
JHotDraw SVG 
Tangling -60% 
Package 
Original 
Automated
Evaluation 
• Goal: To evaluate whether drift-based metrics 
bring new information, as compared to their 
absolute counterparts 
• Procedure: 
1. Locate features in code 
2. Measure of absolute Scattering and Tangling 
3. Measure drifts 
• Target: release histories of 3 OSS
Feature location 
• Recovered feature specifications from 
documentation and UIs 
• Located features in classes and methods using 
execution tracing and feature-entry annotations 
Application releases Identified features 
JHotDraw Pert 
11 Releases: 5.2; 5.3; 
5.4b1; 6.0b1; 7.0.7; 7.0.8; 
7.0.9; 7.1; 7.2; 7.3; 7.3.1 
Align, Dependency tool, Edit basic, Edit figure, Exit program, Export drawing 
(7.0.7), Group figures, Init program, Line tool (removed in 6.0b1), Modify 
figure, Multiple windows (7.0.7), New drawing, Open drawing, Order figures, 
Save as drawing, Selection tool, Snap to grid, Task tool, Text tool, Undo redo 
(5.3), Zoom (7.0.7) 
RText 
17 Releases 
… 
FreeMind 
13 Releases 
…
Results – JHotDraw Pert 
• Abs: FSCA  FTANG  
• Drift: FSCA  FTANG  
– FTANG drift > FSCA drift 
• Architectural refactoring in v7.0.7 
– Improved separation of features 
– FSCA: drift decreases while absolute 
value increases 
• Abs: FSCA  FTANG 
• Drift: FSCA FTANG 
– FSCA drift remains constant while 
absolute value increases 
9 
8 
7 
6 
5 
4 
3 
2 
1 
0 
FSCA 
Release 
Scattering drift of Pert 
14 
12 
10 
8 
6 
4 
2 
0 
FTANG 
Release 
Tangling drift of Pert 
Drift of tangling Absolute tangling
Some trends in remaining results 
“Breakaway” points 
“Oscillations” of drift? 
(Antón and Potts, 2003) 
Tangling drift > 
scattering drift 
(potential for separating) 
7 
6 
5 
4 
3 
2 
1 
20 
18 
16 
14 
12 
10 
8 
6 
4 
2 
0 
FTANG 
Release 
Tangling drift of FreeMind 
Drift of tangling Absolute tangling 
10 
9 
8 
7 
6 
5 
4 
3 
2 
1 
12 
10 
8 
6 
4 
2 
0 
FTANG 
Release 
Tangling drift of RText 
Drift of tangling Absolute tangling 
0 
FSCA 
Release 
Scattering drift of RText 
Drift of scattering Absolute scattering 
0 
FSCA 
Release 
Scattering drift of FreeMind 
Drift of scattering Absolute scattering
Conclusion & Next steps 
• Drift: 
– Distance from ‘optimum’ 
– Potential for refactoring 
– Not limited to feature-oriented metrics! 
• Interesting observations from the 3 systems 
– Demonstrated usefulness, more data needed to fully 
understand and generalize the observations 
• MOGGA config & performance can be optimized 
• Method-level refactorings can be explored
Questions?

More Related Content

Similar to Modularization compass - Navigating white waters of feature-oriented modularity

KEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road mapKEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road maplucenerevolution
 
Tackling Scaling Challenges of Apache Spark at LinkedIn
Tackling Scaling Challenges of Apache Spark at LinkedInTackling Scaling Challenges of Apache Spark at LinkedIn
Tackling Scaling Challenges of Apache Spark at LinkedIn
Databricks
 
3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...
Timothy McCormick
 
Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...
Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...
Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...
HostedbyConfluent
 
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the HoodRadical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
Databricks
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changesMorgan Tocker
 
Scaling out logistic regression with Spark
Scaling out logistic regression with SparkScaling out logistic regression with Spark
Scaling out logistic regression with Spark
Barak Gitsis
 
Big learning 1.2
Big learning   1.2Big learning   1.2
Big learning 1.2
Mohit Garg
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Gabriele Bartolini
 
Transforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOpsTransforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOps
Nicolas (Nick) Barcet
 
Magellan FOSS4G Talk, Boston 2017
Magellan FOSS4G Talk, Boston 2017Magellan FOSS4G Talk, Boston 2017
Magellan FOSS4G Talk, Boston 2017
Ram Sriharsha
 
India Agile Week 2015
India Agile Week 2015India Agile Week 2015
India Agile Week 2015
Sonata Software
 
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHow Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHien Luu
 
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
HostedbyConfluent
 
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Spark Summit
 
Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析
Etu Solution
 
WhyR? Analiza sentymentu
WhyR? Analiza sentymentuWhyR? Analiza sentymentu
WhyR? Analiza sentymentu
Łukasz Grala
 
SCQAA-SF Meeting on May 21 2014
SCQAA-SF Meeting on May 21 2014 SCQAA-SF Meeting on May 21 2014
SCQAA-SF Meeting on May 21 2014 Sujit Ghosh
 
Apache Spark Model Deployment
Apache Spark Model Deployment Apache Spark Model Deployment
Apache Spark Model Deployment
Databricks
 
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
PAPIs.io
 

Similar to Modularization compass - Navigating white waters of feature-oriented modularity (20)

KEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road mapKEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road map
 
Tackling Scaling Challenges of Apache Spark at LinkedIn
Tackling Scaling Challenges of Apache Spark at LinkedInTackling Scaling Challenges of Apache Spark at LinkedIn
Tackling Scaling Challenges of Apache Spark at LinkedIn
 
3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...
 
Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...
Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...
Fan-out, fan-in & the multiplexer: Replication recipes for global platform di...
 
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the HoodRadical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changes
 
Scaling out logistic regression with Spark
Scaling out logistic regression with SparkScaling out logistic regression with Spark
Scaling out logistic regression with Spark
 
Big learning 1.2
Big learning   1.2Big learning   1.2
Big learning 1.2
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
Transforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOpsTransforming to OpenStack: a sample roadmap to DevOps
Transforming to OpenStack: a sample roadmap to DevOps
 
Magellan FOSS4G Talk, Boston 2017
Magellan FOSS4G Talk, Boston 2017Magellan FOSS4G Talk, Boston 2017
Magellan FOSS4G Talk, Boston 2017
 
India Agile Week 2015
India Agile Week 2015India Agile Week 2015
India Agile Week 2015
 
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting PlatformHow Lucene Powers the LinkedIn Segmentation and Targeting Platform
How Lucene Powers the LinkedIn Segmentation and Targeting Platform
 
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
 
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
 
Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析Track A-2 基於 Spark 的數據分析
Track A-2 基於 Spark 的數據分析
 
WhyR? Analiza sentymentu
WhyR? Analiza sentymentuWhyR? Analiza sentymentu
WhyR? Analiza sentymentu
 
SCQAA-SF Meeting on May 21 2014
SCQAA-SF Meeting on May 21 2014 SCQAA-SF Meeting on May 21 2014
SCQAA-SF Meeting on May 21 2014
 
Apache Spark Model Deployment
Apache Spark Model Deployment Apache Spark Model Deployment
Apache Spark Model Deployment
 
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
 

Recently uploaded

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 

Recently uploaded (20)

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 

Modularization compass - Navigating white waters of feature-oriented modularity

  • 1. Modularization Compass: Navigating the White Waters of Feature-Oriented Modularity Andrzej Olszak and Bo Nørregaard Jørgensen The Maersk Mc-Kinney Moller Institute University of Southern Denmark
  • 2. Agenda 1. Motivation 2. Features 3. Evolution of feature modularity 4. Drift of modularity 5. Evaluation 6. Results
  • 3. Motivation • Software systems have to evolve to accommodate new user expectations: – Add and enhance features – Fix existing features • Working with existing code is difficult: – Where is this feature implemented? – Why is this logic here? – Can this change break another feature? • It only gets more difficult over time!
  • 4. Features – user’s perspective on code • Feature – unit of user-identifiable functionality of software – Scattering increases change scope and delocalization effects – Tangling increases change propagation and interleaving effects
  • 5. Tracking the evolution of features Add feature Enhance feature FSCA=2 (2+2)/2 (3+2)/2 • Are these values low or high? – Should we aim for FSCA=1? What is the ‘optimal’ value? • How much can be improved by refactoring? – When to refactor? – What/how to refactor? ?!
  • 6. Drift of modularity as distance to ‘optimum’ • Drift is the distance between the actual and the ‘optimal’ values of a metric – ‘optimal’ = after applying optimal refactorings* Actual modularization Optimal modularization r1 r2 r3 r4 Absolute value Drift – Distance from optimal design – Potential for refactoring
  • 7. Calculating drift • Obtaining ‘optimal’ modularizations – Criteria for detecting ‘optimality’ – Efficient traversal of design space – Automated refactorings
  • 8. Modularization goals • Feature + object-oriented criteria
  • 9. Calculating drift by optimizing program structure • Multi-objective optimization of package structures to modularize features – Based on the move-class refactoring • MOGGA: genetic algorithm on a population of designs – Pareto-optimality – Grouping operators • Resulting designs established using automated code transformations
  • 10. Example optimization results • MOGGA config: population of 300 designs over 500 iterations with 5% mutation prob. 0.03 0.025 0.02 0.015 0.01 0.005 0 fsca JHotDraw SVG Scattering -55% Feature Original Automated 0.045 0.04 0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 ftang JHotDraw SVG Tangling -60% Package Original Automated
  • 11. Evaluation • Goal: To evaluate whether drift-based metrics bring new information, as compared to their absolute counterparts • Procedure: 1. Locate features in code 2. Measure of absolute Scattering and Tangling 3. Measure drifts • Target: release histories of 3 OSS
  • 12. Feature location • Recovered feature specifications from documentation and UIs • Located features in classes and methods using execution tracing and feature-entry annotations Application releases Identified features JHotDraw Pert 11 Releases: 5.2; 5.3; 5.4b1; 6.0b1; 7.0.7; 7.0.8; 7.0.9; 7.1; 7.2; 7.3; 7.3.1 Align, Dependency tool, Edit basic, Edit figure, Exit program, Export drawing (7.0.7), Group figures, Init program, Line tool (removed in 6.0b1), Modify figure, Multiple windows (7.0.7), New drawing, Open drawing, Order figures, Save as drawing, Selection tool, Snap to grid, Task tool, Text tool, Undo redo (5.3), Zoom (7.0.7) RText 17 Releases … FreeMind 13 Releases …
  • 13. Results – JHotDraw Pert • Abs: FSCA  FTANG  • Drift: FSCA  FTANG  – FTANG drift > FSCA drift • Architectural refactoring in v7.0.7 – Improved separation of features – FSCA: drift decreases while absolute value increases • Abs: FSCA  FTANG • Drift: FSCA FTANG – FSCA drift remains constant while absolute value increases 9 8 7 6 5 4 3 2 1 0 FSCA Release Scattering drift of Pert 14 12 10 8 6 4 2 0 FTANG Release Tangling drift of Pert Drift of tangling Absolute tangling
  • 14. Some trends in remaining results “Breakaway” points “Oscillations” of drift? (Antón and Potts, 2003) Tangling drift > scattering drift (potential for separating) 7 6 5 4 3 2 1 20 18 16 14 12 10 8 6 4 2 0 FTANG Release Tangling drift of FreeMind Drift of tangling Absolute tangling 10 9 8 7 6 5 4 3 2 1 12 10 8 6 4 2 0 FTANG Release Tangling drift of RText Drift of tangling Absolute tangling 0 FSCA Release Scattering drift of RText Drift of scattering Absolute scattering 0 FSCA Release Scattering drift of FreeMind Drift of scattering Absolute scattering
  • 15. Conclusion & Next steps • Drift: – Distance from ‘optimum’ – Potential for refactoring – Not limited to feature-oriented metrics! • Interesting observations from the 3 systems – Demonstrated usefulness, more data needed to fully understand and generalize the observations • MOGGA config & performance can be optimized • Method-level refactorings can be explored