+ All Categories
Home > Technology > Investigating the Change-proneness of Service Patterns and Antipatterns

Investigating the Change-proneness of Service Patterns and Antipatterns

Date post: 16-Apr-2017
Category:
Upload: francis-palma
View: 109 times
Download: 0 times
Share this document with a friend
54
Investigating the Change-proneness of Service Patterns and Antipatterns Francis Palma , Le An, Foutse Khomh, Naouel Moha, and Yann-Gaël Guéhéneuc École Polytechnique de Montréal, Canada SOCA 2014, Matsue, Japan
Transcript

Investigating the Change-proneness of Service Patterns and Antipatterns

Francis Palma, Le An, Foutse Khomh, Naouel Moha, and Yann-Gaël Guéhéneuc

École Polytechnique de Montréal, Canada

SOCA 2014, Matsue, Japan

Problem Context (1/3)

Service-based Systems

2 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

SOAP Web Services

SCA Systems

Problem Context (1/3)

SOAP Web Services

SCA Systems

Service-based Systems

Design Patterns

2 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Problem Context (1/3)

SOAP Web Services

SCA Systems

Service-based Systems

Maintenance

Evolution

SOAP Web Services

SCA Systems

Design Patterns

2 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Problem Context (1/3)

SOAP Web Services

SCA Systems

Service-based Systems

Maintenance

Evolution

SOAP Web Services

SCA Systems

- may degrade the design - may degrade the QoS = Antipatterns

Design Patterns

2 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Problem Context (1/3)

2 of 21

1. Highly change-prone?

2. Require more maintenance efforts or cause expensive maintenance?

SOAP Web Services

SCA Systems

Existing Antipatterns

?

Investigating the Change-proneness of Service Patterns and Antipatterns

Problem Context (2/3): Service Antipatterns and Patterns

3 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Multi Service Antipattern

Problem Context (2/3): Service Antipatterns and Patterns

Multi Service Antipattern

Proxy Service Pattern

Proxy Service

Actual Service

Calls Calls

Client

3 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Problem Context (3/3): Detection vs. Impact

4 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

• Detection of service patterns? (SODOP, Demange et al. 2013)

• Detection of service antipatterns? (SODA, Moha et al. 2012)

• Improve/degrade the design and the QoS?

• Facilitate/hinder the maintenance and evolution of an SBS?

- impact on the change-proneness, i.e., maintenance cost?

Problem Context (3/3): Detection vs. Impact

Change-proneness of a service*

- number of changes the frequency of changes on a service source files - code churns the size of changes on a service source files

4 of 21

• Detection of service patterns? (SODOP, Demange et al. 2013)

• Detection of service antipatterns? (SODA, Moha et al. 2012)

• Improve/degrade the design and the QoS?

• Facilitate/hinder the maintenance and evolution of an SBS?

- impact on the change-proneness, i.e., maintenance cost?

*Code Churn: A Measure for Estimating the Impact of Code Change: Sebastian G. Elbaum and John C. Munson (1998)

Research Questions

• RQ1: What is the relation between service patterns and

change-proneness?

• RQ2: What is the relation between service antipatterns and

change-proneness?

• RQ3: What is the relation between particular kinds of service

antipatterns and change-proneness?

• Confounding impact of OO code-level smells

5 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Outline

- Analysed System: FraSCAti OW2

- Study Design

- Case Study Results

- Conclusion and Future Work

Outline

- Analysed System: FraSCAti OW2

- Study Design

- Case Study Results

- Conclusion and Future Work

FraSCAti OW2

frascati.ow2.org

Investigating the Change-proneness of Service Patterns and Antipatterns

Total Services 130 (62 analysed)

Total Size 170 KLOC

Total Changed Files 15,863*

Total Java Source Files 9,020*

Total Changes 71,151*

Total Code Churns 62,676,363*

6 of 21

*Entire commit history

Outline

- Analysed System: FraSCAti OW2

- Study Design

- Case Study Results

- Conclusion and Future Work

Study Design

7 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Study Design

7 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Study Design: FraSCAti Commit [[frascati-commits]] [1196] trunk/tinfi: More refactoring.

Subject: [[frascati-commits]] [1196] trunk/tinfi: More refactoring.

From: Lionel.Seinturier@xxxxxxx

Date: Sat, 13 Dec 2008 21:41:32 +0100 (CET)

Delivered-to: frascati-commits@xxxxxxx

Title: [1196] trunk/tinfi: More refactoring.

Revision

1196

Author

seintur

Date

2008-12-13 21:41:32 +0100 (Sat, 13 Dec 2008)

Log Message

More refactoring.

Modified Paths

trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java

trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java

Added Paths

trunk/tinfi/opt/comp/src/main/java/org/ow2/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCodeGenerator.java

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/InitializerCompCtrlSourceCodeGenerator.java

Removed Paths

trunk/tinfi/opt/comp/src/main/java/org/scorware/

trunk/tinfi/runtime/oo-dyn/src/main/java/org/scorware/

Property Changed

trunk/tinfi/tinfi-mixed/

Diff

Copied:

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCodeGenerator.j

ava (from rev 1186,

trunk/tinfi/opt/comp/src/main/java/org/scorware/tinfi/juliac/FCCompCtrlSourceCodeGenerator.jav

a) (0 => 1196)

---

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCode

Generator.java (rev 0)

+++

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCode

Generator.java 2008-12-13 20:41:32 UTC (rev 1196)

@@ -0,0 +1,167 @@

+package org.ow2.frascati.tinfi.juliac;

+

+import java.io.IOException;

+

+import org.objectweb.fractal.api.control.AttributeController;

+import org.objectweb.fractal.api.type.InterfaceType;

+import org.objectweb.fractal.julia.control.attribute.CloneableAttributeController;

+import org.objectweb.fractal.julia.type.BasicInterfaceType;

+import org.objectweb.fractal.juliac.InitializerClassGenerator;

+import org.objectweb.fractal.juliac.Juliac;

+import org.objectweb.fractal.juliac.JuliacConfig;

+import org.objectweb.fractal.juliac.proxy.AttributeControllerClassGenerator;

+import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;

+import org.objectweb.fractal.juliac.proxy.ProxyClassGenerator;

+import org.objectweb.fractal.juliac.ucf.UnifiedClass;

+import org.osoa.sca.annotations.Callback;

+

+/**

+public class FCCompCtrlSourceCodeGenerator

+extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {

+

+ public FCCompCtrlSourceCodeGenerator() {

+ super();

+ }

+

+

+ // -----------------------------------------------------------------------

+ // Implementation of the OptLevelSourceCodeGenerator interface

+ // -----------------------------------------------------------------------

+

....

....

....

Modified: trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java (1195 => 1196)

--- trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java

2008-12-12 18:10:44 UTC (rev 1195)

+++ trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java

2008-12-13 20:41:32 UTC (rev 1196)

@@ -21,7 +21,7 @@

* Author: Lionel Seinturier

*/

+package org.ow2.frascati.tinfi;

import org.objectweb.fractal.api.Component;

import org.objectweb.fractal.api.Type;

Modified: trunk/tinfi/runtime/oo-

dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java (1195 => 1196)

--- trunk/tinfi/runtime/oo-

dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java 2008-12-

12 18:10:44 UTC (rev 1195)

+++ trunk/tinfi/runtime/oo-

dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java 2008-12-

13 20:41:32 UTC (rev 1196)

@@ -21,7 +21,7 @@

* Author: Lionel Seinturier

*/

Study Design: FraSCAti Commit [[frascati-commits]] [1196] trunk/tinfi: More refactoring.

Subject: [[frascati-commits]] [1196] trunk/tinfi: More refactoring.

From: Lionel.Seinturier@xxxxxxx

Date: Sat, 13 Dec 2008 21:41:32 +0100 (CET)

Delivered-to: frascati-commits@xxxxxxx

Title: [1196] trunk/tinfi: More refactoring.

Revision

1196

Author

seintur

Date

2008-12-13 21:41:32 +0100 (Sat, 13 Dec 2008)

Log Message

More refactoring.

Modified Paths

trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java

trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java

Added Paths

trunk/tinfi/opt/comp/src/main/java/org/ow2/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCodeGenerator.java

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/InitializerCompCtrlSourceCodeGenerator.java

Removed Paths

trunk/tinfi/opt/comp/src/main/java/org/scorware/

trunk/tinfi/runtime/oo-dyn/src/main/java/org/scorware/

Property Changed

trunk/tinfi/tinfi-mixed/

Diff

Copied:

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCodeGenerator.j

ava (from rev 1186,

trunk/tinfi/opt/comp/src/main/java/org/scorware/tinfi/juliac/FCCompCtrlSourceCodeGenerator.jav

a) (0 => 1196)

---

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCode

Generator.java (rev 0)

+++

trunk/tinfi/opt/comp/src/main/java/org/ow2/frascati/tinfi/juliac/FCCompCtrlSourceCode

Generator.java 2008-12-13 20:41:32 UTC (rev 1196)

@@ -0,0 +1,167 @@

+package org.ow2.frascati.tinfi.juliac;

+

+import java.io.IOException;

+

+import org.objectweb.fractal.api.control.AttributeController;

+import org.objectweb.fractal.api.type.InterfaceType;

+import org.objectweb.fractal.julia.control.attribute.CloneableAttributeController;

+import org.objectweb.fractal.julia.type.BasicInterfaceType;

+import org.objectweb.fractal.juliac.InitializerClassGenerator;

+import org.objectweb.fractal.juliac.Juliac;

+import org.objectweb.fractal.juliac.JuliacConfig;

+import org.objectweb.fractal.juliac.proxy.AttributeControllerClassGenerator;

+import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;

+import org.objectweb.fractal.juliac.proxy.ProxyClassGenerator;

+import org.objectweb.fractal.juliac.ucf.UnifiedClass;

+import org.osoa.sca.annotations.Callback;

+

+/**

+public class FCCompCtrlSourceCodeGenerator

+extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {

+

+ public FCCompCtrlSourceCodeGenerator() {

+ super();

+ }

+

+

+ // -----------------------------------------------------------------------

+ // Implementation of the OptLevelSourceCodeGenerator interface

+ // -----------------------------------------------------------------------

+

....

....

....

Modified: trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java (1195 => 1196)

--- trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java

2008-12-12 18:10:44 UTC (rev 1195)

+++ trunk/tinfi/runtime/oo-dyn/src/main/java/org/ow2/frascati/tinfi/Tinfi.java

2008-12-13 20:41:32 UTC (rev 1196)

@@ -21,7 +21,7 @@

* Author: Lionel Seinturier

*/

+package org.ow2.frascati.tinfi;

import org.objectweb.fractal.api.Component;

import org.objectweb.fractal.api.Type;

Modified: trunk/tinfi/runtime/oo-

dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java (1195 => 1196)

--- trunk/tinfi/runtime/oo-

dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java 2008-12-

12 18:10:44 UTC (rev 1195)

+++ trunk/tinfi/runtime/oo-

dyn/src/main/java/org/ow2/frascati/tinfi/TinfiBootstrapComponentImpl.java 2008-12-

13 20:41:32 UTC (rev 1196)

@@ -21,7 +21,7 @@

* Author: Lionel Seinturier

*/

Study Design

7 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Study Design

7 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Study Design

Detection of Service Patterns: SODOP – Service Oriented Detection Of Patterns (Demange et al. 2013)

Detection of Service Antipatterns: SODA – Service Oriented Detection for Antipatterns (Moha et al. 2012)

8 of 21

Names Detected Instances

Involved Java Source Files

Patterns

Adapter 1 14

Basic Service 5 54

Facade 3 62

Proxy 3 61

Antipatterns

Bloated Service 3 25

Bottleneck Service 2 24

God Component 2 4

Multi Service 1 5

Nobody Home 4 12

Service Chain 3 10

The Knot 1 24

Tiny Service 1 24

OO Code Smells - 26,381 3,717

Study Design

9 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Study Design: Variables

Independent Variables

Eight service antipatterns and four service patterns i. f1i a file i was involved in the implementation of at least one pattern (RQ1) ii. f2i a file i was involved in the implementation of at least one antipattern (RQ2) iii. f3i ,j a file i was involved in the implementation of antipattern j (RQ3)

Dependent Variables

Change-proneness of services' source files

i. total number of changes as ci ii. total number of code churns as di

10 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Study Design: Interpretation of Values

Interpreting the effect sizes

Interpreting the p-values

11 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Outline

- Analysed System: FraSCAti OW2

- Study Design

- Case Study Results

- Conclusion and Future Work

RQ1: What is the relation between service patterns and change-proneness?

12 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

RQ1: What is the relation between service patterns and change-proneness?

12 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

H101 : there is no difference between the total number of changes experienced

by files involved in the implementation of a service pattern and other files H2

01 : there is no difference between the total number of code churns experienced by files involved in the implementation of a service pattern and other files

H101 : there is no difference between the total number of changes experienced

by files involved in the implementation of a service pattern and other files H2

01 : there is no difference between the total number of code churns experienced by files involved in the implementation of a service pattern and other files

12 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

RQ1: What is the relation between service patterns and change-proneness?

SODOP

Measure

change-proneness

Test H101 & H

201

(Wilcoxon rank sum test)

Findings RQ1: Patterns are less change-prone but not at (statistically) significant level

13 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

13 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Findings RQ1: Patterns are less change-prone but not at (statistically) significant level

13 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Findings RQ1: Patterns are less change-prone but not at (statistically) significant level

RQ2: What is the relation between service antipatterns and change-proneness?

14 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

RQ2: What is the relation between service antipatterns and change-proneness?

14 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

H102: there is no difference between the total number of changes experienced

by files involved in the implementation of a service antipattern and other files H2

02 : there is no difference between the total number of code churns experienced by files involved in the implementation of a service antipattern and other files

14 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

RQ2: What is the relation between service antipatterns and change-proneness?

H102: there is no difference between the total number of changes experienced

by files involved in the implementation of a service antipattern and other files H2

02 : there is no difference between the total number of code churns experienced by files involved in the implementation of a service antipattern and other files

SODA

Measure

change-proneness

Test H102 & H

202

(Wilcoxon rank sum test)

Findings RQ2: Antipatterns are more change-prone at the statistically significant level

15 of 21

15 of 21

Findings RQ2: Antipatterns are more change-prone at the statistically significant level

RQ3: What is the relation between particular kinds of service antipatterns and change-proneness?

16 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

RQ3: What is the relation between particular kinds of service antipatterns and change-proneness?

16 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

H103: there is no difference between the total number of changes experienced

by files from groups (GAi)iє{1,….8} and GNoAP H1

03: there is no difference between the total number of code churns experienced by files from groups (GAi)iє{1,….8} and GNoAP

H103: there is no difference between the total number of changes experienced

by files from groups (GAi)iє{1,….8} and GNoAP H1

03: there is no difference between the total number of code churns experienced by files from groups (GAi)iє{1,….8} and GNoAP

16 of 21

RQ3: What is the relation between particular kinds of service antipatterns and change-proneness?

SODA

Measure change-proneness

Test H103 & H

203

(Kruskal-Wallis test)

Classify source files (antipatterns vs non-antipatterns)

Findings RQ3: Antipatterns (investigated in this study) are not equally change-prone

17 of 21

17 of 21

Findings RQ3: Antipatterns (investigated in this study) are not equally change-prone

Confounding Impact: Are service antipatterns more vulnerable to OO code-level smells (and vice-versa for service pattern)?

18 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Confounding Impact: Are service antipatterns more vulnerable to OO code-level smells (and vice-versa for service pattern)?

18 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

SODA SODOP

Compare the groups

(Wilcoxon rank sum test)

Classify source files

(patterns vs. non-patterns) (antipatterns vs. non-antipatterns)

Findings on Confounding Impact

19 of 21

Service antipatterns contain more (but not statistically significant) code smells

Service patterns contain less code smells at the statistically significant level

Findings on Confounding Impact

19 of 21

Service antipatterns contain more (but not statistically significant) code smells

Service patterns contain less code smells at the statistically significant level

Take Home Message…

• Developers should avoid implementing Service

Antipatterns to

- reduce maintenance efforts and costs, and

- improve maintainability and ease evolution

• Implemented service patterns have less code-level

OO smells

20 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Outline

- Analysed System: FraSCAti OW2

- Study Design

- Case Study Results

- Conclusion and Future Work

Conclusion

21 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Conclusion

21 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Conclusion

21 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Conclusion

21 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Future Work

• Future works include

- replicate the study on other SBSs and service antipatterns

- investigate the changes types and their impact on antipatterns

- investigate the relation between service antipatterns

and fault-proneness

21 of 21 Investigating the Change-proneness of Service Patterns and Antipatterns

Questions ?


Recommended